Skip to content

Commit 6adf5c5

Browse files
committed
Update is_countable to include countable objects that doesn't implement \Countable
1 parent f713942 commit 6adf5c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bootstrap.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
if (PHP_VERSION_ID < 70300) {
1313
if (!function_exists('is_countable')) {
1414
function is_countable($var) {
15-
return is_array($var) || $var instanceof Countable;
15+
return is_array($var)
16+
|| $var instanceof Countable
17+
|| $var instanceof ResourceBundle
18+
|| $var instanceof SimpleXmlElement;
1619
}
1720
}
1821
}

0 commit comments

Comments
 (0)