From 17810942b43fd5aa1f51f1922b316bd0916fcf8b Mon Sep 17 00:00:00 2001 From: Zeusking19 Date: Sat, 26 Dec 2015 22:11:17 +0000 Subject: [PATCH] Emergency fix - Can't call format on null object --- app/Track.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Track.php b/app/Track.php index 1ade264f..621d4ea0 100644 --- a/app/Track.php +++ b/app/Track.php @@ -392,7 +392,7 @@ class Track extends Model 'is_downloadable' => $track->is_downloadable, 'is_published' => $track->isPublished(), 'created_at' => $track->created_at->format('c'), - 'published_at' => $track->published_at->format('c'), + 'published_at' => $track->published_at ? $track->published_at->format('c') : null, 'duration' => $track->duration, 'genre_id' => $track->genre_id, 'track_type_id' => $track->track_type_id,