From 46d0520c70e5d73a53d90bb17c783568bb2fb823 Mon Sep 17 00:00:00 2001 From: borisneubert Date: Sun, 29 Jul 2012 13:31:09 +0000 Subject: [PATCH] Aleksandar Lazic's patch to handle GetFileFromURL returning nothing git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1767 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/59_Weather.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FHEM/59_Weather.pm b/FHEM/59_Weather.pm index 488c43c83..4e89f1721 100755 --- a/FHEM/59_Weather.pm +++ b/FHEM/59_Weather.pm @@ -121,7 +121,7 @@ sub Weather_RetrieveDataDirectly($) my $fc = undef; my $xml = GetFileFromURL("http://www.google.com/ig/api?weather=" . $location . "&hl=" . $lang); - return 0 if($xml eq ""); + return 0 if( ! defined $xml || $xml eq ""); foreach my $l (split("<",$xml)) { #Log 1, "DEBUG WEATHER: line=\"$l\""; next if($l eq ""); # skip empty lines