summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-01 12:02:29 +0200
committerandi <andi@splitbrain.org>2005-05-01 12:02:29 +0200
commitcbe3402474d1a9f6a563d717ff38d0120425c184 (patch)
tree3f3e653e6d2bb235bed39a5820daf668c0e62b6e
parent41a73dcf430e1fb9be61672bfc605626f9ade6c9 (diff)
downloadrpg-cbe3402474d1a9f6a563d717ff38d0120425c184.tar.gz
rpg-cbe3402474d1a9f6a563d717ff38d0120425c184.tar.bz2
handle bad permission with a 500
darcs-hash:20050501100229-9977f-ad3b4a20b5f703659310141098b049586e2dccb4.gz
-rw-r--r--fetch.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/fetch.php b/fetch.php
index d61962051..2e11a3b06 100644
--- a/fetch.php
+++ b/fetch.php
@@ -76,8 +76,13 @@
$fp = @fopen($FILE,"rb");
- fpassthru($fp);
- fclose($fp);
+ if($fp){
+ fpassthru($fp);
+ fclose($fp);
+ }else{
+ header("HTTP/1.0 500 Internal Server Error");
+ print "Could not read $FILE - bad permissions?";
+ }
/* ------------------------------------------------------------------------ */