From 1df6286dc95039e1e2a41cd24ddcfe492ac20544 Mon Sep 17 00:00:00 2001 From: Pavel Ven Gulbin <2tvenom@gmail.com> Date: Tue, 3 Oct 2017 19:10:23 +0300 Subject: [PATCH] Fix warning Warning: sizeof(): Parameter must be an array or an object that implements Countable in lib/PayPal/Common/PayPalModel.php on line 178 --- lib/PayPal/Common/PayPalModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PayPal/Common/PayPalModel.php b/lib/PayPal/Common/PayPalModel.php index 65ee8dd..2cab284 100644 --- a/lib/PayPal/Common/PayPalModel.php +++ b/lib/PayPal/Common/PayPalModel.php @@ -175,7 +175,7 @@ class PayPalModel foreach ($param as $k => $v) { if ($v instanceof PayPalModel) { $ret[$k] = $v->toArray(); - } elseif (sizeof($v) <= 0 && is_array($v)) { + } elseif (is_array($v) && sizeof($v) <= 0) { $ret[$k] = array(); } elseif (is_array($v)) { $ret[$k] = $this->_convertToArray($v);