[ZBX-19003] Unsupported operand types in CSettingsHelper:99 Created: 2021 Feb 11  Updated: 2021 Jun 02  Resolved: 2021 Apr 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 5.2.4
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Kevin Daudt Assignee: Arturs Lontons
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 18.04


Issue Links:
Duplicate
duplicates ZBX-18799 PHP fatal error happens if working wi... Closed
duplicates ZBX-19272 Runtime errors of CSettingsHelper Closed

 Description   

After upgrading Zabbix from 5.0 to 5.2.4, our web server error logs are filled with this error:

2021/02/11 09:30:32 [error] 71765#71765: *4792390 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Unsupported operand types in /usr/share/zabbix/include/classes/helpers/CSettingsHelper.php:99
Stack trace:
#0 /usr/share/zabbix/include/classes/helpers/CConfigGeneralHelper.php(47): CSettingsHelper::loadParams('max_period', false)
#1 /usr/share/zabbix/include/classes/widgets/forms/CWidgetFormSvgGraph.php(440): CConfigGeneralHelper::get('max_period')
#2 /usr/share/zabbix/include/classes/widgets/forms/CWidgetFormSvgGraph.php(473): CWidgetFormSvgGraph::validateTimeSelectorPeriod('now-6h', 'now')
#3 /usr/share/zabbix/app/controllers/CControllerWidget.php(118): CWidgetFormSvgGraph->validate()
#4 /usr/share/zabbix/include/classes/mvc/CController.php(386): CControllerWidget->checkInput()
#5 /usr/share/zabbix/include/classes/core/ZBase.php(540): CController->run()
#6 /usr/share/zabbix/include/classes/core/ZBase.php(207): ZBase->processRequest(Object(CRouter))
#7 /usr/share/zabbix/include/config.inc.php(25): ZBase->run('default')
#8 /usr/share/zabbix/zabbix.php(22): r" while reading response header from upstream, client: 10.44.60.38, server: , request: "POST /zabbix/zabbix.php?sid=089d445d606d452c&action=widget.svggraph.view HTTP/1.1", upstream: "fastcgi://unix:/run/php-pool-zabbix.socket:", host: "zabbix.domain.org", referrer: "https://zabbix.domain.org/zabbix/zabbix.php?action=dashboard.view&ddreset=1"

It does not only happen for dashboards, this url is affected as well:

/zabbix/zabbix.php?action=notifications.get&output=ajax


 Comments   
Comment by Arturs Lontons [ 2021 Feb 12 ]

Hi,

Could you try and duplicate the steps described in https://support.zabbix.com/browse/ZBX-18799 ?

That is:

Steps to reproduce:

  1. Disable guest access in Administration -> User groups, if it's enabled.
  2. Enable frontend messaging, if not enabled.
  3. Open log file of your web server (e.g., tail -f /var/log/apache2/error.log)
  4. Duplicate the browser tab
  5. Sign out in one of the browser tabs
  6. Wait 30-60 seconds.

If that does produce the error message, then we can consider this a duplicate and the issue should be resolved in the next minor release. If not, we can then take a more indepth look at the problem use cases.

Comment by Kevin Daudt [ 2021 Feb 24 ]

I can confirm that's what reproduces it, but yesterday we've upgraded the front-end to version 5.2.5, and there it still seems to happen.

Comment by Dmitriy Rogozinskiy [ 2021 Mar 02 ]

OS: Ubuntu 20.04.2 LTS (Focal Fossa)

Web: nginx 1.18.0-0ubuntu1

Zabbix: zabbix-server-mysql 5.2.5-1+ubuntu20.04

 

I can confirm that's what reproduces it

2021/03/02 12:19:45 [error] 149476#149476: *30 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Unsupported operand types in /usr/share/zabbix/include/classes/helpers/
Stack trace:
#0 /usr/share/zabbix/include/classes/helpers/CConfigGeneralHelper.php(47): CSettingsHelper::loadParams()
#1 /usr/share/zabbix/app/controllers/CControllerNotificationsGet.php(32): CConfigGeneralHelper::get()
#2 /usr/share/zabbix/include/classes/mvc/CController.php(64): CControllerNotificationsGet->init()
#3 /usr/share/zabbix/include/classes/core/ZBase.php(515): CController->__construct()
#4 /usr/share/zabbix/include/classes/core/ZBase.php(211): ZBase->processRequest()
#5 /usr/share/zabbix/include/config.inc.php(25): ZBase->run()
#6 /usr/share/zabbix/zabbix.php(22): require_once('/usr/share/zabb...')
#7 {main}

And It generates HTTP 500 errors:
192.168.90.66 - - [02/Mar/2021:12:19:45 +0600] "POST /zabbix.php?action=notifications.get&sid=ba080218b95b12a7&output=ajax HTTP/1.1" 500 5 "https://monitor.<hidden>/hosts.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"
192.168.90.66 - - [02/Mar/2021:12:20:44 +0600] "POST /zabbix.php?action=notifications.get&sid=ba080218b95b12a7&output=ajax HTTP/1.1" 500 5 "https://monitor.<hidden>/hosts.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"
192.168.90.66 - - [02/Mar/2021:12:21:44 +0600] "POST /zabbix.php?action=notifications.get&sid=ba080218b95b12a7&output=ajax HTTP/1.1" 500 5 "https://monitor.<hidden>/hosts.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"
192.168.90.66 - - [02/Mar/2021:12:22:44 +0600] "POST /zabbix.php?action=notifications.get&sid=ba080218b95b12a7&output=ajax HTTP/1.1" 500 5 "https://monitor.<hidden>/hosts.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"
192.168.90.66 - - [02/Mar/2021:12:23:44 +0600] "POST /zabbix.php?action=notifications.get&sid=ba080218b95b12a7&output=ajax HTTP/1.1" 500 5 "https://monitor.<hidden>/hosts.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"

 

Comment by Arturs Lontons [ 2021 Apr 16 ]

This should be fixed in version 5.2.7. Let's continue the discussion ZBX-18799

Closing the ticket as a duplicate.

Generated at Tue Apr 01 07:17:41 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.