From 3d90623154eeae9864e6d659d3d46f9774abb458 Mon Sep 17 00:00:00 2001 From: nodivbyzero Date: Fri, 16 Mar 2018 20:17:03 +0000 Subject: Terminate execution if config file is missing Signed-off-by: Lukas Fleischer --- web/lib/confparser.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php index e7128be6..499481df 100644 --- a/web/lib/confparser.inc.php +++ b/web/lib/confparser.inc.php @@ -8,7 +8,11 @@ function config_load() { if (!$path) { $path = "/etc/aurweb/config"; } - $AUR_CONFIG = parse_ini_file($path, true, INI_SCANNER_RAW); + if (file_exists($path)) { + $AUR_CONFIG = parse_ini_file($path, true, INI_SCANNER_RAW); + } else { + die("aurweb config file not found"); + } } } -- cgit v1.2.3-24-g4f1b