Fix error "Undefined index: logging_file" (#3013)

fixes #3007
This commit is contained in:
Alexander Aleksandrovič Klimov 2017-10-11 15:09:22 +02:00 committed by Johannes Meyer
parent 7cdac4eb9f
commit 29df5464cb
1 changed files with 22 additions and 8 deletions

View File

@ -70,12 +70,32 @@ class GeneralConfigStep extends Step
$loggingHtml = '<p>' . mt('setup', 'Logging will be disabled.') . '</p>';
} else {
$level = $this->data['generalConfig']['logging_level'];
switch ($type) {
case 'php':
$typeDescription = t('Webserver Log', 'app.config.logging.type');
$typeSpecificHtml = '';
break;
case 'syslog':
$typeDescription = 'Syslog';
$typeSpecificHtml = '<td><strong>' . t('Application Prefix') . '</strong></td>'
. '<td>' . $this->data['generalConfig']['logging_application'] . '</td>';
break;
case 'file':
$typeDescription = t('File', 'app.config.logging.type');
$typeSpecificHtml = '<td><strong>' . t('Filepath') . '</strong></td>'
. '<td>' . $this->data['generalConfig']['logging_file'] . '</td>';
break;
}
$loggingHtml = ''
. '<table>'
. '<tbody>'
. '<tr>'
. '<td><strong>' . t('Type', 'app.config.logging') . '</strong></td>'
. '<td>' . ($type === 'syslog' ? 'Syslog' : t('File', 'app.config.logging.type')) . '</td>'
. '<td>' . $typeDescription . '</td>'
. '</tr>'
. '<tr>'
. '<td><strong>' . t('Level', 'app.config.logging') . '</strong></td>'
@ -88,13 +108,7 @@ class GeneralConfigStep extends Step
)) . '</td>'
. '</tr>'
. '<tr>'
. ($type === 'syslog' ? (
'<td><strong>' . t('Application Prefix') . '</strong></td>'
. '<td>' . $this->data['generalConfig']['logging_application'] . '</td>'
) : (
'<td><strong>' . t('Filepath') . '</strong></td>'
. '<td>' . $this->data['generalConfig']['logging_file'] . '</td>'
))
. $typeSpecificHtml
. '</tr>'
. '</tbody>'
. '</table>';