Block the smarty interpretation in the elseloop

This commit is contained in:
Guillaume Barral
2014-07-25 16:10:09 +02:00
parent 1b2cbe6746
commit a0b78502d6

View File

@@ -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;
}
/**