Fixes #8613: FragmentCache storing empty content causes problem with PageCache

This commit is contained in:
kidol
2015-05-31 15:31:07 +02:00
parent 816ebd1e17
commit 9b3a6989f5
2 changed files with 4 additions and 0 deletions

View File

@ -104,6 +104,9 @@ class FragmentCache extends Widget
echo $content;
} elseif ($this->cache instanceof Cache) {
$content = ob_get_clean();
if ($content === false || $content === '') {
return;
}
array_pop($this->getView()->cacheStack);
if (is_array($this->dependency)) {
$this->dependency = Yii::createObject($this->dependency);