WordPress.org

Make WordPress Core

Changeset 18551


Ignore:
Timestamp:
08/16/11 00:21:56 (4 years ago)
Author:
duck_
Message:

Replace regex in path_is_absolute() with simpler equality checks. props coffee2code. fixes #17754

File:
1 edited

Legend:

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

    r18548 r18551  
    21262126 
    21272127    // a path starting with / or \ is absolute; anything else is relative 
    2128     return (bool) preg_match('#^[/\\\\]#', $path); 
     2128    return ( $path[0] == '/' || $path[0] == '\\' ); 
    21292129} 
    21302130 
Note: See TracChangeset for help on using the changeset viewer.