Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Sep 21, 2018
1 parent c3d86ed commit c942359
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Weather.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@ public function getWeather($city, $type = 'base', $format = 'json')
throw new InvalidArgumentException('Invalid type value(base/all): '.$type);
}

$format = \strtolower($format);
$type = \strtolower($type);

$query = array_filter([
'key' => $this->key,
'city' => $city,
'output' => \strtolower($format),
'extensions' => \strtolower($type),
'output' => $format,
'extensions' => $type,
]);

try {
Expand Down

0 comments on commit c942359

Please sign in to comment.