diff --git a/wp-includes/functions.php b/wp-includes/functions.php index dce925a677..8ca5ca17de 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4740,7 +4740,9 @@ function reset_mbstring_encoding() { } /** - * Alternative to filter_var( $var, FILTER_VALIDATE_BOOLEAN ). + * Filter/validate a variable as a boolean. + * + * Alternative to `filter_var( $var, FILTER_VALIDATE_BOOLEAN )`. * * @since 4.0.0 * @@ -4752,7 +4754,7 @@ function wp_validate_boolean( $var ) { return $var; } - if ( 'false' === $var ) { + if ( is_string( $var ) && 'false' === strtolower( $var ) ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index b257e972fd..a67ccea9b2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30206'; +$wp_version = '4.1-alpha-30207'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.