mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[ticket/10369] Rename filter_errfile() to filter_root_path().
PHPBB3-10369
This commit is contained in:
parent
9006984d5a
commit
1ad97424a4
2 changed files with 4 additions and 4 deletions
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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 '<b>[phpBB Debug] ' . $error_name . '</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue