Commit 4c4b7a80 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Store.php: Check if important config.ini vars exist.

parent 332a8033
......@@ -150,6 +150,7 @@ const ERROR_MISSING_TABLE = 1065;
const ERROR_RECORD_NOT_FOUND = 1066;
const ERROR_INVALID_EDITOR_PROPERTY_NAME = 1067;
const ERROR_UNKNOWN_ESCAPE_MODE = 1068;
const ERROR_MISSING_CONFIG_INI_VALUE = 1069;
// Subrecord
......
......@@ -220,6 +220,13 @@ class Store {
$config[SYSTEM_SQL_LOG] = $config[SYSTEM_PATH_EXT] . '/' . $config[SYSTEM_SQL_LOG];
}
// Verify existence
$names = array('DB_USER', 'DB_SERVER', 'DB_PASSWORD', 'DB_NAME', 'SQL_LOG', 'SQL_LOG_MODE');
foreach ($names as $name) {
if (!isset($config[$name])) {
throw new qfq\UserFormException ("Missing configuration in `config.ini`: $name", ERROR_MISSING_CONFIG_INI_VALUE);
}
}
self::setVarArray($config, STORE_SYSTEM, true);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment