Skip to content

Commit

Permalink
Bug #19228 Fatal error: Cannot use object of type PEAR_Error
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Aug 13, 2012
1 parent 2054c13 commit f6eba32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Weather/Metar.php
Expand Up @@ -1842,6 +1842,10 @@ function getWeather($id = "", $unitsFormat = "")


// Calculate the moon phase and age // Calculate the moon phase and age
$moon = $this->calculateMoonPhase(strtotime($weatherReturn["updateRaw"]." GMT")); $moon = $this->calculateMoonPhase(strtotime($weatherReturn["updateRaw"]." GMT"));
if (Services_Weather::isError($moon)) {
return $moon;
}

$weatherReturn["moon"] = $moon["phase"]; $weatherReturn["moon"] = $moon["phase"];
$weatherReturn["moonIcon"] = $moon["icon"]; $weatherReturn["moonIcon"] = $moon["icon"];


Expand Down

0 comments on commit f6eba32

Please sign in to comment.