WP_Rewrite::add_rule()
should strictly check against false
when using strpos()
.
See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32941 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9cef023a96
commit
cd188f40d1
@ -2040,7 +2040,7 @@ class WP_Rewrite {
|
||||
*/
|
||||
public function add_rule($regex, $redirect, $after = 'bottom') {
|
||||
//get everything up to the first ?
|
||||
$index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?'));
|
||||
$index = (strpos($redirect, '?') === false ? strlen($redirect) : strpos($redirect, '?'));
|
||||
$front = substr($redirect, 0, $index);
|
||||
if ( $front != $this->index ) { //it doesn't redirect to WP's index.php
|
||||
$this->add_external_rule($regex, $redirect);
|
||||
|
Loading…
Reference in New Issue
Block a user