diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index b7e1c7b7bf8..632394c135e 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -182,7 +182,9 @@ class Internal extends Session { * @throws \ErrorException */ public function trapError(int $errorNumber, string $errorString) { - throw new \ErrorException($errorString); + if ($errorNumber & E_ERROR) { + throw new \ErrorException($errorString); + } } /**