-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.13rc1, 5.4.2rc1, 6.0.0alpha1
-
Sprint 77 (Jun 2021), Sprint 78 (Jul 2021)
-
0.5
Steps to reproduce:
- Create template AAA
- Create discovery rule on this template
- Create host BBB
- Create discovery rule on this host
- Link template AAA to host
- Send api request to create two host prototypes, one on host and one on template
"method": "hostprototype.create", "params": [ { "host": "{#HOST} prototype", "ruleid": "33768", "groupLinks": [ { "groupid": "5" } ] }, { "host": "{#TEMPLATE} prototype", "ruleid": "35801", "groupLinks": [ { "groupid": "5" } ] } ],
Result:
PHP runtime error
Undefined offset: 33768 [api_jsonrpc.php:63 -> CJsonRpc->execute() -> CLocalApiClient->callMethod() -> CHostPrototype->create() -> CHostPrototype->inherit() -> CHostPrototype->prepareInheritedObjects() -> CConfigFile->{closure}() in include/classes/api/services/CHostPrototype.php:790] Trying to access array offset on value of type null [api_jsonrpc.php:63 -> CJsonRpc->execute() -> CLocalApiClient->callMethod() -> CHostPrototype->create() -> CHostPrototype->inherit() -> CHostPrototype->prepareInheritedObjects() -> CConfigFile->{closure}() in include/classes/api/services/CHostPrototype.php:790]
Expected:
no errors