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

'Invalid argument supplied for foreach()' after successfull template modification

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Trivial Trivial
    • None
    • 2.0.8
    • API (A), Frontend (F)

      I noticed the error message after expanding the details of a supposedly successful template modification.

      Unlinked: Trigger "Foo trigger" on "host1.example.com".
      Unlinked: Item "Foo trigger" on "host1.example.com".
      Templates "Template bar" unlinked from hosts "host1.example.com".
      Created: Item "Foo trigger" on "Template baz".
      Created: Item "Foo trigger" on "host2.example.com".
      Created: Item "Foo trigger" on "host3.example.com".
      [...]
      Created: Trigger "Foo trigger" on "Template baz".
      Created: Trigger "Foo trigger" on "host2.example.com".
      Created: Trigger "Foo trigger" on "host3.example.com".
      [...]
      Created: Trigger "Foo trigger" on "host123.example.com".
      Created: Trigger "Foo trigger" on "host124.example.com".
      Created: Trigger "Foo trigger" on "Template 42".
      Invalid argument supplied for foreach() [api/classes/CTriggerGeneral.php:240]
      Created: Trigger "Foo trigger" on "host125.example.com".
      Invalid argument supplied for foreach() [api/classes/CTriggerGeneral.php:240]
      Created: Trigger "Foo trigger" on "host126.example.com".
      Invalid argument supplied for foreach() [api/classes/CTriggerGeneral.php:240]
      [...]

      The Template 'Template bar' has one item and one corresponding trigger.
      The Template 'Template bar' has been un-linked from host 'host1.example.com' and assigned to template 'Template baz' and another template.
      Total count of hosts is ~950.

      At a first glance all items and triggers seem to be successfully created (as stated by frontend)

            Unassigned Unassigned
            okkuv9xh Marc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: