Add unknown weather data flag

This commit is contained in:
2021-09-05 14:17:18 +02:00
parent 47b199702a
commit 51e0565e67
2 changed files with 11 additions and 6 deletions

View File

@@ -237,11 +237,14 @@ class Feed extends PhpObject {
$sWeatherCond = $asWeather['currentConditions']['conditions'];
$sWeatherTemp = $asWeather['currentConditions']['temp'];
}
else { //Daily Conditions
elseif($asWeather['days'][0]['icon'] != '') { //Daily Conditions
$sWeatherIcon = $asWeather['days'][0]['icon'];
$sWeatherCond = $asWeather['days'][0]['conditions'];
$sWeatherTemp = $asWeather['days'][0]['temp'];
}
else {
$sWeatherIcon = 'unknown';
}
//Get Condition ID
$sCondKey = (new Translator(self::WEATHER_PARAM['lang']))->getTranslationKey($sWeatherCond);