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

Possibly unused code in Item API update validateInventoryLinks() function

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 2.1.6
    • API (A)

      In Item API there is a function validateInventoryLinks() which receives an array with items. First of all it cycles through items and checks for inventory_link parameter. If no inventory_link parameter, it unsets the item, so it doesn't continue validation. In update method there is additional validation for checking inventory_link. The code piece highlighted in attached image will never execute. The variable $itemsWithNoInventoryLink will always be empty and the rest $itemsWithNoHostId, $itemsWithNoKeys are also empty because hostid and key_ are already taken from DB before this function.

      The function validateInventoryLinks() requires investigation.

            Unassigned Unassigned
            iivs Ivo Kurzemnieks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: