diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1fcb76a571d..7d91052ab87 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1194,9 +1194,13 @@ class Product extends CommonObject } //We also check if it is a child product - if (!$error && ($prodcomb->fetchByFkProductChild($this->id) > 0) && ($prodcomb->delete($user) < 0)) { - $error++; - $this->errors[] = 'Error deleting child combination'; + if (!$error) { + foreach ($prodcomb->fetchAllByFkProductChild($this->id) as $obj) { + if ($obj->delete($user) < 0) { + $error++; + $this->errors[] = 'Error deleting child combination'; + } + } } }