From 94082a3769dc7a61cde454ec6ea7af9dff718caa Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 2 Nov 2010 23:01:51 +0100 Subject: Network error proof. --- BigLine.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BigLine.php b/BigLine.php index bef26ad..ac8c40f 100644 --- a/BigLine.php +++ b/BigLine.php @@ -224,7 +224,7 @@ else { touch_badge($username, $type, $style, $color); header("Content-Type: image/png"); - echo file_get_contents($Cache); + echo @file_get_contents($Cache); } } @@ -257,10 +257,10 @@ function SendCacheHeaders($lastmodified, $maxage, $limit="public") function make_db_cache($username){ global $data; - $profile_xml = file_get_contents("http://ws.audioscrobbler.com/1.0/user/".rawurlencode($username)."/profile.xml"); + $profile_xml = @file_get_contents("http://ws.audioscrobbler.com/1.0/user/".rawurlencode($username)."/profile.xml"); $feed=new XMLReader(); - if($feed->xml($profile_xml)){ + if($profile_xml && $feed->xml($profile_xml)){ $modified = FALSE; -- cgit v1.2.3