Make WordPress Core


Ignore:
Timestamp:
11/03/2014 03:54:42 PM (10 years ago)
Author:
boonebgorges
Message:

Ignore case when checking string 'false' in wp_validate_boolean().

Props TobiasBg, kitchin.
Fixes #30238.

File:
1 edited

Legend:

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

    r30191 r30207  
    47414741
    47424742/**
    4743  * Alternative to filter_var( $var, FILTER_VALIDATE_BOOLEAN ).
     4743 * Filter/validate a variable as a boolean.
     4744 *
     4745 * Alternative to `filter_var( $var, FILTER_VALIDATE_BOOLEAN )`.
    47444746 *
    47454747 * @since 4.0.0
     
    47534755    }
    47544756
    4755     if ( 'false' === $var ) {
     4757    if ( is_string( $var ) && 'false' === strtolower( $var ) ) {
    47564758        return false;
    47574759    }
Note: See TracChangeset for help on using the changeset viewer.