[TYPO3-core] RFC: Bug #7203: Hook cObjTypeAndClassDefault in tslib_content somtimes fails
Oliver Hader
oh at inpublica.de
Fri Jan 18 14:53:59 CET 2008
Hi Stefan,
Stefan Geith schrieb:
> This is a SVN patch request.
>
> Problem:
> Hook cObjTypeAndClassDefault in tslib_content is sometimes called, even
> if $conf-Array is empty or $name is empty.
> This causes an error if you use this hook, because the interface needs
> $conf to be an array.
> This hook was introduced by patch from
> http://bugs.typo3.org/view.php?id=5536
>
> Solution:
> Solution: check on (is_array($conf) && $name)
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=7203
>
> Branches: Trunk
Good idea to change this, thanks for your patch!
But I have some annotations:
* the check against $name is fine with me
* the is_array() check not
The following TypoScript won't work then with the hook:
10 = COA
10 {
10 = MYOWNSTATICBLOCK
}
So i tend to check at the beginning of cObjGetSingle() if $conf is an
array and if not create an empty array.
olly
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-team-core
mailing list