Project

General

Profile

Actions

Bug #9095

closed

PHP error when saving logs with empty syslog tag

Added by Jim Pingle over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Logging
Target version:
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 #1

Updated by Jim Pingle over 5 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #2

Updated by Steve Wheeler over 5 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

Also available in: Atom PDF