-
Problem report
-
Resolution: Duplicate
-
Trivial
-
None
-
5.0.19rc1, 5.4.8rc1, 6.0.0beta1
-
Sprint 82 (Nov 2021), Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022), Sprint 91 (Aug 2022)
-
0.5
Problem description: The below "Undefined offset: 0" and "Trying to access array offset on value of type null" errors are observed when attempting to link "APC UPS SNMP" and "macOS" templates:
Undefined offset: 0 [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostCreate->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->create() → CHostGeneral->link() → CItem->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItem::validateInventoryLinks() in include/classes/api/services/CItem.php:1007] Trying to access array offset on value of type null [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostCreate->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->create() → CHostGeneral->link() → CItem->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItem::validateInventoryLinks() in include/classes/api/services/CItem.php:1007] Two items ("Host name" and "") cannot populate one host inventory field "Name", this would lead to a conflict.
Steps to reproduce:
- Navigate to Configuration => Hosts and click on the "Create host" button
- In the opened host configuration form populate the "Host name" and "Groups" fields and add Agent and SNMP interfaces.
- In field "Templates" select the "Undefined offset: 0" and "Trying to access array offset on value of type null" templates
- Attempt to save host configuration
Result: the above errors are observed.
Expected: no "Undefined offset" or "Trying to access array offset on value of type null" errors should not be observed.
- is duplicated by
-
ZBX-21332 Unexpected errors are observed when linking items from 2 templates that populate same inventory field to a host
- Closed