We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f059ab commit 8ef3d6bCopy full SHA for 8ef3d6b
app/models/Video/Quote.php
@@ -39,8 +39,10 @@ public function getYoutubeTimestampAttribute()
39
$bits = explode(':', $this->timeStart);
40
if (count($bits) == 3) {
41
$seconds = ($bits[0] * 60 * 60) + ($bits[1] * 60) + $bits[2];
42
- } else {
+ } else if (count($bits) == 2) {
43
$seconds = ($bits[0] * 60) + $bits[1];
44
+ } else {
45
+ $seconds = $bits[0];
46
}
47
48
return $seconds;
@@ -61,4 +63,4 @@ public function getLinkOnlyAttribute()
61
63
/********************************************************************
62
64
* Extra Methods
65
*******************************************************************/
-}
66
+}
0 commit comments