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. git-svn-id: https://develop.svn.wordpress.org/trunk@46182 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e5bee4ef68
commit
a22920743b
@ -252,7 +252,7 @@ class Tests_Functions_DoEnclose extends WP_UnitTestCase {
|
||||
* @return string All enclosure data for the given post.
|
||||
*/
|
||||
protected function get_enclosed_by_post_id( $post_id ) {
|
||||
return join( (array) get_post_meta( $post_id, 'enclosure', false ), '' );
|
||||
return implode( '', (array) get_post_meta( $post_id, 'enclosure', false ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user