From 16e54d3987c8c85c8e460763bf6c921e9281a00c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 31 Jul 2015 11:05:23 +0200 Subject: [PATCH] DbQuery: Be less error-prone while calling array_search --- library/Icinga/Data/Db/DbQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Data/Db/DbQuery.php b/library/Icinga/Data/Db/DbQuery.php index f269cd138..aa8acf601 100644 --- a/library/Icinga/Data/Db/DbQuery.php +++ b/library/Icinga/Data/Db/DbQuery.php @@ -150,7 +150,7 @@ class DbQuery extends SimpleQuery && $this->getDatasource()->getDbType() === 'pgsql' && $select->getPart(Zend_Db_Select::DISTINCT) === true) { foreach ($this->getOrder() as $fieldAndDirection) { - if (array_search($fieldAndDirection[0], $this->columns) === false) { + if (array_search($fieldAndDirection[0], $this->columns, true) === false) { $this->columns[] = $fieldAndDirection[0]; } }