From c3fdb560dff79070aac19686b02eb262bc83ea49 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Fri, 12 Jul 2019 06:15:39 +0200
Subject: [PATCH] Document when the Hash extension polyfills can be removed
---
src/wp-includes/compat.php | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php
index f208887d5d..c11e2d51a9 100644
a
|
b
|
if ( ! function_exists( 'hash_hmac' ) ) : |
221 | 221 | /** |
222 | 222 | * Compat function to mimic hash_hmac(). |
223 | 223 | * |
| 224 | * The Hash extension is bundled with PHP by default since PHP 5.1.2. |
| 225 | * However, the extension may be explicitly disabled on select servers. |
| 226 | * As of PHP 7.4.0, the Hash extension is a core PHP extension and can no |
| 227 | * longer be disabled. |
| 228 | * I.e. when PHP 7.4.0 becomes the minimum requirement, this polyfill |
| 229 | * and the associated `_hash_hmac()` function can be safely removed. |
| 230 | * |
224 | 231 | * @ignore |
225 | 232 | * @since 3.2.0 |
226 | 233 | * |
… |
… |
if ( ! function_exists( 'hash_equals' ) ) : |
288 | 295 | * |
289 | 296 | * Compares two strings using the same time whether they're equal or not. |
290 | 297 | * |
291 | | * This function was added in PHP 5.6. |
292 | | * |
293 | 298 | * Note: It can leak the length of a string when arguments of differing length are supplied. |
294 | 299 | * |
| 300 | * This function was added in PHP 5.6. |
| 301 | * However, the Hash extension may be explicitly disabled on select servers. |
| 302 | * As of PHP 7.4.0, the Hash extension is a core PHP extension and can no |
| 303 | * longer be disabled. |
| 304 | * I.e. when PHP 7.4.0 becomes the minimum requirement, this polyfill |
| 305 | * can be safely removed. |
| 306 | * |
295 | 307 | * @since 3.9.2 |
296 | 308 | * |
297 | 309 | * @param string $a Expected string. |