[ZBX-11339] API: HTTP 500 on updating maintenance periods via API Created: 2016 Oct 05 Updated: 2019 Mar 28 Resolved: 2019 Mar 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 3.2.1 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Matthias Lohr | Assignee: | Zabbix Development Team |
Resolution: | Duplicate | Votes: | 3 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
PHP 7.0.8-0ubuntu0.16.04.3 |
Issue Links: |
|
Description |
When trying to update a maintenance period via the zabbix API, following error occurs: PHP Fatal error: Uncaught TypeError: Argument 1 passed to zbx_array_diff() must be of the type array, null given, called in /usr/share/zabbix/include/classes/api/services/CMaintenance.php on line 613 and defined in /usr/share/zabbix/include/func.inc.php:869 Stack trace: #0 /usr/share/zabbix/include/classes/api/services/CMaintenance.php(613): zbx_array_diff(NULL, Array, 'groupid') #1 /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php(123): CMaintenance->update(Array) #2 /usr/share/zabbix/include/classes/core/CJsonRpc.php(87): CLocalApiClient->callMethod('maintenance', 'update', Array, 'b62d2fc4fa72e2e...') #3 /usr/share/zabbix/api_jsonrpc.php(63): CJsonRpc->execute() #4 {main} thrown in /usr/share/zabbix/include/func.inc.php on line 869 Data payload: { "params": { "name": "Deploy job", "timeperiods": [ { "timeperiod_type": 0 } ], "active_till": 1475676942, "active_since": "1475675040", "maintenanceid": "4", "hostids": [ "2" ] }, "jsonrpc": "2.0", "method": "maintenance.update", "auth": "xxxxxxxx", "id": 1 } |
Comments |
Comment by richlv [ 2016 Oct 05 ] |
the bug, of course, should be fixed.
|
Comment by Alexander Vladishev [ 2019 Mar 28 ] |
Closed as duplicate of |