Skip to content

Commit

Permalink
[BUGFIX] abs() in timezone method fails if arg is simplexmlelement (#154
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ChrisB9 authored Aug 21, 2020
1 parent 7ba829d commit caf8ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cmfcmf/OpenWeatherMap/Util/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct($id, $name = null, $lat = null, $lon = null, $countr
$this->name = isset($name) ? (string)$name : null;
$this->country = isset($country) ? (string)$country : null;
$this->population = isset($population) ? (int)$population : null;
$this->timezone = isset($timezoneOffset) ? new \DateTimeZone(self::timezoneOffsetInSecondsToHours($timezoneOffset)) : null;
$this->timezone = isset($timezoneOffset) ? new \DateTimeZone(self::timezoneOffsetInSecondsToHours((int)$timezoneOffset)) : null;

parent::__construct($lat, $lon);
}
Expand Down

0 comments on commit caf8ea1

Please sign in to comment.