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
|
@ -3474,9 +3474,17 @@ function phpbb_filter_root_path($errfile)
|
|||
static $root_path;
|
||||
|
||||
if (empty($root_path))
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue