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