[ZBX-27148] SNMP agent template item test form throws error Created: 2025 Oct 27  Updated: 2025 Oct 27

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 7.0.19
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Anna Grinhofa Assignee: Zabbix Support Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2025-10-27-17-50-58-326.png    

 Description   

*Steps to reproduce: *

Database - Postgresql

1. Open existing template item form with item type - Script
2. Press Test, observe test form appearing, click Cancel
3. Change item type to SNMP agent
4. Click on Test
NB! This error does not appear every time the steps are repeated

Expected result:
The item test form appears

Actual result:

in logs:

foreach() argument must be of type array|object, string given [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> CControllerPopupItemTestEdit->doAction() -> CConfigFile->{closure}() in app/controllers/CControllerPopupItemTestEdit.php:385]
TypeError: Cannot access offset of type string on string in /home/zabbix/workspace/ZBX-25290-7.0/ui/app/views/popup.itemtestedit.view.php:130
Stack trace:
#0 /home/zabbix/workspace/ZBX-25290-7.0/ui/include/classes/mvc/CView.php(128): include()
#1 /home/zabbix/workspace/ZBX-25290-7.0/ui/include/classes/core/ZBase.php(717): CView->getOutput()
#2 /home/zabbix/workspace/ZBX-25290-7.0/ui/include/classes/core/ZBase.php(641): ZBase->processResponseFinal()
#3 /home/zabbix/workspace/ZBX-25290-7.0/ui/include/classes/core/ZBase.php(228): ZBase->processRequest()
#4 /home/zabbix/workspace/ZBX-25290-7.0/ui/include/config.inc.php(20): ZBase->run()
#5 /home/zabbix/workspace/ZBX-25290-7.0/ui/zabbix.php(17): require_once('...')
#6 {main} 

Generated at Thu Oct 30 21:43:09 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.