1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/10369] DRY code to remove phpbb path from errfile.

PHPBB3-10369
This commit is contained in:
Andreas Fischer
2011-09-18 22:20:20 +02:00
parent 7b3f6cb219
commit 9006984d5a
2 changed files with 24 additions and 6 deletions

View File

@@ -42,8 +42,6 @@ class phpbb_error_collector
function format_errors()
{
$phpbb_root_path = phpbb_realpath(dirname(__FILE__) . '/../');
$text = '';
foreach ($this->errors as $error)
{
@@ -55,7 +53,7 @@ class phpbb_error_collector
list($errno, $msg_text, $errfile, $errline) = $error;
// Prevent leakage of local path to phpBB install
$errfile = str_replace(array($phpbb_root_path, '\\'), array('', '/'), $errfile);
$errfile = phpbb_filter_errfile($errfile);
$text .= "Errno $errno: $msg_text at $errfile line $errline";
}