diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index c87b38e839..a4e58970fe 100644
|
a
|
b
|
function verify_file_signature( $filename, $signatures, $filename_for_errors = f |
| 1147 | 1147 | ); |
| 1148 | 1148 | } |
| 1149 | 1149 | |
| | 1150 | // Check for a edge-case affecting PHP Maths abilities |
| | 1151 | if ( |
| | 1152 | ! extension_loaded( 'sodium' ) && |
| | 1153 | in_array( PHP_VERSION_ID, [ 70200, 70201, 70202 ], true ) && |
| | 1154 | extension_loaded( 'opcache' ) |
| | 1155 | ) { |
| | 1156 | // 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. |
| | 1157 | // https://bugs.php.net/bug.php?id=75938 |
| | 1158 | |
| | 1159 | return new WP_Error( |
| | 1160 | 'signature_verification_unsupported', |
| | 1161 | sprintf( |
| | 1162 | /* translators: 1: The filename of the package. */ |
| | 1163 | __( 'The authenticity of %1$s could not be verified as signature verification is unavailable on this system.' ), |
| | 1164 | '<span class="code">' . esc_html( $filename_for_errors ) . '</span>' |
| | 1165 | ), |
| | 1166 | array( |
| | 1167 | 'php' => phpversion(), |
| | 1168 | 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), |
| | 1169 | ) |
| | 1170 | ); |
| | 1171 | |
| | 1172 | } |
| | 1173 | |
| 1150 | 1174 | if ( ! $signatures ) { |
| 1151 | 1175 | return new WP_Error( |
| 1152 | 1176 | 'signature_verification_no_signature', |