PHP 8 incompatibility in subscriptions.module: implode parameter order

Created on 4 July 2024, 7 months ago

Problem/Motivation

phpcs, checking PHP 8.1 compatibility, reports this for subscriptions 7.x-1.4:

FILE: subscriptions/subscriptions.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 819 | 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
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs PHPCompatibility scan for PHP version 8.1 .

Proposed resolution

Amend line 819 of subscriptions.module to correct the order of parameters to implode().

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇬🇧United Kingdom davej

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024