[aur-dev] [PATCH 1/4] index.php: Fix undefined variable notice
Lukas Fleischer
archlinux at cryptocrack.de
Tue Sep 18 08:24:31 EDT 2012
Spotted when browsing the package details page while being logged out.
Reported-by: canyonknight <canyonknight at gmail.com>
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
web/html/index.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/html/index.php b/web/html/index.php
index 70698a4..2d80a94 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -42,7 +42,10 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
break;
}
- $_POST['token'] = $_COOKIE['AURSID'];
+ if (isset($_COOKIE['AURSID'])) {
+ $_POST['token'] = $_COOKIE['AURSID'];
+ }
+
$_POST['IDs'] = array(pkgid_from_name($tokens[2]) => '1');
}
}
--
1.7.12
More information about the aur-dev
mailing list