// Small fixes and code cleaning

This commit is contained in:
Damien Metzger
2013-07-23 09:50:26 +02:00
parent 91c5d184b6
commit 9169995adc
2 changed files with 9 additions and 21 deletions
+3 -2
View File
@@ -868,12 +868,13 @@ class ProductCore extends ObjectModel
AND cp.id_product = '.$this->id
);
foreach ($result as $categ_to_delete)
$this->deleteCategory($categ_to_delete['id_category']);
// if none are found, it's an error
if (!is_array($result))
return false;
foreach ($result as $categ_to_delete)
$this->deleteCategory($categ_to_delete['id_category']);
if (!$this->addToCategories($categories))
return false;