WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/07/2007 05:29:15 AM (13 years ago)
Author:
markjaquith
Message:

Use strpos instead of strstr where ever possible, for speed. Props rob1n. fixes #3920

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r4979 r4990  
    121121
    122122            // If req_uri is empty or if it is a request for ourself, unset error.
    123             if ( empty($request) || $req_uri == $self || strstr($_SERVER['PHP_SELF'], 'wp-admin/') ) {
     123            if (empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) {
    124124                if (isset($_GET['error']))
    125125                    unset($_GET['error']);
     
    128128                    unset($error);
    129129
    130                 if ( isset($perma_query_vars) && strstr($_SERVER['PHP_SELF'], 'wp-admin/') )
     130                if (isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false)
    131131                    unset($perma_query_vars);
    132132
Note: See TracChangeset for help on using the changeset viewer.