Code Modernization: Remove obsolete code targeting PHP < 7.2.24.

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

Props ayeshrajans, jrf.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58678


git-svn-id: http://core.svn.wordpress.org/trunk@58080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-07-05 10:12:16 +00:00
parent 411205cf87
commit 6ff382af63
3 changed files with 2 additions and 26 deletions

View File

@ -1402,30 +1402,6 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
);
}
// Check for an edge-case affecting PHP Maths abilities.
if (
! extension_loaded( 'sodium' ) &&
in_array( PHP_VERSION_ID, array( 70200, 70201, 70202 ), true ) &&
extension_loaded( 'opcache' )
) {
/*
* 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.
* https://bugs.php.net/bug.php?id=75938
*/
return new WP_Error(
'signature_verification_unsupported',
sprintf(
/* translators: %s: The filename of the package. */
__( 'The authenticity of %s could not be verified as signature verification is unavailable on this system.' ),
'<span class="code">' . esc_html( $filename_for_errors ) . '</span>'
),
array(
'php' => PHP_VERSION,
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
)
);
}
// Verify runtime speed of Sodium_Compat is acceptable.
if ( ! extension_loaded( 'sodium' ) && ! ParagonIE_Sodium_Compat::polyfill_is_fast() ) {
$sodium_compat_is_fast = false;

View File

@ -24,7 +24,7 @@ if ( ! headers_sent() ) {
}
// Don't run cron until the request finishes, if possible.
if ( PHP_VERSION_ID >= 70016 && function_exists( 'fastcgi_finish_request' ) ) {
if ( function_exists( 'fastcgi_finish_request' ) ) {
fastcgi_finish_request();
} elseif ( function_exists( 'litespeed_finish_request' ) ) {
litespeed_finish_request();

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58677';
$wp_version = '6.7-alpha-58678';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.