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

Undefined index in API call

XMLWordPrintable

    • Sprint 29
    • 0.25

      Steps to reproduce:

      1. create API request:
        1. API::Action()->get([
              'output' => ['actionid', 'name'],
              'selectAcknowledgeOperations' => ['operationid', 'recovery'],
              'actionids' => 3
          ]);

      Result:

      1. incorrect response:
        Array
        (
            [0] => Array
                (
                    [actionid] => 3
                    [name] => Report problems to Zabbix administrators
                    [acknowledgeOperations] => Array
                        (
                        )
                )
            [1] => Array
                (
                    [acknowledgeOperations] => Array
                        (
                            [0] => Array
                                (
                                    [operationid] => 12
                                    [recovery] => 2
                                )
                        )
                )
        )
      2. Error message:
        Undefined index: actionid [hostgroups.php:65 ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CAction->get() ? CAction->addRelatedObjects() in include/classes/api/services/CAction.php:2043]

        1. FrontendError1.png
          39 kB
          Marc
        2. FrontendError2.png
          39 kB
          Marc

            agriscenko Andrejs Griščenko
            sasha Alexander Vladishev
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: