mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
0809037f614c8dbd509099663bc9082a4140cfa5
is_*( $int ) should not falsely match strings starting with "$int".
Another chapter in the Storied Annals of Weird `in_array()` Behavior: `in_array( 4, array( "4-cool-dudes" ) );` resolves to `true`, such that `is_page( 4 )` was returning true for posts with the name `'4-cool-dudes'`. We work around this behavior by ensuring that values passed to the `is_` methods are cast to strings before the `in_array()` checks. ID checks still work as expected; see #24674. Props mikejolley, swissspidy, boonebgorges. Fixes #35902. git-svn-id: https://develop.svn.wordpress.org/trunk@36625 602fd350-edb4-49c9-b593-d223f7449a82
Description
No description provided
Languages
PHP
80.5%
CSS
9.4%
JavaScript
8.5%
SCSS
0.9%
HTML
0.7%