[PATCH] Terminates execution of the script if aurweb config file not found
nodivbyzero
nodivbyzero at gmail.com
Fri Mar 16 20:17:03 UTC 2018
---
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 e7128be..499481d 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");
+ }
}
}
--
2.16.1
More information about the aur-dev
mailing list