Skip to content

Commit

Permalink
Correct deprecated methods in PHP7.4 (propelorm#1079)
Browse files Browse the repository at this point in the history
* runtime/lib/query/Join.php
  implode() was used against the definition (wrong PHP documentation

* runtime/lib/query/ModelCriteria.php
  count() was used on non-countable variable (non-array)
  • Loading branch information
michalmagic42 committed Mar 16, 2020
1 parent 88f04d7 commit 489b8cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtime/lib/query/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion runtime/lib/query/ModelCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public function offset($offset)
*/
public function select($columnArray)
{
if (!count($columnArray) || $columnArray == '') {
if (empty(count($columnArray))) {
throw new PropelException('You must ask for at least one column');
}

Expand Down

0 comments on commit 489b8cd

Please sign in to comment.