mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[ticket/13897] Make dependency to the filesystem optional in error handler
PHPBB3-13897
This commit is contained in:
@@ -3475,7 +3475,15 @@ function phpbb_filter_root_path($errfile)
|
|||||||
|
|
||||||
if (empty($root_path))
|
if (empty($root_path))
|
||||||
{
|
{
|
||||||
$root_path = $phpbb_filesystem->realpath(dirname(__FILE__) . '/../');
|
if ($phpbb_filesystem)
|
||||||
|
{
|
||||||
|
$root_path = $phpbb_filesystem->realpath(dirname(__FILE__) . '/../');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$filesystem = new \phpbb\filesystem\filesystem();
|
||||||
|
$root_path = $filesystem->realpath(dirname(__FILE__) . '/../');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return str_replace(array($root_path, '\\'), array('[ROOT]', '/'), $errfile);
|
return str_replace(array($root_path, '\\'), array('[ROOT]', '/'), $errfile);
|
||||||
|
Reference in New Issue
Block a user