aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-08-24 23:09:52 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-08-25 21:44:40 +0200
commit6af8c579e0162064785c1b729389bdfd41beba95 (patch)
tree3e75372a721c86290eadc6a9220e068a16e6175c
parentf6a4843c6df3a9b0490eb3d273ebed7d04a89582 (diff)
downloadforums-6af8c579e0162064785c1b729389bdfd41beba95.tar
forums-6af8c579e0162064785c1b729389bdfd41beba95.tar.gz
forums-6af8c579e0162064785c1b729389bdfd41beba95.tar.bz2
forums-6af8c579e0162064785c1b729389bdfd41beba95.tar.xz
forums-6af8c579e0162064785c1b729389bdfd41beba95.zip
[ticket/13897] Make dependency to the filesystem optional in error handler
PHPBB3-13897
-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);