DbQuery: Be less error-prone while calling array_search

This commit is contained in:
Johannes Meyer 2015-07-31 11:05:23 +02:00
parent 6c105b867e
commit 16e54d3987
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ class DbQuery extends SimpleQuery
&& $this->getDatasource()->getDbType() === 'pgsql' && $this->getDatasource()->getDbType() === 'pgsql'
&& $select->getPart(Zend_Db_Select::DISTINCT) === true) { && $select->getPart(Zend_Db_Select::DISTINCT) === true) {
foreach ($this->getOrder() as $fieldAndDirection) { 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]; $this->columns[] = $fieldAndDirection[0];
} }
} }