diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/sysplugins/smarty_internal_errorhandler.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/sysplugins/smarty_internal_errorhandler.php b/libs/sysplugins/smarty_internal_errorhandler.php index f5abbf28..cb19070d 100644 --- a/libs/sysplugins/smarty_internal_errorhandler.php +++ b/libs/sysplugins/smarty_internal_errorhandler.php @@ -66,12 +66,16 @@ 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 "value" on null|Trying to get property (\'value\' )?of non-object)/', + $errstr + )) { return; // suppresses this error } if ($this->allowUndefinedArrayKeys && preg_match( - '/^(Undefined index|Undefined array key|Trying to access array offset on value of type null)/', + '/^(Undefined index|Undefined array key|Trying to access array offset on value of type (null|bool))/', $errstr )) { return; // suppresses this error |
