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

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: