From 3e6c0fb95e518bcd0970a6779bdc3bbf213c1279 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 16 Oct 2019 21:01:22 +0000 Subject: [PATCH] Upgrade/Install: Use a unique error code when an update fails due to the PHP JSON extension missing. This allows update failures caused when the native PHP JSON extension is missing to be distinguished from updates that fail because the site does not meet the minimum PHP requirements. Follow up of [46455]. Reviewed by desrosj, jorbin, johnbillion. Fixes #47699. git-svn-id: https://develop.svn.wordpress.org/trunk@46560 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update-core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php index 5d37b1901b..e3ddec3db6 100644 --- a/src/wp-admin/includes/update-core.php +++ b/src/wp-admin/includes/update-core.php @@ -1004,7 +1004,7 @@ function update_core( $from, $to ) { // Add a warning when the JSON PHP extension is missing. if ( ! extension_loaded( 'json' ) ) { return new WP_Error( - 'php_not_compatible', + 'php_not_compatible_json', sprintf( /* translators: 1: WordPress version number, 2: The PHP extension name needed. */ __( 'The update cannot be installed because WordPress %1$s requires the %2$s PHP extension.' ),