Index: src/wp-admin/includes/admin-filters.php
===================================================================
--- src/wp-admin/includes/admin-filters.php	(revision 38339)
+++ src/wp-admin/includes/admin-filters.php	(working copy)
@@ -116,6 +116,6 @@
 
 // Upgrade hooks.
 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
-add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
-add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
-add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
+add_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 );
+add_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 );
+add_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 );
Index: src/wp-admin/includes/class-language-pack-upgrader.php
===================================================================
--- src/wp-admin/includes/class-language-pack-upgrader.php	(revision 38339)
+++ src/wp-admin/includes/class-language-pack-upgrader.php	(working copy)
@@ -268,9 +268,9 @@
 
 		// Remove upgrade hooks which are not required for translation updates.
 		remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
-		remove_action( 'upgrader_process_complete', 'wp_version_check' );
-		remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
-		remove_action( 'upgrader_process_complete', 'wp_update_themes' );
+		remove_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 );
+		remove_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 );
+		remove_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 );
 
 		/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
 		do_action( 'upgrader_process_complete', $this, array(
@@ -282,9 +282,9 @@
 
 		// Re-add upgrade hooks.
 		add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
-		add_action( 'upgrader_process_complete', 'wp_version_check' );
-		add_action( 'upgrader_process_complete', 'wp_update_plugins' );
-		add_action( 'upgrader_process_complete', 'wp_update_themes' );
+		add_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 );
+		add_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 );
+		add_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 );
 
 		$this->skin->bulk_footer();
 
Index: src/wp-admin/includes/class-wp-automatic-updater.php
===================================================================
--- src/wp-admin/includes/class-wp-automatic-updater.php	(revision 38339)
+++ src/wp-admin/includes/class-wp-automatic-updater.php	(working copy)
@@ -389,9 +389,9 @@
 
 		// Don't automatically run these thins, as we'll handle it ourselves
 		remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
-		remove_action( 'upgrader_process_complete', 'wp_version_check' );
-		remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
-		remove_action( 'upgrader_process_complete', 'wp_update_themes' );
+		remove_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 );
+		remove_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 );
+		remove_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 );
 
 		// Next, Plugins
 		wp_update_plugins(); // Check for Plugin updates
Index: src/wp-includes/functions.php
===================================================================
--- src/wp-includes/functions.php	(revision 38339)
+++ src/wp-includes/functions.php	(working copy)
@@ -2871,6 +2871,9 @@
  * @return string|false The JSON encoded string, or false if it cannot be encoded.
  */
 function wp_json_encode( $data, $options = 0, $depth = 512 ) {
+	// Prepare the data for JSON serialization.
+	$data = _wp_json_prepare_data( $data );
+
 	/*
 	 * json_encode() has had extra params added over the years.
 	 * $options was added in 5.3, and $depth in 5.5.
@@ -2884,8 +2887,6 @@
 		$args = array( $data );
 	}
 
-	// Prepare the data for JSON serialization.
-	$args[0] = _wp_json_prepare_data( $data );
 
 	$json = @call_user_func_array( 'json_encode', $args );
 
@@ -2897,7 +2898,7 @@
 	}
 
 	try {
-		$args[0] = _wp_json_sanity_check( $data, $depth );
+		$args[0] = _wp_json_sanity_check( $args[0], $depth );
 	} catch ( Exception $e ) {
 		return false;
 	}
Index: src/wp-includes/update.php
===================================================================
--- src/wp-includes/update.php	(revision 38339)
+++ src/wp-includes/update.php	(working copy)
@@ -176,6 +176,14 @@
 }
 
 /**
+ * Shim for wp_version_check() to be used with 'upgrader_process_complete' action.
+ */
+function wp_version_check_upc( $upgrader, $hook_extra ) {
+	$extra_stats = array(); // Anything interesting to put here, either from $hook_extra or otherwise?
+	wp_version_check( $extra_stats );
+}
+
+/**
  * Check plugin versions against the latest versions hosted on WordPress.org.
  *
  * The WordPress version, PHP version, and Locale is sent along with a list of
@@ -342,6 +350,14 @@
 }
 
 /**
+ * Shim for wp_update_plugins() to be used with 'upgrader_process_complete' action.
+ */
+function wp_update_plugins_upc( $upgrader, $hook_extra ) {
+	$extra_stats = array(); // Anything interesting to put here, either from $hook_extra or otherwise?
+	wp_update_plugins( $extra_stats );
+}
+
+/**
  * Check theme versions against the latest versions hosted on WordPress.org.
  *
  * A list of all themes installed in sent to WP. Checks against the
@@ -499,6 +515,14 @@
 }
 
 /**
+ * Shim for wp_update_themes() to be used with 'upgrader_process_complete' action.
+ */
+function wp_update_themes_upc( $upgrader, $hook_extra ) {
+	$extra_stats = array(); // Anything interesting to put here, either from $hook_extra or otherwise?
+	wp_update_themes( $extra_stats );
+}
+
+/**
  * Performs WordPress automatic background updates.
  *
  * @since 3.7.0
