Block the smarty interpretation in the elseloop
This commit is contained in:
@@ -215,12 +215,15 @@ class TheliaLoop extends AbstractSmartyPlugin
|
|||||||
*/
|
*/
|
||||||
public function theliaElseloop($params, $content, /** @noinspection PhpUnusedParameterInspection */ $template, &$repeat)
|
public function theliaElseloop($params, $content, /** @noinspection PhpUnusedParameterInspection */ $template, &$repeat)
|
||||||
{
|
{
|
||||||
// When encountering close tag, check if loop has results.
|
//Block the smarty interpretation in the elseloop
|
||||||
if ($repeat === false) {
|
if ($content === null) {
|
||||||
return $this->checkEmptyLoop($params) ? $content : '';
|
if ( ! $this->checkEmptyLoop($params)){
|
||||||
|
$repeat = false;
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user