[wp-trac] [WordPress Trac] #47746: PHP 7.4 compatibility fix / implode argument order
WordPress Trac
noreply at wordpress.org
Thu Sep 19 11:45:31 UTC 2019
#47746: PHP 7.4 compatibility fix / implode argument order
-----------------------------------+-------------------------------
Reporter: jrf | Owner: desrosj
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch php74 close | Focuses: coding-standards
-----------------------------------+-------------------------------
Comment (by SergeyBiryukov):
In [changeset:"46182" 46182]:
{{{
#!CommitTicketReference repository="" revision="46182"
Tests: Replace `join()` with `implode()` in `do_enclose()` tests
introduced in [46175], and ensure the arguments passed are in the correct
order.
The `implode()` function accepts two parameters, `$glue` and `$pieces`.
For historical reasons, these parameters have been accepted in any order,
though it was recommended that the documented order of `$glue, $pieces` be
used. It is also generally considered best practice to use the canonical
function rather than an alias.
Starting in PHP 7.4, specifying the parameters in the reverse order will
trigger a deprecation notice with the plan to remove this tolerance in PHP
8.0.
Props jrf.
Fixes #36824. See #47746.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47746#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list