-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
7.0.18, 7.4.2, 8.0.0alpha1 (master)
Steps to reproduce:
- Go to Alerts -> Media types
- Create a new Webhook media type
- In the script field, type return 0 or return []
- Save media
- Press the "Test" button to test media
Result:
An error appears in the UI and php runtime error
foreach() argument must be of type array|object, null given [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerMediatypeTestSend->doAction() → error() → CConfigFile->{closure}() in conf/zabbix.conf.php:89]
If return null in the script - the response is 1, not sure if this is correct too.
Expected:
No errors and correct response