[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Fixed wrong variable in check

git at icinga.org git at icinga.org
Thu Aug 11 16:15:42 CEST 2011


Module: icinga-web
Branch: jmosshammer/default
Commit: d37522aa6a3d9163d64e99c6298d0471ddcaeb7e
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=d37522aa6a3d9163d64e99c6298d0471ddcaeb7e

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Thu Aug 11 16:15:27 2011 +0200

* Fixed wrong variable in check

---

 app/modules/Api/actions/ApiSearchAction.class.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/modules/Api/actions/ApiSearchAction.class.php b/app/modules/Api/actions/ApiSearchAction.class.php
index 231128b..170530e 100644
--- a/app/modules/Api/actions/ApiSearchAction.class.php
+++ b/app/modules/Api/actions/ApiSearchAction.class.php
@@ -146,8 +146,8 @@ class Api_ApiSearchAction extends IcingaApiBaseAction {
         }
 
         $filterGroup = $search->createFilterGroup($filterdef["type"]);
-        if(!is_array($filterGroup))
-            $filterGroup = array($filterGroup);
+        if(!is_array($searchField))
+            $searchField = array($searchField);
         foreach($searchField as $element) {
             if ($element["type"] == "atom") {
                 $filterGroup->addFilter($search->createFilter($element["field"][0],$element["value"][0],$element["method"][0]));





More information about the icinga-checkins mailing list