mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <kevr@0cost.org>
This commit is contained in:
parent
a120af5a00
commit
4442ba6703
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue