From 6adf5c55ce8cbaf51b73bd468a63a5f065f29904 Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Wed, 25 Apr 2018 20:24:25 +0200 Subject: [PATCH] Update is_countable to include countable objects that doesn't implement \Countable --- bootstrap.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 9a58950..a08c147 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -12,7 +12,10 @@ if (PHP_VERSION_ID < 70300) { if (!function_exists('is_countable')) { function is_countable($var) { - return is_array($var) || $var instanceof Countable; + return is_array($var) + || $var instanceof Countable + || $var instanceof ResourceBundle + || $var instanceof SimpleXmlElement; } } }