pkgbase.php: Add default title
diff mbox

Message ID 20170215210702.2147-1-lfleischer@archlinux.org
State Accepted, archived
Headers show

Commit Message

Lukas Fleischer Feb. 15, 2017, 9:07 p.m. UTC
Instead of triggering a PHP warning and using an empty title if no
package base is specified, use a default title.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 web/html/pkgbase.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox

diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index 11fdf74..23aa6c8 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -30,7 +30,7 @@  if (!isset($base_id) || !isset($pkgbase_name)) {
 }
 
 /* Set the title to package base name. */
-$title = $pkgbase_name;
+$title = isset($pkgbase_name) ? $pkgbase_name : __("Package Bases");
 
 /* Grab the list of package base IDs to be operated on. */
 $ids = array();