Skip to content

Commit 2f81230

Browse files
authored
🐛 Add check for null before passing available_at field to strtotime (#149)
1 parent 6efc192 commit 2f81230

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Parsing/Common/Job.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(array $rawResponse)
5858
}
5959
$this->id = $rawResponse['id'];
6060
$this->status = $rawResponse['status'];
61-
if (array_key_exists('available_at', $rawResponse) && strtotime($rawResponse['available_at'])) {
61+
if (array_key_exists('available_at', $rawResponse) && $rawResponse['available_at'] !== null && strtotime($rawResponse['available_at'])) {
6262
try {
6363
$this->availableAt = new DateTimeImmutable($rawResponse['available_at']);
6464
} catch (\Exception $e) {

0 commit comments

Comments
 (0)