From 5a8c1819d963bc78c317b98dd2e77be68bad1549 Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Sat, 9 Sep 2017 16:07:44 +0200 Subject: fix weather widget php7 --- widgets/weather/update_weather.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/widgets/weather/update_weather.php b/widgets/weather/update_weather.php index fba7de9e..31d1df0b 100644 --- a/widgets/weather/update_weather.php +++ b/widgets/weather/update_weather.php @@ -1,6 +1,11 @@ does not exist!\n"; + return 1; +} $ini_array = parse_ini_file($config); $latitude = $ini_array['Latitude']; @@ -27,7 +32,7 @@ $forecast = new ForecastIO($api_key); $condition = $forecast->getCurrentConditions($latitude, $longitude, $units, $lang); if( !$handle = fopen($OUTPUTFLDRTEMP."/weather.0.temp", "w") ) { print "can't create file!\n"; - continue; + return 2; } $temp = round($condition->getTemperature(), 1); if( $convertPoint == 1 ) -- cgit v1.2.3