Bladeren bron

Update NotificationTransformer

Daniel Supernault 6 jaren geleden
bovenliggende
commit
705d4ef942
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      app/Transformer/Api/NotificationTransformer.php

+ 1 - 1
app/Transformer/Api/NotificationTransformer.php

@@ -31,7 +31,7 @@ class NotificationTransformer extends Fractal\TransformerAbstract
 	public function includeStatus(Notification $notification)
 	{
 		$item = $notification->item;
-		if(get_class($item) === 'App\Status') {
+		if(is_object($item) && get_class($item) === 'App\Status') {
 			return $this->item($item, new StatusTransformer());
 		} else {
 			return null;