Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit f6eba327853ee4267737e326bb292ecc1275b698 1 parent 2054c13
@CloCkWeRX CloCkWeRX authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Weather/Metar.php
View
4 Weather/Metar.php
@@ -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.
Something went wrong with that request. Please try again.