pkgbase.php: Squelch PHP warning

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2017-02-28 07:14:21 +01:00
parent eb6ae0c685
commit cc84e0b7fd

View file

@ -145,6 +145,7 @@ if (check_token()) {
} }
} }
if (isset($base_id)) {
$pkgs = pkgbase_get_pkgnames($base_id); $pkgs = pkgbase_get_pkgnames($base_id);
if (!$output && count($pkgs) == 1) { if (!$output && count($pkgs) == 1) {
/* Not a split package. Redirect to the package page. */ /* Not a split package. Redirect to the package page. */
@ -156,6 +157,9 @@ if (!$output && count($pkgs) == 1) {
} }
$details = pkgbase_get_details($base_id); $details = pkgbase_get_details($base_id);
} else {
$details = array();
}
html_header($title, $details); html_header($title, $details);
?> ?>
@ -169,11 +173,13 @@ html_header($title, $details);
<?php <?php
include('pkg_search_form.php'); include('pkg_search_form.php');
if (isset($base_id)) {
if (isset($_COOKIE["AURSID"])) { if (isset($_COOKIE["AURSID"])) {
pkgbase_display_details($base_id, $details, $_COOKIE["AURSID"]); pkgbase_display_details($base_id, $details, $_COOKIE["AURSID"]);
} else { } else {
pkgbase_display_details($base_id, $details, null); pkgbase_display_details($base_id, $details, null);
} }
}
html_footer(AURWEB_VERSION); html_footer(AURWEB_VERSION);