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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
duck_ 2011-08-16 00:21:56 +00:00
parent 51d2aef086
commit 7abbb42d7e
1 changed files with 1 additions and 1 deletions

View File

@ -2125,7 +2125,7 @@ function path_is_absolute( $path ) {
return true;
// a path starting with / or \ is absolute; anything else is relative
return (bool) preg_match('#^[/\\\\]#', $path);
return ( $path[0] == '/' || $path[0] == '\\' );
}
/**