Fix warning

Warning: sizeof(): Parameter must be an array or an object that implements Countable in lib/PayPal/Common/PayPalModel.php on line 178
This commit is contained in:
Pavel Ven Gulbin
2017-10-03 19:10:23 +03:00
committed by GitHub
parent 2afc181f50
commit 1df6286dc9

View File

@@ -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);