summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2010-11-02 23:01:51 +0100
committerHugues Hiegel <hugues@hiegel.fr>2010-11-02 23:01:51 +0100
commit94082a3769dc7a61cde454ec6ea7af9dff718caa (patch)
tree187b2ad36b3f727f03fe67abd5f7e6f73d970ee4
parent1341d0d54eaae0d60290808771e8b335bac4adc6 (diff)
Network error proof.
-rw-r--r--BigLine.php6
1 files 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;