aboutsummaryrefslogtreecommitdiff
path: root/lib/bootstrap.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2024-01-09 20:33:35 +0100
committerGravatar GitHub <noreply@github.com> 2024-01-09 20:33:35 +0100
commit0bf5dbbc0ba46cc27fe40b554b0c3c0ba705ef8b (patch)
tree6943f5a47b300964e12b4783fd385bf751e339d9 /lib/bootstrap.php
parent3ce94409ab650e042993480d638482a89901776d (diff)
downloadrss-bridge-0bf5dbbc0ba46cc27fe40b554b0c3c0ba705ef8b.tar.gz
rss-bridge-0bf5dbbc0ba46cc27fe40b554b0c3c0ba705ef8b.tar.zst
rss-bridge-0bf5dbbc0ba46cc27fe40b554b0c3c0ba705ef8b.zip
chore: add tools for manually administrating the configured cache (#3867)
Diffstat (limited to 'lib/bootstrap.php')
-rw-r--r--lib/bootstrap.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/bootstrap.php b/lib/bootstrap.php
index 85d823e9..fe2069d3 100644
--- a/lib/bootstrap.php
+++ b/lib/bootstrap.php
@@ -1,5 +1,9 @@
<?php
+if (version_compare(\PHP_VERSION, '7.4.0') === -1) {
+ exit('RSS-Bridge requires minimum PHP version 7.4.0!');
+}
+
// Path to the formats library
const PATH_LIB_FORMATS = __DIR__ . '/../formats/';
@@ -46,3 +50,14 @@ spl_autoload_register(function ($className) {
}
}
});
+
+$errors = Configuration::checkInstallation();
+if ($errors) {
+ exit('<pre>' . implode("\n", $errors) . '</pre>');
+}
+
+$customConfig = [];
+if (file_exists(__DIR__ . '/../config.ini.php')) {
+ $customConfig = parse_ini_file(__DIR__ . '/../config.ini.php', true, INI_SCANNER_TYPED);
+}
+Configuration::loadConfiguration($customConfig, getenv());