mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
Merge pull request #3859 from Nicofuma/ticket/13897
[ticket/13897] Make dependency to the filesystem optional in error handler
This commit is contained in:
commit
6dc195e5a7
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