summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornodivbyzero <nodivbyzero@gmail.com>2018-03-16 21:17:03 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2018-03-20 19:23:02 +0100
commit3d90623154eeae9864e6d659d3d46f9774abb458 (patch)
treefb10047c0cf0fcca5d27359503bf8258a046519e
parentbcd795c3399baf824c9f4d1c4d2e849e62777764 (diff)
downloadaur-3d90623154eeae9864e6d659d3d46f9774abb458.tar.gz
aur-3d90623154eeae9864e6d659d3d46f9774abb458.tar.xz
Terminate execution if config file is missing
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--web/lib/confparser.inc.php6
1 files changed, 5 insertions, 1 deletions
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");
+ }
}
}