diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index ad5e6b2d6..7e4bd7573 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -481,7 +481,7 @@ class View extends Object { } $this->_triggerHelpers('beforeLayout'); - $this->output = $this->_render($layoutFileName, $data_for_layout, $loadHelpers); + $this->output = $this->_render($layoutFileName, $data_for_layout, $loadHelpers, true); if ($this->output === false) { $this->output = $this->_render($layoutFileName, $data_for_layout); diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index 7339e92e7..9edb431bf 100644 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -774,7 +774,10 @@ class ViewTest extends CakeTestCase { ob_start(); $View->renderCache($path, '+1 second'); $result = ob_get_clean(); - $this->assertFalse(empty($result)); + + $expected = 'some cacheText'; + $this->assertPattern('/^some cacheText/', $result); + @unlink($path); }