summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2013-02-16 13:33:01 +0000
committerAnika Henke <anika@selfthinker.org>2013-02-16 13:33:25 +0000
commitfed6fccbc7ab83ed9c5a79f484d8a6664cb95bc3 (patch)
tree7e5ffdb9fd70e2de99b80cce60c99ae075f59c4c /inc
parenta9b6a8b59a0be9ff45f5675c3b032ad8d2afd6eb (diff)
downloadrpg-fed6fccbc7ab83ed9c5a79f484d8a6664cb95bc3.tar.gz
rpg-fed6fccbc7ab83ed9c5a79f484d8a6664cb95bc3.tar.bz2
fixed media upload not working with QuickPHP (FS#2531 + FS#2673)
Diffstat (limited to 'inc')
-rw-r--r--inc/media.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/inc/media.php b/inc/media.php
index 7e1b2152d..bd80db577 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -237,8 +237,7 @@ function media_upload_xhr($ns,$auth){
$realSize = stream_copy_to_stream($input, $target);
fclose($target);
fclose($input);
- if ($realSize != (int)$_SERVER["CONTENT_LENGTH"]){
- unlink($target);
+ if (isset($_SERVER["CONTENT_LENGTH"]) && ($realSize != (int)$_SERVER["CONTENT_LENGTH"])){
unlink($path);
return false;
}