mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/11546] Fix is_absolute() throws E_NOTICE for empty string
This commit is contained in:
commit
44c4c3ed98
2 changed files with 2 additions and 1 deletions
|
@ -846,7 +846,7 @@ function phpbb_is_writable($file)
|
|||
*/
|
||||
function phpbb_is_absolute($path)
|
||||
{
|
||||
return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:[/\\\]#i', $path))) ? true : false;
|
||||
return (isset($path[0]) && $path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:[/\\\]#i', $path))) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,6 +14,7 @@ class phpbb_functions_is_absolute_test extends phpbb_test_case
|
|||
static public function is_absolute_data()
|
||||
{
|
||||
return array(
|
||||
array('', false),
|
||||
array('/etc/phpbb', true),
|
||||
array('etc/phpbb', false),
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue