aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/media.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2022-11-10 11:52:58 +0100
committerAndreas Gohr <andi@splitbrain.org>2022-11-10 11:52:58 +0100
commit2b9be4565f8205c2186c4b537e1fa49846bf2fe9 (patch)
tree72399e7fd3b902c3e6165d8249ed6260e5eb3e6f /inc/media.php
parent6b0322a5eadad417ffeb24ef67a56287918cec7e (diff)
downloaddokuwiki-2b9be4565f8205c2186c4b537e1fa49846bf2fe9.tar.gz
dokuwiki-2b9be4565f8205c2186c4b537e1fa49846bf2fe9.zip
some more fixes for undefined vars
This makes more use of $INPUT to access $_SERVER and fixes a warning in one of the search methods.
Diffstat (limited to 'inc/media.php')
-rw-r--r--inc/media.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/media.php b/inc/media.php
index e9841a65e..4cab5603d 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -308,7 +308,7 @@ function media_upload_xhr($ns,$auth){
$realSize = stream_copy_to_stream($input, $target);
fclose($target);
fclose($input);
- if (isset($_SERVER["CONTENT_LENGTH"]) && ($realSize != (int)$_SERVER["CONTENT_LENGTH"])){
+ if ($INPUT->server->has('CONTENT_LENGTH') && ($realSize != $INPUT->server->int('CONTENT_LENGTH'))) {
unlink($path);
return false;
}