mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/13897] Make dependency to the filesystem optional in error handler
PHPBB3-13897
This commit is contained in:
parent
f6a4843c6d
commit
6af8c579e0
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue