[aur-dev] [PATCH] Fix a PHP "Undefined index" notice
Lukas Fleischer
lfleischer at archlinux.org
Sat Oct 3 09:16:25 UTC 2015
Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
web/html/packages.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/html/packages.php b/web/html/packages.php
index 38a2e29..1b89278 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -21,7 +21,11 @@ if (!isset($pkgid) || !isset($pkgname)) {
$details = array();
if (isset($pkgid)) {
$details = pkg_get_details($pkgid);
- $pkgname = $details['Name'];
+ if (isset($details['Name'])) {
+ $pkgname = $details['Name'];
+ } else {
+ $pkgname = null;
+ }
} else {
unset($pkgname);
}
--
2.6.0
More information about the aur-dev
mailing list