summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2008-04-01 01:02:02 +0200
committerHugues Hiegel <hugues@hiegel.fr>2008-04-01 01:02:02 +0200
commit8538c04d27c768e7d5e6a5740395fb89163acfc7 (patch)
treeb554bc51f18ecd9e7b64ffe55d5dbf2e107bdb65
parent154c418ade563c9d55e7131913e0e63f7b2b5b8b (diff)
Don't store empty stats.
-rw-r--r--Badges_v2.php2
1 files changed, 2 insertions, 0 deletions
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)