diff options
author | Andrew Dolgov <[email protected]> | 2021-02-22 14:41:09 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-22 14:41:09 +0300 |
commit | be4e7b13403666fc477d4b563ea8c075d0fd2022 (patch) | |
tree | 38eee4a6d7a5f0c4ecc3b37f997c385559c1d2a8 /include/sanity_check.php | |
parent | 043ef3dad68f774598e1b172ecb0f5ea75f112af (diff) |
fix several issues reported by phpstan
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-x | include/sanity_check.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php index 9407b606f..2786f012f 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -40,8 +40,6 @@ array_push($errors, "Configuration file not found. Looks like you forgot to copy config.php-dist to config.php and edit it."); } else { - require_once "sanity_config.php"; - if (!file_exists("config.php")) { array_push($errors, "Please copy config.php-dist to config.php"); } @@ -78,12 +76,14 @@ array_push($errors, "Data export cache is not writable (chmod -R 777 ".CACHE_DIR."/export)"); } + require_once "sanity_config.php"; + if (GENERATED_CONFIG_CHECK != EXPECTED_CONFIG_VERSION) { array_push($errors, "Configuration option checker sanity_config.php is outdated, please recreate it using ./utils/regen_config_checks.sh"); } - foreach ($required_defines as $d) { + foreach (get_required_defines() as $d) { if (!defined($d)) { array_push($errors, "Required configuration file parameter $d is not defined in config.php. You might need to copy it from config.php-dist."); |