From 8538c04d27c768e7d5e6a5740395fb89163acfc7 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 1 Apr 2008 01:02:02 +0200 Subject: Don't store empty stats. --- Badges_v2.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Badges_v2.php b/Badges_v2.php index 425b4d5..9cc935d 100644 --- a/Badges_v2.php +++ b/Badges_v2.php @@ -42,6 +42,8 @@ if ( ! is_file($Stats) { system("wget -q --no-cache http://ws.audioscrobbler.com/1.0/user/".rawurlencode($username)."/profile.xml -O $Stats.tmp"); system("mv $Stats.tmp $Stats"); + if (!filesize($Stats)) + system("rm $Stats"); } if ( is_file($Cache) -- cgit v1.2.3