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/tests/phpunit/tests/functions/WpValidateBoolean.php

    r30206 r30207  
    5757        $this->assertFalse( wp_validate_boolean( 'false' ) );
    5858    }
     59
     60    /**
     61     * @ticket 30238
     62     */
     63    public function test_string_false_uppercase() {
     64        // Differs from (bool) conversion.
     65        $this->assertFalse( wp_validate_boolean( 'FALSE' ) );
     66    }
     67
     68    /**
     69     * @ticket 30238
     70     */
     71    public function test_string_false_mixedcase() {
     72        // Differs from (bool) conversion.
     73        $this->assertFalse( wp_validate_boolean( 'FaLsE' ) );
     74    }
    5975}
Note: See TracChangeset for help on using the changeset viewer.