From 2d3f1d9f5cf78a3c5911b8e1cf0fe890c0e77445 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 21 Sep 2018 11:22:26 +0930 Subject: [PATCH] Fix notifications crash When loading notifications, $this->type was null and thus array_get was returning an array instead of null. I assume this issue was introduced in a Laravel version upgrade? Anyway, this fixes it. --- framework/core/src/Notification/Notification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Notification/Notification.php b/framework/core/src/Notification/Notification.php index eab6ad5db..33e3f98a7 100644 --- a/framework/core/src/Notification/Notification.php +++ b/framework/core/src/Notification/Notification.php @@ -102,7 +102,7 @@ class Notification extends AbstractModel */ public function getSubjectModelAttribute() { - return array_get(static::$subjectModels, $this->type); + return $this->type ? array_get(static::$subjectModels, $this->type) : null; } /**