Ticket #17754: 17754.2.diff
| File 17754.2.diff, 414 bytes (added by coffee2code, 2 years ago) |
|---|
| Line | |
|---|---|
| 1 | Index: wp-includes/functions.php |
| 2 | =================================================================== |
| 3 | --- wp-includes/functions.php (revision 18235) |
| 4 | +++ wp-includes/functions.php (working copy) |
| 5 | @@ -2129,7 +2129,7 @@ |
| 6 | return true; |
| 7 | |
| 8 | // a path starting with / or \ is absolute; anything else is relative |
| 9 | - return (bool) preg_match('#^[/\\\\]#', $path); |
| 10 | + return ( $path[0] == '/' || $path[0] == '\\' ); |
| 11 | } |
| 12 | |
| 13 | /** |
