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
Updated by Jim Pingle about 6 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 4c4e294b0f1523827fa21066521674a435c8f670.
Updated by Steve Wheeler about 6 years ago
- Status changed from Feedback to Resolved
Tested against:
2.4.5-DEVELOPMENT (amd64)
built on Tue Nov 06 11:45:54 EST 2018
Repeated above steps. Log settings were saved. No errors seen.
Actions