Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-27015

Error when testing Webhook media type with return 0 in script

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.18, 7.4.2, 8.0.0alpha1 (master)
    • Frontend (F)

      Steps to reproduce:

      1. Go to Alerts -> Media types
      2. Create a new Webhook media type
      3. In the script field, type return 0 or return []
      4. Save media
      5. 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

            zabbix.dev Zabbix Development Team
            natalja.zabbix Natalja Romancaka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 0.5h
                0.5h