mirror of
https://github.com/flarum/core.git
synced 2025-06-06 22:55:11 +02:00
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.
This commit is contained in:
parent
c32af6559e
commit
986d811a16
@ -102,7 +102,7 @@ class Notification extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public function getSubjectModelAttribute()
|
public function getSubjectModelAttribute()
|
||||||
{
|
{
|
||||||
return array_get(static::$subjectModels, $this->type);
|
return $this->type ? array_get(static::$subjectModels, $this->type) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user