mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
fixed error_handler
This commit is contained in:
@@ -1298,16 +1298,16 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
|||||||
public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
|
public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
|
||||||
{
|
{
|
||||||
static $directory = null;
|
static $directory = null;
|
||||||
static $lenght = null;
|
static $length = null;
|
||||||
|
|
||||||
if ($base === null) {
|
if ($directory === null) {
|
||||||
$base = realpath(SMARTY_DIR);
|
$directory = realpath(SMARTY_DIR);
|
||||||
$length = strlen($base);
|
$length = strlen($directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
// pass to next error handler if this error did not occur inside SMARTY_DIR
|
// pass to next error handler if this error did not occur inside SMARTY_DIR
|
||||||
// or the error was within smarty but masked to be ignored
|
// or the error was within smarty but masked to be ignored
|
||||||
if (strncmp($errfile, $base, $length) || ($errno && $errno & error_reporting())) {
|
if (strncmp($errfile, $directory, $length) || ($errno && $errno & error_reporting())) {
|
||||||
if (Smarty::$_previous_error_handler) {
|
if (Smarty::$_previous_error_handler) {
|
||||||
return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, $errcontext);
|
return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, $errcontext);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user