-
Problem report
-
Resolution: Fixed
-
Minor
-
5.0.8, 5.2.5
-
None
-
Sprint 78 (Jul 2021)
-
0.25
My zabbix 5.0 is logging this error to Apache error.log:
PHP Warning: in_array() expects parameter 2 to be array, string given in /www/5.0/ui/include/classes/api/CApiService.php on line 262
Note in version 5.2 line number is different, let me post it here for better searching too:
PHP Warning: in_array() expects parameter 2 to be array, string given in /www/5.2/ui/include/classes/api/CApiService.php on line 269
To reproduce, execute an API request, where define output this way:
"output":"hostid"
Yes, this is not an array by mistake, but this API works.
And the main issue here is PHP error which is unclear where it comes from and make zabbix users scary!
Reproduced starting from 5.0 - checked.
Fix it please.
- part of
-
ZBX-3783 Proper API validation
- Reopened