Opened 4 years ago
Closed 4 years ago
#8367 closed defect (bug) (fixed)
PHP8: implode() no longer accepts deprecated order of args
Reported by: | dd32 | Owned by: | imath |
---|---|---|---|
Milestone: | 6.4.0 | Priority: | high |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
As of PHP8 (Scheduled for Nov 26th), implode( $glue, $pieces )
only accepts args in that order, it no longer supports passing the glue as the second arg.
BuddyPress has a singular case of using the deprecated syntax.
See attached patch.
This was found using the PHPCompatibility PHPCS ruleset.
FILE: buddypress/bp-core/admin/bp-core-admin-tools.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 629 | ERROR | Passing the $glue and $pieces parameters in reverse | | order to implode has been deprecated since PHP 7.4 and | | is removed since PHP 8.0; $glue should be the first | | parameter and $pieces the second | | (PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder.Removed) ----------------------------------------------------------------------
Attachments (1)
Change History (6)
#2
@
4 years ago
Just to note, I haven't actually run BuddyPress on PHP8, so there might be other things, but this was the only thing that came up with PHP Linting and using the work-in-progress PHPCompatibility rules.
If anyone wants to try it out, I've been using the php:rc-fpm-alpine
docker image which is currently PHP8 Beta4.
Hi @dd32
Thanks a lot for your contribution about this. Our next major release is scheduled for december 1st, so we will include your fix asap in a maintenance release.