-
Incident report
-
Resolution: Unsupported version
-
Trivial
-
None
-
3.0.10
-
None
-
Apache 2.4, PHP 7.0.22
After upgrading to Zabbix 3.0 the API method "host.massremove" returns an Error 500. In the PHP error log I could find the following:
[22-Aug-2017 08:59:48 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Argument 1 passed to CHost::isWritable() must be of the type array, null given, called in /usr/share/zabbix/include/classes/api/services/CHostGeneral.php on line 113 and defined in /usr/share/zabbix/include/classes/api/services/CHost.php:1343
Stack trace:
#0 /usr/share/zabbix/include/classes/api/services/CHostGeneral.php(113): CHost->isWritable(NULL)
#1 /usr/share/zabbix/include/classes/api/services/CHost.php(1133): CHostGeneral->massRemove(Array)
#2 /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php(123): CHost->massRemove(Array)
#3 /usr/share/zabbix/include/classes/core/CJsonRpc.php(87): CLocalApiClient->callMethod('host', 'massremove', Array, '88a75c274593be4...')
#4 /usr/share/zabbix/api_jsonrpc.php(63): CJsonRpc->execute()
#5 {main}
thrown in /usr/share/zabbix/include/classes/api/services/CHost.php on line 1343
The corresponding API request was:
{
"params": {
"hostids": "11597",
"groupids": ["5"]
},
"method": "host.massremove",
"jsonrpc": "2.0",
"id": 85,
"auth": "88a75c274593be4c17a075d4e78e49a6"
}
As the API request has been created according to the method's documentation this has to be a bug within the API.