diff --git a/README.md b/README.md index c7a1834..5cfdba9 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ Icecat is a PHP library, that assists you in the following 2 procedures: * Fetching data from the Icecat database using basic product information. * Parsing this data from the Icecat response, and using them in real life applications. +> +> **v1.0.2:** +> +> - trim() vendor and sku/mpn values + ### About Icecat [Icecat](http://icecat.biz, "Icecat") is an open catalog, providing free access to thousands of product datasheets. In extend, when taking a subscription, the amount of accessible datasheets are increased. diff --git a/composer.json b/composer.json index a7f322c..91427cc 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "email": "support@icoders.co" } ], - "version": "1.0.0", + "version": "1.0.2", "license": "MIT", "minimum-stability": "dev", "require": { diff --git a/src/Icecat/Api.php b/src/Icecat/Api.php index 63255d5..10e0d49 100644 --- a/src/Icecat/Api.php +++ b/src/Icecat/Api.php @@ -138,9 +138,9 @@ public function getArticleByEAN($ean, $lang='HU') public function getArticleByMPN($vendor, $mpn, $lang='HU') { $params = array( - 'prod_id' => $mpn, - 'vendor' => $vendor, - 'lang' => $lang, + 'prod_id' => trim($mpn), + 'vendor' => trim($vendor), + 'lang' => trim($lang), 'output' => 'productxml' );