PHP 8+ compatibility for Implode in REST Endpoint
-
When running a project we use your plugins on we have come across the following potential issue:
FILE: wp-content/plugins/event-tickets/src/Tribe/REST/V1/Endpoints/Single_Attendee.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 362 | 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) ----------------------------------------------------------------------
This plugin sets its minimum PHP version as 7.4 in the readme.txt.
As of PHP 7.4
implode()
changes the order of its arguments from ‘Array, Separator’ to ‘Separator, ‘Array’.As of PHP 8.0 the legacy order support is removed.
In preparation for a minimum version of PHP 8.0, this would fix the removed error while being compatible with the plugin’s current minimal version.
A Pull Request for this change can be seen here: https://github.com/the-events-calendar/event-tickets/pull/2798
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP 8+ compatibility for Implode in REST Endpoint’ is closed to new replies.