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

Bug in trigger.get when filtering by array of hosts.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • 2.0.0
    • 1.8.5
    • API (A)
    • SLES 11.1 64 bit, Apache 2, PHP5

      When filtering by host, only strings are recognized datatypes.

      "filter":

      { "host": 'hostname' }

      works whereas
      "filter":

      { "host": ['hostname'] }

      does not.

      This seems to be caused by class.ctrigger.php:441
      $sql_parts['where']['host'] = 'h.host='.zbx_dbstr($options['filter']['host']);

      Should be:
      $sql_parts['where']['host'] = DBcondition('h.host',$options['filter']['host'],false, true);

            Unassigned Unassigned
            lukemacneil Luke MacNeil
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: