mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #8613: FragmentCache storing empty content causes problem with PageCache
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user