Problem/Motivation
Code sniffer for PHP 7.4 reports one warning:
-------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
167 | WARNING | Passing the $glue and $pieces parameters in reverse order to implode has been
| | deprecated since PHP 7.4; $glue should be the first parameter and $pieces the
| | second
-------------------------------------------------------------------------------------------------
Steps to reproduce
Run phpcs with the PHP compatibility set to version 7.4
Proposed resolution
Switch the order of the arguments to implode()
Remaining tasks
Code review
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | defaultcontent-php74-implode-3172478-2.patch | 580 bytes | cboyden |
Comments
Comment #2
cboyden commentedPatch is attached.
Comment #3
mohangathala commentedPatch #2 works for me.
Comment #4
rajatc commentedPatch #2 works to me for PHP 7.4 warning.