Commit 67216154 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Bug #5870 / Missing file config.qfq.ini: Clean QFQ message

parent 913fd09a
......@@ -32,7 +32,7 @@ class Config {
$content = '<?php' . PHP_EOL . 'return [' . PHP_EOL;
foreach([$pre . '_NAME', $pre . '_PASSWORD', $pre . '_SERVER', $pre . '_USER', SYSTEM_LDAP_1_RDN, SYSTEM_LDAP_1_PASSWORD] as $key){
foreach ([$pre . '_NAME', $pre . '_PASSWORD', $pre . '_SERVER', $pre . '_USER', SYSTEM_LDAP_1_RDN, SYSTEM_LDAP_1_PASSWORD] as $key) {
$content .= " '$key' => '" . $config[$key] . "'," . PHP_EOL;
}
......@@ -59,8 +59,8 @@ class Config {
$arr = explode('=', $config['custom' . $i], 2);
if (!empty($arr[0]) && !empty($arr[1])) {
$arr[0]=trim($arr[0]);
$arr[1]=trim($arr[1]);
$arr[0] = trim($arr[0]);
$arr[1] = trim($arr[1]);
if (isset($config[$arr[0]])) {
throw new UserReportException("Variable '$arr[0]' already defined", ERROR_INVALID_OR_MISSING_PARAMETER);
......@@ -111,15 +111,14 @@ class Config {
self::migrateConfigIniToPhp($configIni, $configPhp);
}
try {
$config = include($configPhp);
$config = include($configPhp);
// in case $configIni doesn't exist: just skip
if (!is_array($config)) {
$config = array();
}
} catch (\Exception $e) {
throw new qfq\UserFormException ("Error read file " . $pathTypo3Conf . ": " . $e->getMessage(), ERROR_IO_READ_FILE);
if ($config === false) {
throw new qfq\UserFormException ("Error read file: " . $configPhp, ERROR_IO_READ_FILE);
}
// in case $configIni doesn't exist: just skip
if (!is_array($config)) {
$config = array();
}
$configT3qfq = self::getCustomVariable($configT3qfq);
......
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