From 5329411f6dc201d86515c60210d1e05f363e4357 Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 17 Sep 2019 13:40:57 +0000 Subject: [PATCH] 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 --- wp-admin/includes/ajax-actions.php | 2 +- wp-admin/includes/upgrade.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index a9e16af633..759f011b09 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -162,7 +162,7 @@ function wp_ajax_ajax_tag_search() { ) ); - echo join( $results, "\n" ); + echo join( "\n", $results ); wp_die(); } diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 9ebe82ed47..30abdd46ce 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -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)" ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index c4d6d96d5e..c858727a4b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.