summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-12-07 10:54:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2019-12-07 14:29:22 +0100
commit21806b861fef8d2bab9f810909e743cd008542af (patch)
treec84744be29b5d164eccb48386a920bbec63f6655
parent818626424d0e5f34d85a20aad2bd12069263852f (diff)
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 <bluewind@xinu.at>
-rw-r--r--NEWS1
-rw-r--r--application/libraries/ExceptionHandler.php2
2 files changed, 2 insertions, 1 deletions
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"]));
}