Skip to content

Commit 517c376

Browse files
authored
Add null check for available_at in Job.php
1 parent 6efc192 commit 517c376

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) && null !== $rawResponse['available_at'] && strtotime($rawResponse['available_at'])) {
6262
try {
6363
$this->availableAt = new DateTimeImmutable($rawResponse['available_at']);
6464
} catch (\Exception $e) {

0 commit comments

Comments
 (0)