[buddypress-trac] [BuddyPress Trac] #8367: PHP8: implode() no longer accepts deprecated order of args

buddypress-trac noreply at wordpress.org
Mon Sep 21 01:50:24 UTC 2020


#8367: PHP8: implode() no longer accepts deprecated order of args
--------------------------+-----------------------------
 Reporter:  dd32          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 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)
 ----------------------------------------------------------------------
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8367>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list