From cc592d7ea1a6b89c41b6db8a73f5ce159b49459b Mon Sep 17 00:00:00 2001 From: Legacy <52163001+3m1n3nc3@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:28:33 +0100 Subject: [PATCH] Add isset to $attributes['name'] call to prevent error when attribute is missing. --- src/Traits/Messagable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/Messagable.php b/src/Traits/Messagable.php index feb9a46..ef44325 100644 --- a/src/Traits/Messagable.php +++ b/src/Traits/Messagable.php @@ -129,7 +129,7 @@ public function favourites() */ public function getNameAttribute() { - if($this->attributes['name']) + if(isset($this->attributes['name'])) return $this->attributes['name']; if($this->username)