summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-03-30 12:27:25 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-03-30 12:28:17 +0200
commite4130fcca6a206e2947765630757482aaf0cdbc0 (patch)
treeae0716452180346ee9de63e2e444b348b2715cf2 /web
parent47faf88f14bd420163e29e3cd583e741e63ce929 (diff)
downloadaur-e4130fcca6a206e2947765630757482aaf0cdbc0.tar.gz
aur-e4130fcca6a206e2947765630757482aaf0cdbc0.tar.xz
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 <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/html/pkgsubmit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 72ada9d2..787f4c5c 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.");