WordPress.org

Make WordPress Core

Changeset 18567


Ignore:
Timestamp:
08/18/2011 06:17:37 PM (7 years ago)
Author:
duck_
Message:

add_option() should always return a boolean, see #18422

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r18559 r18567  
    587587 * @param mixed $deprecated Optional. Description. Not used anymore.
    588588 * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up.
    589  * @return null returns when finished.
     589 * @return bool False if option was not added and true if option was added.
    590590 */
    591591function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
     
    610610    if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
    611611        if ( false !== get_option( $option ) )
    612             return;
     612            return false;
    613613
    614614    $_value = $value;
Note: See TracChangeset for help on using the changeset viewer.