[TYPO3-mvc] Fatal error: Cannot access private property in AbstractDomainObject.php on line 260
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Tue Feb 17 13:25:44 CET 2015
Hello again,
the Debug Viewhelper seems to be the issue. When not using it, the error
does not appear.
Best wishes,
Till
On 02/16/2015 11:49 PM, g4-lisz at tonarchiv.ch wrote:
> Hi there,
>
> is there no way to have variables in a model class for internal use only?
>
> I have a variable:
>
> private $_last = NULL;
>
>
> public function getLast() {
> if ($this->_last == NULL) {
>
> /* some time consuming stuff */
> }
>
> return $this->_last;
> }
>
> I do this because getLast gets called several times in one and the same
> template.
>
> Then I get the error:
> Fatal error: Cannot access private property
> XX\Domain\Model\BetriebRehaleistung::$_last in
> /var/www/typo3_src-6.2.5/typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
> on line 260
>
> Ok I can change private to protected. But why needs AbstractDomainObject
> to access this property?
>
> Even more strange is the fact that the same code works for other model
> classes...
>
> Cheers,
> Till
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list