From b3ecfda08d12b7164c46c48be5d879ba86c1dffd Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 25 Jun 2015 16:56:25 +0000 Subject: [PATCH] `WP_Rewrite::add_rule()` should strictly check against `false` when using `strpos()`. See #32444. Built from https://develop.svn.wordpress.org/trunk@32941 git-svn-id: http://core.svn.wordpress.org/trunk@32912 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rewrite.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index ce3dbf21d6..cfa6bbec6d 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -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); diff --git a/wp-includes/version.php b/wp-includes/version.php index ab34d4c925..d86a2eeac1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32940'; +$wp_version = '4.3-alpha-32941'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.