diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index f02f1c2541c..285b6fd7960 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -181,7 +181,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); + } } /**