mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-16 03:28:56 +08:00
Fixes #11132: Fixed yii\widgets\FragmentCache not handling empty content correctly in all cases
This commit is contained in:
@@ -25,6 +25,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #11026: Fixed `StringHelper::truncateWords()` to count words properly for non-English text (samdark, tol17)
|
||||
- Bug #11040: Check parameter 'recursive' and disable recursive copying with option 'recursive' => false in method BaseFileHelper::copyDirectory (Ni-san)
|
||||
- Bug #11125: Fixed `JSON_ERROR_SYNTAX` for `json_decode(null)` in PHP 7 (fps01)
|
||||
- Bug #11132: Fixed `yii\widgets\FragmentCache` not handling empty content correctly in all cases (kidol)
|
||||
- Bug #11188: Fixed wrong index usage in `CaptchaAction` when calling `imagefilledrectangle` (alsopub)
|
||||
- Bug #11220: NumberValidator now handles objects properly (samdark)
|
||||
- Bug #11221: Boolean validator generates incorrect error message (azaikin, githubjeka)
|
||||
|
||||
@@ -104,11 +104,12 @@ class FragmentCache extends Widget
|
||||
if (($content = $this->getCachedContent()) !== false) {
|
||||
echo $content;
|
||||
} elseif ($this->cache instanceof Cache) {
|
||||
array_pop($this->getView()->cacheStack);
|
||||
|
||||
$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