From d0f8b285e4b87743bc6795dac6a7b4875649aed6 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 3 Oct 2015 11:15:33 +0200 Subject: Fix a PHP "Undefined index" notice Signed-off-by: Lukas Fleischer --- web/html/packages.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web') 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); } -- cgit v1.2.3-70-g09d2