Make WordPress Core

Changeset 46560


Ignore:
Timestamp:
10/16/2019 09:01:22 PM (5 years ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update-core.php

    r46464 r46560  
    10051005    if ( ! extension_loaded( 'json' ) ) {
    10061006        return new WP_Error(
    1007             'php_not_compatible',
     1007            'php_not_compatible_json',
    10081008            sprintf(
    10091009                /* translators: 1: WordPress version number, 2: The PHP extension name needed. */
Note: See TracChangeset for help on using the changeset viewer.