From 66c685b385ef4a3a8296704461b669bd83c8a260 Mon Sep 17 00:00:00 2001 From: Andreas Neustifter Date: Fri, 20 Jul 2018 21:57:14 +0200 Subject: [PATCH] [curweather] Reset session's curweather_notice_shown when weather available again. --- curweather/curweather.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/curweather/curweather.php b/curweather/curweather.php index 6e03dd40..fe506ca3 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -35,11 +35,12 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0) $res = new SimpleXMLElement(Network::fetchUrl($url)); } catch (Exception $e) { if (!$_SESSION['curweather_notice_shown']) { - info(L10n::t('Error fetching weather data.\nError was: '.$e->getMessage())); + info(L10n::t('Error fetching weather data. Error was: '.$e->getMessage())); $_SESSION['curweather_notice_shown'] = true; } return false; } + unset($_SESSION['curweather_notice_shown']); if ((string)$res->temperature['unit']==='metric') { $tunit = '°C'; $wunit = 'm/s';