1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[ticket/11545] Remove DIRECTORY_SEPARATOR dependency from is_absolute

The given path is an absolute path in general, just not on our current system.

PHPBB3-11545
This commit is contained in:
Joas Schilling
2013-05-16 17:30:23 +02:00
parent c6de880cdb
commit 38dbfc17a7
2 changed files with 28 additions and 7 deletions

View File

@@ -1005,7 +1005,7 @@ if (!function_exists('stripos'))
*/
function is_absolute($path)
{
return (isset($path[0]) && $path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:[/\\\]#i', $path))) ? true : false;
return (isset($path[0]) && $path[0] == '/' || preg_match('#^[a-z]:[/\\\]#i', $path)) ? true : false;
}
/**