Actions
Bug #9095
closedPHP error when saving logs with empty syslog tag
Start date:
11/05/2018
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4
Affected Architecture:
All
Description
If config.xml contains no log settings, but has an empty syslog section (<syslog></syslog>
) this can lead to a PHP error when saving settings on an individual log tab:
For example, with the above tag in the config, go to Status > System Logs, click the wrench, change the number of lines to show to another value such as 75, then click Save. The following errors will be logged and the save will fail:
[05-Nov-2018 14:41:37 America/Indiana/Indianapolis] PHP Warning: Illegal string offset 'system_settings' in /usr/local/www/status_logs_common.inc on line 668 [05-Nov-2018 14:41:37 America/Indiana/Indianapolis] PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /usr/local/www/status_logs_common.inc:668 Stack trace: #0 /usr/local/www/status_logs.php(84): manage_log_code() #1 {main} thrown in /usr/local/www/status_logs_common.inc on line 668
Actions