From d142ca405301c88f9467ba2aa9534952d336095e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 4 Apr 2011 23:31:19 +0200 Subject: Fix PHP warning when browsing a non-existent package. Signed-off-by: Lukas Fleischer --- web/html/packages.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'web/html') diff --git a/web/html/packages.php b/web/html/packages.php index 139b9c89..abc66377 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -8,10 +8,8 @@ include_once('pkgfuncs.inc'); # package specific functions check_sid(); # see if they're still logged in # Set the title to the current query if required -if (isset($_GET['ID'])) { - if ($pkgname = pkgname_from_id($_GET['ID'])) { - $title = $pkgname; - } +if (isset($_GET['ID']) && ($pkgname = pkgname_from_id($_GET['ID']))) { + $title = $pkgname; } else if (!empty($_GET['K'])) { $title = __("Search Criteria") . ": " . $_GET['K']; } else { -- cgit v1.2.3-24-g4f1b