From 98045a1d5ac45967d4b7ec49dc709c2d49a1d6a4 Mon Sep 17 00:00:00 2001 From: Rico Neitzel Date: Wed, 3 Jul 2019 22:57:11 +0200 Subject: [PATCH] fixes php7.2 compatibility see: https://github.com/paypal/PayPal-PHP-SDK/issues/1014 --- 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 fdfaba8..b228320 100644 --- a/lib/PayPal/Common/PayPalModel.php +++ b/lib/PayPal/Common/PayPalModel.php @@ -173,7 +173,7 @@ private function _convertToArray($param) foreach ($param as $k => $v) { if ($v instanceof PayPalModel) { $ret[$k] = $v->toArray(); - } else if (sizeof($v) <= 0 && is_array($v)) { + } else if (is_array($v) && sizeof($v) <= 0) { $ret[$k] = array(); } else if (is_array($v)) { $ret[$k] = $this->_convertToArray($v);