diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index 32f3eee15..a7452671e 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -149,6 +149,7 @@ class Helper extends Object { * @param array $settings Configuration settings for the helper. */ public function __construct(View $View, $settings = array()) { + $this->View = $View; // Nothing to see here. } diff --git a/cake/tests/cases/libs/view/helper.test.php b/cake/tests/cases/libs/view/helper.test.php index 5d20a1e18..8a750c9c1 100644 --- a/cake/tests/cases/libs/view/helper.test.php +++ b/cake/tests/cases/libs/view/helper.test.php @@ -196,7 +196,7 @@ class HelperTest extends CakeTestCase { Router::reload(); $null = null; $this->View = new View($null); - $this->Helper = new Helper(); + $this->Helper = new Helper($this->View); ClassRegistry::addObject('HelperTestPost', new HelperTestPost()); ClassRegistry::addObject('HelperTestComment', new HelperTestComment()); ClassRegistry::addObject('HelperTestTag', new HelperTestTag()); @@ -771,7 +771,7 @@ class HelperTest extends CakeTestCase { * @return void */ function testParseAttributeCompact() { - $helper =& new TestHelper(); + $helper =& new TestHelper($this->View); $compact = array('compact', 'checked', 'declare', 'readonly', 'disabled', 'selected', 'defer', 'ismap', 'nohref', 'noshade', 'nowrap', 'multiple', 'noresize');