diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php
index 7377a384c8..2cd63aef3e 100644
|
a
|
b
|
function array_replace_recursive( $base = array(), $replacements = array() ) { |
| 505 | 505 | if ( ! function_exists( 'spl_autoload_register' ) ) { |
| 506 | 506 | require_once ABSPATH . WPINC . '/spl-autoload-compat.php'; |
| 507 | 507 | } |
| | 508 | |
| | 509 | if ( ! function_exists( 'is_countable' ) ) : |
| | 510 | /** |
| | 511 | * Polyfill for is_countable function added in PHP 7.3. |
| | 512 | * Verify that the content of a variable is an array or an object |
| | 513 | * implementing Countable |
| | 514 | * |
| | 515 | * @param mixed $var The value to check. |
| | 516 | * @return bool Returns TRUE if var is countable, FALSE otherwise. |
| | 517 | */ |
| | 518 | function is_countable( $var ) { |
| | 519 | return ( is_array( $var ) || $var instanceof Countable ); |
| | 520 | } |
| | 521 | endif; |