Make WordPress Core

Ticket #30238: 30238.2.diff

File 30238.2.diff, 639 bytes (added by TobiasBg, 10 years ago)
  • src/wp-includes/functions.php

    diff --git src/wp-includes/functions.php src/wp-includes/functions.php
    index dce925a..8ca5ca1 100644
    function reset_mbstring_encoding() { 
    47404740}
    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
    47464748 *
    function wp_validate_boolean( $var ) { 
    47524754                return $var;
    47534755        }
    47544756
    4755         if ( 'false' === $var ) {
     4757        if ( is_string( $var ) && 'false' === strtolower( $var ) ) {
    47564758                return false;
    47574759        }
    47584760