`is_array( 1, '1-foo' )` returns true, which means that `is_page( 1 )` was returning true when on a page with the slug '1-foo'. We avoid this odd behavior by casting the queried object ID to a string before testing against the value passed to the conditional function. This also helps to avoid a problem where an arbitrary value for `$page` would cause `is_page( $page )` to return true if the query had been manipulated by a plugin to show that the current page's ID is 0. Props boonebgorges, r-a-y, nunomorgadinho, wonderboymusic, clifgriffin. Fixes #24674. Built from https://develop.svn.wordpress.org/trunk@31458 git-svn-id: http://core.svn.wordpress.org/trunk@31439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
130 KiB
130 KiB