diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-04-01 01:02:02 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-04-01 01:02:02 +0200 |
commit | 8538c04d27c768e7d5e6a5740395fb89163acfc7 (patch) | |
tree | b554bc51f18ecd9e7b64ffe55d5dbf2e107bdb65 | |
parent | 154c418ade563c9d55e7131913e0e63f7b2b5b8b (diff) |
Don't store empty stats.
-rw-r--r-- | Badges_v2.php | 2 |
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) |