From e4130fcca6a206e2947765630757482aaf0cdbc0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 30 Mar 2011 12:27:25 +0200 Subject: Fix strict standards warnings in "web/html/pkgsubmit.php". end() expects a reference but we pass a function return value here. Using list() is a bit hacky as well as it expects a 0-based array whereas unpack() returns a 1-based array - thus we use "list(, $foo)". Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/html') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 72ada9d..787f4c5 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -30,7 +30,7 @@ if ($_COOKIE["AURSID"]): if (!$error) { $fh = fopen($_FILES['pfile']['tmp_name'], 'rb'); fseek($fh, 0, SEEK_SET); - $magic = end(unpack('v', fread($fh, 2))); + list(, $magic) = unpack('v', fread($fh, 2)); if ($magic != 0x8b1f) { $error = __("Error - unsupported file format (please submit gzip'ed tarballs generated by makepkg(8) only)."); @@ -40,7 +40,7 @@ if ($_COOKIE["AURSID"]): # Check uncompressed file size (ZIP bomb protection) if (!$error && $MAX_FILESIZE_UNCOMPRESSED) { fseek($fh, -4, SEEK_END); - $filesize_uncompressed = end(unpack('V', fread($fh, 4))); + list(, $filesize_uncompressed) = unpack('V', fread($fh, 4)); if ($filesize_uncompressed > $MAX_FILESIZE_UNCOMPRESSED) { $error = __("Error - uncompressed file size too large."); -- cgit v1.2.3-70-g09d2