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