Skip to content

Commit fef2e04

Browse files
committed
Trying to fix the city id issue @aseriy.
1 parent d5c0ea8 commit fef2e04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cmfcmf/OpenWeatherMap/WeatherForecast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class WeatherForecast implements \Iterator
7474
*/
7575
public function __construct($xml, $units, $days)
7676
{
77-
$this->city = new City(-1, $xml->location->name, $xml->location->location['longitude'], $xml->location->location['latitude'], $xml->location->country);
77+
$this->city = new City($xml->location->location['geobaseid'], $xml->location->name, $xml->location->location['longitude'], $xml->location->location['latitude'], $xml->location->country);
7878
$this->sun = new Sun(new \DateTime($xml->sun['rise']), new \DateTime($xml->sun['set']));
7979
$this->lastUpdate = new \DateTime($xml->meta->lastupdate);
8080

0 commit comments

Comments
 (0)