From 2235eb218fcca759a6051ea66ceb42eb2d5fb70f Mon Sep 17 00:00:00 2001 From: Rudie Dirkx <168024+rudiedirkx@users.noreply.github.com> Date: Fri, 18 Feb 2022 23:40:18 +0100 Subject: [PATCH] Fix error handler allowUndefinedVars --- libs/sysplugins/smarty_internal_errorhandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_errorhandler.php b/libs/sysplugins/smarty_internal_errorhandler.php index c2b653ef..28b2d4ea 100644 --- a/libs/sysplugins/smarty_internal_errorhandler.php +++ b/libs/sysplugins/smarty_internal_errorhandler.php @@ -66,7 +66,7 @@ class Smarty_Internal_ErrorHandler */ public function handleError($errno, $errstr, $errfile, $errline, $errcontext = []) { - if ($this->allowUndefinedVars && $errstr == 'Attempt to read property "value" on null') { + if ($this->allowUndefinedVars && preg_match('/^Attempt to read property ".+?" on null$/', $errstr)) { return; // suppresses this error }