General: Ensure the arguments passed to `implode()` 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.

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.

This change fixes the occurrences of reversed arguments in Core with the exception of those contained in included external libraries. These will be handled separately.

Props jrf, jorbin.
See #47746.
Built from https://develop.svn.wordpress.org/trunk@46155


git-svn-id: http://core.svn.wordpress.org/trunk@45967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-09-17 13:40:57 +00:00
parent b2a384461e
commit 5329411f6d
3 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ function wp_ajax_ajax_tag_search() {
)
);
echo join( $results, "\n" );
echo join( "\n", $results );
wp_die();
}

View File

@ -1056,7 +1056,7 @@ function upgrade_130() {
$limit = $option->dupes - 1;
$dupe_ids = $wpdb->get_col( $wpdb->prepare( "SELECT option_id FROM $wpdb->options WHERE option_name = %s LIMIT %d", $option->option_name, $limit ) );
if ( $dupe_ids ) {
$dupe_ids = join( $dupe_ids, ',' );
$dupe_ids = join( ',', $dupe_ids );
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_id IN ($dupe_ids)" );
}
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-46154';
$wp_version = '5.3-alpha-46155';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.