Emergency fix - Can't call format on null object

This commit is contained in:
Zeusking19 2015-12-26 22:11:17 +00:00
parent 8282e5752d
commit 17810942b4

View file

@ -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,