From 21806b861fef8d2bab9f810909e743cd008542af Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 7 Dec 2019 10:54:58 +0100 Subject: ExceptionHandler: Fix null object array access error Not sure why, but this only started to happen with php 7.4. Should be fixed anyways so I didn't investigate further. Signed-off-by: Florian Pritz --- NEWS | 1 + application/libraries/ExceptionHandler.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e16312ffc..dfb86d350 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ This file lists major, incompatible or otherwise important changes, you should look at it after every update. NEXT + - PHP 7.4 compatibility fixes 3.4.2 2019-12-06 - PHP 7.4 compatibility fixes diff --git a/application/libraries/ExceptionHandler.php b/application/libraries/ExceptionHandler.php index 94a1d35c0..75cbb5c66 100644 --- a/application/libraries/ExceptionHandler.php +++ b/application/libraries/ExceptionHandler.php @@ -139,7 +139,7 @@ class ExceptionHandler { static public function check_for_fatal() { $error = error_get_last(); - if ($error["type"] == E_ERROR) { + if (isset($error) && $error["type"] == E_ERROR) { self::exception_handler(new \ErrorException( $error["message"], 0, $error["type"], $error["file"], $error["line"])); } -- cgit v1.2.3-24-g4f1b