Permalink
Browse files

Bug #19228 Fatal error: Cannot use object of type PEAR_Error

  • Loading branch information...
1 parent 2054c13 commit f6eba327853ee4267737e326bb292ecc1275b698 @CloCkWeRX CloCkWeRX committed Aug 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 Weather/Metar.php
View
@@ -1842,6 +1842,10 @@ function getWeather($id = "", $unitsFormat = "")
// Calculate the moon phase and age
$moon = $this->calculateMoonPhase(strtotime($weatherReturn["updateRaw"]." GMT"));
+ if (Services_Weather::isError($moon)) {
+ return $moon;
+ }
+
$weatherReturn["moon"] = $moon["phase"];
$weatherReturn["moonIcon"] = $moon["icon"];

0 comments on commit f6eba32

Please sign in to comment.