fix: add config.php as ignored

This commit is contained in:
Matthieu Bessat 2021-08-08 19:32:01 +02:00
parent b65642cd0a
commit 14165f6e04
4 changed files with 12 additions and 29 deletions

View file

@ -1,7 +1,15 @@
<?php
if (!file_exists('./config.php')) {
die('Config file not present');
}
$config = require('./config.php');
if (!is_array($config)) {
die('Config must be an array');
}
// a basic validation of config keys
if (!(isset($config['domain']) && strlen($config['domain']) > 0)) {
die('Domain key not present in config');