Unserialize empty arrays.

git-svn-id: https://develop.svn.wordpress.org/trunk@1900 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-11-28 19:53:11 +00:00
parent 1b28947bf4
commit 5673b8e7a0
1 changed files with 7 additions and 5 deletions

View File

@ -348,8 +348,10 @@ function get_settings($setting) {
$cache_nonexistantoptions[$setting] = true;
return false;
endif;
if (@ $kellogs = unserialize($option) ) return $kellogs;
@ $kellogs = unserialize($option);
if ($kellogs !== FALSE)
return $kellogs;
else return $option;
endif;
}
@ -378,9 +380,9 @@ function get_alloptions() {
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);
if (@ $value = unserialize($option->option_value) )
$all_options->{$option->option_name} = $value;
else $value = $option->option_value;
@ $value = unserialize($option->option_value);
if ($value === FALSE)
$value = $option->option_value;
$all_options->{$option->option_name} = $value;
}
return $all_options;