diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-28 13:05:54 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-28 13:05:54 +0000 |
| commit | 0aae52725b9ecb01404ab41f09c958e567ce6abb (patch) | |
| tree | fbc4941904c08b951b034a02214f4206711aa0db /wp-inst/wp-includes/functions.php | |
| parent | 35bb6109b4f718e91775b6457d5e8acfc3094def (diff) | |
Check that options are there, won't be on install.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@87 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/functions.php')
| -rw-r--r-- | wp-inst/wp-includes/functions.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php index c9489f2..3796706 100644 --- a/wp-inst/wp-includes/functions.php +++ b/wp-inst/wp-includes/functions.php @@ -311,16 +311,18 @@ function get_alloptions() { } $wpdb->show_errors(); - foreach ($options as $option) { - // "When trying to design a foolproof system, - // never underestimate the ingenuity of the fools :)" -- Dougal - if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); - if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); - if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); - @ $value = unserialize($option->option_value); - if ($value === FALSE) - $value = $option->option_value; - $all_options->{$option->option_name} = apply_filters('pre_option_' . $option->option_name, $value); + if( is_array( $options ) ) { + foreach ($options as $option) { + // "When trying to design a foolproof system, + // never underestimate the ingenuity of the fools :)" -- Dougal + if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); + if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); + if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); + @ $value = unserialize($option->option_value); + if ($value === FALSE) + $value = $option->option_value; + $all_options->{$option->option_name} = apply_filters('pre_option_' . $option->option_name, $value); + } } return apply_filters('all_options', $all_options); } |
