propelorm / Propel

Current stable (and outdated and unmaintained) version of Propel - Please use v2 https://github.com/propelorm/Propel2 --
http://www.propelorm.org
MIT License
841 stars 417 forks source link

`runtime/lib/query/Join.php:540` gives warnings in PHP7.4 #1079

Open michalmagic42 opened 4 years ago

michalmagic42 commented 4 years ago

Issue: runtime/lib/query/Join.php:540 gives warnings in PHP7.4

The reason is that the implode() method is used against standard: $joinCondition = sprintf('(%s)', implode($conditions, ' AND '));

For historical reasons, the implode() function supports passing the $glue and $pieces parameters in reverse order from the documented order of arguments. This is inconsistent and makes the argument handling non-standard.

Fix: change the line runtime/lib/query/Join.php:540 From: $joinCondition = sprintf('(%s)', implode($conditions, ' AND ')); To: $joinCondition = sprintf('(%s)', implode(' AND ', $conditions));