mirror of
https://github.com/flarum/framework.git
synced 2025-01-22 23:40:45 +08: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
1114de5338
commit
2d3f1d9f5c
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user