Make WordPress Core

Changeset 58678

Timestamp:
07/05/2024 10:10:50 AM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Remove obsolete code targeting PHP < 7.2.24.

Follow-up to [44488], [45262], [53426], [57985].

Props ayeshrajans, jrf.
See #61574.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r58409 r58678  
    14031403    }
    14041404
    1405     // Check for an edge-case affecting PHP Maths abilities.
    1406     if (
    1407         ! extension_loaded( 'sodium' ) &&
    1408         in_array( PHP_VERSION_ID, array( 70200, 70201, 70202 ), true ) &&
    1409         extension_loaded( 'opcache' )
    1410     ) {
    1411         /*
    1412          * Sodium_Compat isn't compatible with PHP 7.2.0~7.2.2 due to a bug in the PHP Opcache extension, bail early as it'll fail.
    1413          * https://bugs.php.net/bug.php?id=75938
    1414          */
    1415         return new WP_Error(
    1416             'signature_verification_unsupported',
    1417             sprintf(
    1418                 /* translators: %s: The filename of the package. */
    1419                 __( 'The authenticity of %s could not be verified as signature verification is unavailable on this system.' ),
    1420                 '<span class="code">' . esc_html( $filename_for_errors ) . '</span>'
    1421             ),
    1422             array(
    1423                 'php'    => PHP_VERSION,
    1424                 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
    1425             )
    1426         );
    1427     }
    1428 
    14291405    // Verify runtime speed of Sodium_Compat is acceptable.
    14301406    if ( ! extension_loaded( 'sodium' ) && ! ParagonIE_Sodium_Compat::polyfill_is_fast() ) {
  • trunk/src/wp-cron.php

    r55871 r58678  
    2525
    2626// Don't run cron until the request finishes, if possible.
    27 if ( PHP_VERSION_ID >= 70016 && function_exists( 'fastcgi_finish_request' ) ) {
     27if ( function_exists( 'fastcgi_finish_request' ) ) {
    2828    fastcgi_finish_request();
    2929} elseif ( function_exists( 'litespeed_finish_request' ) ) {
Note: See TracChangeset for help on using the changeset viewer.