Ticket #2268: 2688.diff
File 2688.diff, 1.1 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
273 273 function get_settings($setting) { 274 274 global $wpdb; 275 275 276 if (wp_cache_get($setting, 'notoptions')) { 277 return false; 278 } 276 279 $value = wp_cache_get($setting, 'options'); 277 280 278 281 if ( false === $value ) { … … 285 288 if( is_object( $row) ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values 286 289 $value = $row->option_value; 287 290 wp_cache_set($setting, $value, 'options'); 288 } else { 291 } else { //setting not found 292 //do $setting => $setting to be nice and flexible :) 293 wp_cache_set($setting, $setting, 'notoptions'); 289 294 return false; 290 295 } 291 296 } … … 368 373 $newvalue = serialize($newvalue); 369 374 370 375 wp_cache_set($option_name, $newvalue, 'options'); 376 377 if (wp_cache_get($option_name, 'notoptions')) { 378 wp_cache_delete($option_name, 'notoptions'); 379 } 371 380 372 381 $newvalue = $wpdb->escape($newvalue); 373 382 $option_name = $wpdb->escape($option_name);