Merge pull request #18 from JonOfUs/main
Correct faulty timestamp check in episode and subscription list requests
This commit is contained in:
commit
0a62907b40
|
@ -98,7 +98,7 @@ class EpisodeActionController extends Controller {
|
|||
* @return DateTime
|
||||
*/
|
||||
private function createDateTimeFromTimestamp(?int $since): DateTime {
|
||||
return ($since)
|
||||
return ($since !== null)
|
||||
? (new \DateTime)->setTimestamp($since)
|
||||
: (new \DateTime('-1 week'));
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ class SubscriptionChangeController extends Controller {
|
|||
* @return DateTime
|
||||
*/
|
||||
private function createDateTimeFromTimestamp(?int $since): DateTime {
|
||||
return ($since)
|
||||
return ($since !== null)
|
||||
? (new \DateTime)->setTimestamp($since)
|
||||
: (new \DateTime('-1 week'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue