From 4442ba6703de42b1cba568f582ea4f668629ac14 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Tue, 29 Jun 2021 10:41:54 -0700 Subject: [PATCH] bugfix: return null if config key doesn't exist This was previously causing a PHP warning due to returning a missing key. Signed-off-by: Kevin Morris --- web/lib/confparser.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php index 1152e132..fdd2b78e 100644 --- a/web/lib/confparser.inc.php +++ b/web/lib/confparser.inc.php @@ -30,7 +30,9 @@ function config_get($section, $key) { global $AUR_CONFIG; config_load(); - return $AUR_CONFIG[$section][$key]; + return isset($AUR_CONFIG[$section][$key]) + ? $AUR_CONFIG[$section][$key] + : null; } function config_get_int($section, $key) {