Skip to content

Commit 489b8cd

Browse files
committed
Correct deprecated methods in PHP7.4 (#1079)
* 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)
1 parent 88f04d7 commit 489b8cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

runtime/lib/query/Join.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ public function getClause(&$params)
537537
for ($i = 0; $i < $this->count; $i++) {
538538
$conditions [] = $this->getLeftColumn($i) . $this->getOperator($i) . $this->getRightColumn($i);
539539
}
540-
$joinCondition = sprintf('(%s)', implode($conditions, ' AND '));
540+
$joinCondition = sprintf('(%s)', implode(' AND ', $conditions));
541541
} else {
542542
$joinCondition = '';
543543
$this->getJoinCondition()->appendPsTo($joinCondition, $params);

runtime/lib/query/ModelCriteria.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public function offset($offset)
525525
*/
526526
public function select($columnArray)
527527
{
528-
if (!count($columnArray) || $columnArray == '') {
528+
if (empty(count($columnArray))) {
529529
throw new PropelException('You must ask for at least one column');
530530
}
531531

0 commit comments

Comments
 (0)