diff --git a/Weather/Metar.php b/Weather/Metar.php index 2746aa4..46f6a3b 100644 --- a/Weather/Metar.php +++ b/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"];