WordPress.org

Support

Support » How-To and Troubleshooting » get_option() buggy with FALSE

get_option() buggy with FALSE

  • update_option('myboolean', FALSE);
    $option = get_option('myboolean', 'default');

    Question: what is the value of $option?

    It should be FALSE, because that is the value that is set by the user in the database. However, all boolean FALSE values seem to return the $default parameter. The $default parameter should only be returned when the option does not exist in the database. Right?

    http://codex.wordpress.org/Function_Reference/get_option

  • The topic ‘get_option() buggy with FALSE’ is closed to new replies.
Skip to toolbar