aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c6d63e13f4..0be3e289e2 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3475,7 +3475,15 @@ function phpbb_filter_root_path($errfile)
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);