fix: take incomplete bpn response data into account

This commit is contained in:
Björn Fromme
2024-02-28 09:30:06 +01:00
parent e3b62ee89d
commit 15d4962307
+2 -2
View File
@@ -221,8 +221,8 @@ class ResponseParser
->setId($id)
->setBusProId($busProId)
->setCode((string) $item->attributes()['code'])
->setCity((string) $item->xpath('ort')[0])
->setStreet((string) $item->xpath('strasse')[0])
->setCity($item->xpath('ort') ? (string) $item->xpath('ort')[0] : null)
->setStreet($item->xpath('strasse') ? (string) $item->xpath('strasse')[0] : '')
;
$pickups[$busProId] = $pickup;
}