diff options
author | Máté Bartus <mate.bartus@gmail.com> | 2015-08-28 09:58:44 +0200 |
---|---|---|
committer | Máté Bartus <mate.bartus@gmail.com> | 2015-08-28 09:58:44 +0200 |
commit | 6dc195e5a7a521478502680d4fb168ec03e13422 (patch) | |
tree | 87ff3aad53863bae25d268cef2a7543d72961a18 | |
parent | 3babe0254030c4f537b954f8ddf933dd976f16ea (diff) | |
parent | 6af8c579e0162064785c1b729389bdfd41beba95 (diff) | |
download | forums-6dc195e5a7a521478502680d4fb168ec03e13422.tar forums-6dc195e5a7a521478502680d4fb168ec03e13422.tar.gz forums-6dc195e5a7a521478502680d4fb168ec03e13422.tar.bz2 forums-6dc195e5a7a521478502680d4fb168ec03e13422.tar.xz forums-6dc195e5a7a521478502680d4fb168ec03e13422.zip |
Merge pull request #3859 from Nicofuma/ticket/13897
[ticket/13897] Make dependency to the filesystem optional in error handler
-rw-r--r-- | phpBB/includes/functions.php | 10 |
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); |