mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 21:48:36 +01:00
General: In the is_countable()
polyfill, if the provided object implements SimpleXMLElement
or ResourceBundle
, consider it countable.
Props ayeshrajans, jrf, desrosj. Merges [43220] to the 4.9 branch. Fixes #43583. Built from https://develop.svn.wordpress.org/branches/4.9@43221 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fbb106494f
commit
faca308a47
@ -512,7 +512,11 @@ if ( ! function_exists( 'is_countable' ) ) {
|
|||||||
* @return bool True if `$var` is countable, false otherwise.
|
* @return bool True if `$var` is countable, false otherwise.
|
||||||
*/
|
*/
|
||||||
function is_countable( $var ) {
|
function is_countable( $var ) {
|
||||||
return ( is_array( $var ) || $var instanceof Countable );
|
return ( is_array( $var )
|
||||||
|
|| $var instanceof Countable
|
||||||
|
|| $var instanceof SimpleXMLElement
|
||||||
|
|| $var instanceof ResourceBundle
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9.6-beta1-43219';
|
$wp_version = '4.9.6-beta1-43221';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user