diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index f08f4da52a7ab..4d76ef95bd266 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); + } } /**