From 555aa35c347df756bc00a04b13eb2db0f796a4b7 Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Sun, 28 Aug 2016 00:39:24 +0100 Subject: [PATCH] Fixed notification thumbnail url being null --- app/Models/Activity.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Models/Activity.php b/app/Models/Activity.php index f9c1661f..4fcdebda 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -151,6 +151,9 @@ class Activity extends Model { public function getThumbnailUrlAttribute() { + if (!is_null($this->resource)) + return "/images/icons/profile_small.png"; + switch ($this->resource_type) { case User::class: return $this->resource->getAvatarUrl(Image::THUMBNAIL);