From 8cc09824a8df6799e32ab043568cff8b68214543 Mon Sep 17 00:00:00 2001 From: Etienne Roudeix Date: Wed, 21 Aug 2013 09:28:50 +0200 Subject: [PATCH] feature value loop fix --- core/lib/Thelia/Core/Template/Loop/FeatureValue.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/FeatureValue.php b/core/lib/Thelia/Core/Template/Loop/FeatureValue.php index 2d5689462..6e5d05057 100755 --- a/core/lib/Thelia/Core/Template/Loop/FeatureValue.php +++ b/core/lib/Thelia/Core/Template/Loop/FeatureValue.php @@ -133,10 +133,12 @@ class FeatureValue extends BaseLoop $loopResultRow->set("PERSONAL_VALUE", $featureValue->getByDefault()); - $loopResultRow->set("TITLE", $featureValue->getFeatureAv()->getTitle()); - $loopResultRow->set("CHAPO", $featureValue->getFeatureAv()->getChapo()); - $loopResultRow->set("DESCRIPTION", $featureValue->getFeatureAv()->getDescription()); - $loopResultRow->set("POSTSCRIPTUM", $featureValue->getFeatureAv()->getPostscriptum()); + $featureAvailability = $featureValue->getFeatureAv(); + + $loopResultRow->set("TITLE", ($featureAvailability === null ? '' : $featureAvailability->getTitle())); + $loopResultRow->set("CHAPO", ($featureAvailability === null ? '' : $featureAvailability->getChapo())); + $loopResultRow->set("DESCRIPTION", ($featureAvailability === null ? '' : $featureAvailability->getDescription())); + $loopResultRow->set("POSTSCRIPTUM", ($featureAvailability === null ? '' : $featureAvailability->getPostscriptum())); $loopResult->addRow($loopResultRow); }