shoppingflux / shoppingfluxexport

7 stars 7 forks source link

Checking if the product exist with an attribute may fail #422

Closed ghost closed 6 years ago

ghost commented 6 years ago

The current way of checking if a product ID and an attribute exists in checkData is sometimes not working.

When the product ID and attribute ID doesn't exist, the following message is returned Product is not active, product_id = XYZ instead of Product or attribute doesn't exist ....

This is due to getRow function that may return an empty array or a boolean (false) in case of empty response due to PrestaShop cache system in the DB instance.

Changes made

Secure the condition