From a22920743b85fd03ca954294e071c96b0b010050 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 19 Sep 2019 11:45:15 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/functions/doEnclose.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php index 196fe0c30a..7b2c62ed2c 100644 --- a/tests/phpunit/tests/functions/doEnclose.php +++ b/tests/phpunit/tests/functions/doEnclose.php @@ -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 ) ); } /**