Make sure alloptions is an array before we try to use unset() on its alleged key

git-svn-id: http://svn.automattic.com/wordpress/trunk@14330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-05-02 06:02:54 +00:00
parent f92971a7ff
commit 247c08f604
1 changed files with 1 additions and 1 deletions

View File

@ -637,7 +637,7 @@ function delete_option( $option ) {
if ( ! defined( 'WP_INSTALLING' ) ) {
if ( 'yes' == $row->autoload ) {
$alloptions = wp_load_alloptions();
if ( isset( $alloptions[$option] ) ) {
if ( is_array( $alloptions ) && isset( $alloptions[$option] ) ) {
unset( $alloptions[$option] );
wp_cache_set( 'alloptions', $alloptions, 'options' );
}