Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Magento\Framework\Webapi;

use Laminas\Code\Reflection\ClassReflection;
use Magento\Framework\Api\AttributeValue;
use Magento\Framework\Api\AttributeValueFactory;
use Magento\Framework\Api\SearchCriteriaInterface;
Expand All @@ -22,9 +23,8 @@
use Magento\Framework\Phrase;
use Magento\Framework\Reflection\MethodsMap;
use Magento\Framework\Reflection\TypeProcessor;
use Magento\Framework\Webapi\Exception as WebapiException;
use Magento\Framework\Webapi\CustomAttribute\PreprocessorInterface;
use Laminas\Code\Reflection\ClassReflection;
use Magento\Framework\Webapi\Exception as WebapiException;
use Magento\Framework\Webapi\Validator\IOLimit\DefaultPageSizeSetter;
use Magento\Framework\Webapi\Validator\ServiceInputValidatorInterface;

Expand Down Expand Up @@ -564,6 +564,8 @@ private function processComplexTypes($data, $type)

if (!$isArrayType) {
return $this->_createFromArray($type, $data);
} elseif (!is_array($data)) {
throw new InvalidArgumentException(__('Not all parameters valid.'));
}

$result = is_array($data) ? [] : null;
Expand Down