From a0b78502d601c0f9bc9969c55a38e2f1df63fedc Mon Sep 17 00:00:00 2001 From: Guillaume Barral Date: Fri, 25 Jul 2014 16:10:09 +0200 Subject: [PATCH] Block the smarty interpretation in the elseloop --- .../Core/Template/Smarty/Plugins/TheliaLoop.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php index bf3538002..e041b1d15 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php @@ -215,12 +215,15 @@ class TheliaLoop extends AbstractSmartyPlugin */ public function theliaElseloop($params, $content, /** @noinspection PhpUnusedParameterInspection */ $template, &$repeat) { - // When encountering close tag, check if loop has results. - if ($repeat === false) { - return $this->checkEmptyLoop($params) ? $content : ''; + //Block the smarty interpretation in the elseloop + if ($content === null) { + if ( ! $this->checkEmptyLoop($params)){ + $repeat = false; + return ''; + } } - return ''; + return $content; } /**