Calling $this->Property or $this->obj('Property') in DataObject overloaded method getProperty() results in [Notice] Undefined property: DataObject::$Property.
Interesting fact: Calling $this->Nonexistent (where Nonexistent is any undefined property) doesn't result in any Notice/Error whatsoever.
Example:
class News extends DataObject {
public static $db = Array(
'Title' => 'Text',
'Content' => 'HTMLText',
);
public function getTitle() {
Debug::dump($this->Content); //works fine as we are not in getContent() method
Debug::dump($this->AnythingUndefined); //doesn't cause any trouble, returns empty string
return $this->Title; //source of the problem
}
}
using SilverStripe 3.0.5