Make WordPress Core

Ticket #11506: 11506.diff

File 11506.diff, 784 bytes (added by ericmann, 15 years ago)

Same patch as above, updates function documentation instead of adding commentary.

  • wp-includes/functions.php

     
    488488 * @package WordPress
    489489 * @subpackage Option
    490490 *
    491  * @param string $option_name Option name. Expected to not be SQL-escaped
     491 * @param string $option_name Option name. Expected to not be SQL-escaped.  Cannot be null or blank.
    492492 * @param mixed $newvalue Option value.
    493493 * @return bool False if value was not updated and true if value was updated.
    494494 */
    495495function update_option( $option_name, $newvalue ) {
    496496        global $wpdb;
     497       
     498        $option_checker = trim( $option_name );
     499        if( empty( $option_checker ) ) return false;
    497500
    498501        wp_protect_special_option( $option_name );
    499502