diff --git a/lib/Transport/Entity/Schedule/Connection.php b/lib/Transport/Entity/Schedule/Connection.php index 5f7691f..71b4d1d 100644 --- a/lib/Transport/Entity/Schedule/Connection.php +++ b/lib/Transport/Entity/Schedule/Connection.php @@ -154,7 +154,7 @@ public static function createFromJson($json, self $obj = null) $obj->to->platform = $json->legs[count($json->legs) - 2]->exit->track; } - $obj->duration = gmdate('0z\dH:i:s', $json->duration); + $obj->duration = gmdate('0z\dH:i:s', $json->duration ?? 0); $numberOfVehicles = 0; foreach ($json->legs as $leg) {