From cea6491d77e62b7daabbad6a895b77a9ce158aee Mon Sep 17 00:00:00 2001 From: Guillaume Barral Date: Fri, 25 Jul 2014 10:33:52 +0200 Subject: [PATCH] Respect of the good standards --- core/lib/Thelia/Action/Product.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php index 3bd54c22e..9cef94218 100644 --- a/core/lib/Thelia/Action/Product.php +++ b/core/lib/Thelia/Action/Product.php @@ -269,12 +269,12 @@ class Product extends BaseAction implements EventSubscriberInterface $product = $event->getProduct(); // Delete all product feature relations - if(null != $feature_products = FeatureProductQuery::create()->findByProductId($product->getId())){ - /** @var \Thelia\Model\FeatureProduct $feature_product */ - foreach($feature_products as $feature_product){ - $event_delete = new FeatureProductDeleteEvent($product->getId(), $feature_product->getFeatureId()); + if(null !== $featureProducts = FeatureProductQuery::create()->findByProductId($product->getId())){ + /** @var \Thelia\Model\FeatureProduct $featureProduct */ + foreach($featureProducts as $featureProduct){ + $eventDelete = new FeatureProductDeleteEvent($product->getId(), $featureProduct->getFeatureId()); - $event->getDispatcher()->dispatch(TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE, $event_delete); + $event->getDispatcher()->dispatch(TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE, $eventDelete); } }