-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
7.2.6
-
None
-
None
When calling graph.get with the graphids filter set to an array containing only null ([null]), the api is responding with an database error.
API request:
{
"jsonrpc": "2.0",
"method": "graph.get",
"params": {
"output": "extend",
"graphids": [null]
},
"id": 1
}
API response:
{
"jsonrpc": "2.0",
"error": {
"code": -32500,
"message": "Application error.",
"data": "Database error occurred.",
"debug": [
{
"file": "/usr/share/zabbix/include/classes/core/CJsonRpc.php",
"line": 92,
"function": "callMethod",
"class": "CLocalApiClient",
"type": "->"
},
{
"file": "/usr/share/zabbix/api_jsonrpc.php",
"line": 58,
"function": "execute",
"class": "CJsonRpc",
"type": "->"
}
]
},
"id": 1
}
Errors in web server logs:
zabbix-web-test-1 | [29-Apr-2025 13:22:41] WARNING: [pool zabbix] child 943 said into stderr: "[29-Apr-2025 15:22:41 Europe/Berlin] PHP Warning: array_flip(): Can only flip string and integer values, entry skipped in /usr/share/zabbix/include/db.inc.php on line 496" zabbix-web-test-1 | [29-Apr-2025 13:22:41] WARNING: [pool zabbix] child 943 said into stderr: "[29-Apr-2025 15:22:41 Europe/Berlin] PHP Warning: Error in query [SELECT g.* FROM graphs g WHERE AND g.flags IN (0,4)] [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND g.flags IN (0,4)' at line 1] in /usr/share/zabbix/include/db.inc.php on line 200"
- related to
-
ZBXNEXT-9774 Implement strict validation for *.get API methods
-
- READY TO DEVELOP
-