Make WordPress Core

Changeset 32941


Ignore:
Timestamp:
06/25/2015 04:55:35 PM (9 years ago)
Author:
wonderboymusic
Message:

WP_Rewrite::add_rule() should strictly check against false when using strpos().

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rewrite.php

    r32650 r32941  
    20412041    public function add_rule($regex, $redirect, $after = 'bottom') {
    20422042        //get everything up to the first ?
    2043         $index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?'));
     2043        $index = (strpos($redirect, '?') === false ? strlen($redirect) : strpos($redirect, '?'));
    20442044        $front = substr($redirect, 0, $index);
    20452045        if ( $front != $this->index ) { //it doesn't redirect to WP's index.php
Note: See TracChangeset for help on using the changeset viewer.