-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.26rc1, 6.4.11rc1, 7.0.0beta1
-
Prev.Sprint, S24-W38/39, S24-W40/41, S24-W42/43
-
0.35
Problem description: According to user documentation the triggerprototype.get API has a parameter "host", in which it is possible to fulter the returned trigger prototypes by hte name of the host. In reality "500 error" is returned if this parameter is specified in the triggerprototype.get API and the following runtime error is observed:
TypeError: Argument 2 passed to dbConditionInt() must be of the type array, null given, called in /home/ubuntu/workspace/ZBXNEXT-5878-6.5-2/ui/include/classes/api/services/CTriggerPrototype.php on line 365 and defined in /home/ubuntu/workspace/ZBXNEXT-5878-6.5-2/ui/include/db.inc.php:657 Stack trace: #0 /home/ubuntu/workspace/ZBXNEXT-5878-6.5-2/ui/include/classes/api/services/CTriggerPrototype.php(365): dbConditionInt() #1 /home/ubuntu/workspace/ZBXNEXT-5878-6.5-2/ui/include/classes/api/clients/CLocalApiClient.php(131): CTriggerPrototype->get() #2 /home/ubuntu/workspace/ZBXNEXT-5878-6.5-2/ui/include/classes/core/CJsonRpc.php(104): CLocalApiClient->callMethod() #3 /home/ubuntu/workspace/ZBXNEXT-5878-6.5-2/ui/api_jsonrpc.php(63): CJsonRpc->execute() #4 {main}
Steps to reproduce:
- Execute the following API call:
{ "jsonrpc": "2.0", "method": "triggerprototype.get", "params": { "countOutput": false, "output": "extend", "host": "Zabbix server" }, "auth": "f66568cf052fdde43711f38a5451472f", "id": 1 }
Result: 500 error is returned and the above runtime error is observed
Expected: a list of trigger prototypes that belondgs to "Zabbix server" host should be returned