Skip to content

Commit

Permalink
Prevent fataling out if station data is not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Aug 8, 2016
1 parent e254170 commit d291066
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions framework/Service_Weather/lib/Horde/Service/Weather/Wwo.php
Expand Up @@ -234,6 +234,9 @@ protected function _getCommonElements($location, $length = Horde_Service_Weather
// Use the minimum station data provided by forecast request to
// fetch the full station data.
$station = $this->_parseStation($results->data->nearest_area[0]);
if (empty($station)) {
throw new Horde_Service_Weather_Exception('Location not found.');
}
$station = $this->searchLocations($station->lat . ',' . $station->lon);

// Hack some data to allow UTC observation time to be returned.
Expand Down

0 comments on commit d291066

Please sign in to comment.