Add unknown weather data flag

This commit is contained in:
franzz committed 2021-09-05 14:17:18 +02:00
1 parent 47b199702a
commit 51e0565e67
2 files changed
+11 -6

No files matched your search

+4 -1
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);