From c99ec8fc54a4e9e35a3020c0ec9f9210de347449 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Fri, 18 Dec 2015 05:33:30 -0800 Subject: [PATCH] #39: Fixed a typing issue with database results. --- app/Track.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Track.php b/app/Track.php index a9afdd3d..2882db92 100644 --- a/app/Track.php +++ b/app/Track.php @@ -614,17 +614,17 @@ class Track extends Model */ public function getStatusAttribute(){ return $this->trackFiles->reduce(function($carry, $trackFile){ - if($trackFile->status === TrackFile::STATUS_PROCESSING_ERROR) { + if((int) $trackFile->status === TrackFile::STATUS_PROCESSING_ERROR) { return static::STATUS_ERROR; } elseif ( $carry !== static::STATUS_ERROR && - $trackFile->status === TrackFile::STATUS_PROCESSING) { + (int) $trackFile->status === TrackFile::STATUS_PROCESSING) { return static::STATUS_PROCESSING; } elseif ( !in_array($carry, [static::STATUS_ERROR, static::STATUS_PROCESSING]) && - $trackFile->status === TrackFile::STATUS_NOT_BEING_PROCESSED + (int) $trackFile->status === TrackFile::STATUS_NOT_BEING_PROCESSED ) { return static::STATUS_COMPLETE;