Unserialize empty arrays.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-11-28 19:53:11 +00:00
parent aad8c71bb1
commit 8c9c4e1556
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;