Skip to content

Commit

Permalink
Test for data, output message if not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 7, 2016
1 parent fe72790 commit 80d5cd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions horde/lib/Block/Metar.php
Expand Up @@ -123,6 +123,13 @@ protected function _content()
{
global $injector, $prefs;

try {
$this->_weather->autocompleteLocation('test');
} catch (Horde_Db_Exception $e) {
return _("No metar station data found. Contact administrator to
run the horde-service-weather-metar-database script.");
}

// Set up the weather driver.
$this->_weather->units = $this->_params['units'];
$units = $this->_weather->getUnits();
Expand Down

0 comments on commit 80d5cd3

Please sign in to comment.