Make WordPress Core


Ignore:
Timestamp:
03/14/2004 01:33:03 PM (21 years ago)
Author:
rboren
Message:

Use strpos() instead of preg_match() when searching for $req_uri at the head of the rewrite rule $match. This avoids regex compilation errors when $req_uri contains characters will special regex meaning. strpos() is also faster than preg_match().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r946 r975  
    3434            // If the request URI is the anchor of the match, prepend it
    3535            // to the path info.
    36             if (preg_match("!^$req_uri!", $match)) {
     36            if (strpos($match, $req_uri) === 0) {
    3737                $pathinfomatch = $req_uri . '/' . $pathinfo;
    3838            }
Note: See TracChangeset for help on using the changeset viewer.