From 780678b827a6407240c7fbfa8140604798aaff19 Mon Sep 17 00:00:00 2001 From: JM <55jeka@gmail.com> Date: Fri, 5 Jul 2019 08:34:16 +0300 Subject: [PATCH] fix php 7.2. ErrorException on processWarnings Fix php 7.2 ErrorException: count(): Parameter must be an array or an object that implements Countable --- src/Dispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dispatcher.php b/src/Dispatcher.php index 4e722c9..7df8aaa 100644 --- a/src/Dispatcher.php +++ b/src/Dispatcher.php @@ -341,7 +341,7 @@ private function processError($error) { */ private function processWarnings($warnings) { $result = array(); - if(\count($warnings) === 1) { + if($warnings instanceof \stdClass) { $result[\intval($warnings->kod_varov)] = $this->getWarningMsg($warnings->kod_varov); } else { foreach ($warnings as $warning) {