diff --git a/Adapter/PlentymarketsAdapter/ResponseParser/Category/CategoryResponseParser.php b/Adapter/PlentymarketsAdapter/ResponseParser/Category/CategoryResponseParser.php index 7e11f4817..50182815d 100644 --- a/Adapter/PlentymarketsAdapter/ResponseParser/Category/CategoryResponseParser.php +++ b/Adapter/PlentymarketsAdapter/ResponseParser/Category/CategoryResponseParser.php @@ -153,7 +153,7 @@ public function parse(array $entry) 'parentIdentifier' => $parentCategoryIdentifier, 'shopIdentifiers' => $shopIdentifiers, 'imageIdentifiers' => $this->getImages($validDetails['0'], $result), - 'position' => $validDetails['0']['position'], + 'position' => (int) $validDetails['0']['position'], 'description' => $validDetails['0']['shortDescription'], 'longDescription' => $validDetails['0']['description'], 'metaTitle' => $validDetails['0']['metaTitle'], diff --git a/CHANGELOG.md b/CHANGELOG.md index 76d75c05d..bfd92e223 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.0.5] +### Fixed +- force category position to integer + ## [4.0.4] ### Added - prepayment is now mapped correctly diff --git a/Connector/Validator/Category/CategoryValidator.php b/Connector/Validator/Category/CategoryValidator.php index 4e58144cf..886d5cda6 100644 --- a/Connector/Validator/Category/CategoryValidator.php +++ b/Connector/Validator/Category/CategoryValidator.php @@ -36,7 +36,6 @@ public function validate($object) Assertion::allUuid($object->getImageIdentifiers(), null, 'category.imageIdentifiers'); Assertion::integer($object->getPosition(), null, 'category.position'); - Assertion::greaterOrEqualThan($object->getPosition(), 0, null, 'category.position'); Assertion::string($object->getDescription(), null, 'category.description'); Assertion::string($object->getLongDescription(), null, 'category.longDescription');