diff --git a/phpBB/includes/error_collector.php b/phpBB/includes/error_collector.php
index 040be4dd13..3c0a89a1f3 100644
--- a/phpBB/includes/error_collector.php
+++ b/phpBB/includes/error_collector.php
@@ -53,7 +53,7 @@ class phpbb_error_collector
list($errno, $msg_text, $errfile, $errline) = $error;
// Prevent leakage of local path to phpBB install
- $errfile = phpbb_filter_errfile($errfile);
+ $errfile = phpbb_filter_root_path($errfile);
$text .= "Errno $errno: $msg_text at $errfile line $errline";
}
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 4c1bfb4360..cd856f55a7 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3816,8 +3816,8 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
{
- $errfile = phpbb_filter_errfile($errfile);
- $msg_text = phpbb_filter_errfile($msg_text);
+ $errfile = phpbb_filter_root_path($errfile);
+ $msg_text = phpbb_filter_root_path($msg_text);
$error_name = ($errno === E_WARNING) ? 'PHP Warning' : 'PHP Notice';
echo '[phpBB Debug] ' . $error_name . ': in file ' . $errfile . ' on line ' . $errline . ': ' . $msg_text . '
' . "\n";
@@ -4004,7 +4004,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
* @return string Relative file path
* (e.g. /includes/functions.php)
*/
-function phpbb_filter_errfile($errfile)
+function phpbb_filter_root_path($errfile)
{
static $root_path;