[TYPO3-core] RFC: Bug #7203: Hook cObjTypeAndClassDefault in tslib_content somtimes fails : Reminder

Stefan Geith typo3dev2008.nospam1 at geithware.de
Wed Feb 6 12:43:52 CET 2008


Reminder:



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
> 
> 
> Stefan Geith
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: class.tslib_content.php
> ===================================================================
> --- class.tslib_content.php	(revision 2922)
> +++ class.tslib_content.php	(working copy)
> @@ -584,7 +584,7 @@
>  						break;
>  						default:
>  								// call hook functions for extra processing
> -							if(is_array($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault']))    {
> +							if($name && is_array($conf) && is_array($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault']))    {
>  								foreach($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData)    {
>  									$hookObject = &t3lib_div::getUserObj($classData);
>  


More information about the TYPO3-team-core mailing list