Ticket #4306: array_unset.diff
| File array_unset.diff, 0.9 kB (added by ryan, 1 year ago) |
|---|
-
wp-includes/functions.php
old new 322 322 } 323 323 324 324 $notoptions = wp_cache_get('notoptions', 'options'); 325 if ( is set($notoptions[$option_name]) ) {325 if ( is_array($notoptions) && isset($notoptions[$option_name]) ) { 326 326 unset($notoptions[$option_name]); 327 327 wp_cache_set('notoptions', $notoptions, 'options'); 328 328 } … … 356 356 357 357 // Make sure the option doesn't already exist we can check the cache before we ask for a db query 358 358 $notoptions = wp_cache_get('notoptions', 'options'); 359 if ( is set($notoptions[$name]) ) {359 if ( is_array($notoptions) && isset($notoptions[$name]) ) { 360 360 unset($notoptions[$name]); 361 361 wp_cache_set('notoptions', $notoptions, 'options'); 362 362 } elseif ( false !== get_option($name) ) {
