Skip to content
Snippets Groups Projects
Commit fed6fccb authored by Anika Henke's avatar Anika Henke
Browse files

fixed media upload not working with QuickPHP (FS#2531 + FS#2673)

parent a9b6a8b5
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment