Force $autoload to be either "yes" or "no". see #4440. props Nazgul

git-svn-id: http://svn.automattic.com/wordpress/trunk@5686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-06-12 20:57:58 +00:00
parent cf2b700d93
commit 6d5da3e33c
1 changed files with 1 additions and 0 deletions

View File

@ -324,6 +324,7 @@ function add_option($name, $value = '', $description = '', $autoload = 'yes') {
} }
$value = maybe_serialize($value); $value = maybe_serialize($value);
$autoload = ( 'no' === $autoload ) ? 'no' : 'yes';
if ( 'yes' == $autoload ) { if ( 'yes' == $autoload ) {
$alloptions = wp_load_alloptions(); $alloptions = wp_load_alloptions();