Fix incorrect __isset().

There was a missing $ before name.  Fixes issues
with dynamic properties not being handled correctly.

Fixes #2450
This commit is contained in:
mark_story 2012-01-09 21:47:57 -05:00
parent b8598c5ca0
commit d238d8c0bb
2 changed files with 13 additions and 1 deletions

View file

@ -1236,4 +1236,16 @@ Element content.
TEXT;
$this->assertEquals($expected, $content);
}
/**
* Test that setting arbitrary properties still works.
*
* @return void
*/
public function testPropertySetting() {
$this->assertFalse(isset($this->View->pageTitle));
$this->View->pageTitle = 'test';
$this->assertTrue(isset($this->View->pageTitle));
$this->assertEquals('test', $this->View->pageTitle);
}
}

View file

@ -796,7 +796,7 @@ class View extends Object {
* @return boolean
*/
public function __isset($name) {
return isset($this->name);
return isset($this->{$name});
}
/**