Merge pull request #413 from Robbt/fix/check_is_block_before_is_static

This adds an additional check to prevent calling a non-existent function
This commit is contained in:
Lucas Bickel 2018-01-19 20:05:54 +01:00 committed by GitHub
commit 94d21344b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ $isSmartBlock = ($this->obj instanceof Application_Model_Block);
$isPlaylist = ($this->obj instanceof Application_Model_Playlist);
if (count($items) && ($isSmartBlock || $isPlaylist)) : ?>
<?php $i = 0; ?>
<?php if (!($this->obj->isStatic())) {
<?php if ($isSmartBlock && !($this->obj->isStatic())) {
echo _("</br>This is only a preview of possible content generated by the smart block based upon the above criteria.");}
?>
<?php foreach($items as $item) :