diff --git a/runtime/lib/query/Join.php b/runtime/lib/query/Join.php index b9a78ab5b..be3f37784 100644 --- a/runtime/lib/query/Join.php +++ b/runtime/lib/query/Join.php @@ -537,7 +537,7 @@ public function getClause(&$params) for ($i = 0; $i < $this->count; $i++) { $conditions [] = $this->getLeftColumn($i) . $this->getOperator($i) . $this->getRightColumn($i); } - $joinCondition = sprintf('(%s)', implode($conditions, ' AND ')); + $joinCondition = sprintf('(%s)', implode(' AND ', $conditions)); } else { $joinCondition = ''; $this->getJoinCondition()->appendPsTo($joinCondition, $params); diff --git a/runtime/lib/query/ModelCriteria.php b/runtime/lib/query/ModelCriteria.php index e68c0836b..5ea69007b 100644 --- a/runtime/lib/query/ModelCriteria.php +++ b/runtime/lib/query/ModelCriteria.php @@ -525,7 +525,7 @@ public function offset($offset) */ public function select($columnArray) { - if (!count($columnArray) || $columnArray == '') { + if (empty($columnArray)) { throw new PropelException('You must ask for at least one column'); }