Ticket #47397: 47397.patch
File 47397.patch, 960 bytes (added by , 5 years ago) |
---|
-
src/wp-includes/compat.php
510 510 require_once ABSPATH . WPINC . '/spl-autoload-compat.php'; 511 511 } 512 512 513 if ( ! function_exists( 'is_countable' ) ) {513 if ( ( version_compare( PHP_VERSION, '7.3' ) > 0 && ! function_exists( 'is_countable' ) ) { 514 514 /** 515 515 * Polyfill for is_countable() function added in PHP 7.3. 516 516 * … … 524 524 * @return bool True if `$var` is countable, false otherwise. 525 525 */ 526 526 function is_countable( $var ) { 527 527 528 return ( is_array( $var ) 528 529 || $var instanceof Countable 529 530 || $var instanceof SimpleXMLElement … … 532 533 } 533 534 } 534 535 535 if ( ! function_exists( 'is_iterable' ) ) {536 if ( ( version_compare( PHP_VERSION, '7.3' ) > 0 && ! function_exists( 'is_iterable' ) ) { 536 537 /** 537 538 * Polyfill for is_iterable() function added in PHP 7.1. 538 539 *