[TYPO3-core] RFC: links with forced type 0

Ingmar Schlecht ingmar at typo3.org
Wed Jan 3 12:17:20 CET 2007


Hi Thorsten,

Thorsten Kahler schrieb:
> Problem: It's not possible to generate typolinks to the default type 0 when
> the current type is different from 0. The parameter $typeOverride is
> implicitly casted to boolean false in t3lib_tstemplate::linkData().

I see.

> -		if (!$typeOverride && intval($GLOBALS['TSFE']->config['config']['forceTypeValue']))	{
> +		if ($typeOverride==='' && intval($GLOBALS['TSFE']->config['config']['forceTypeValue']))	{

That's wrong, because even if $typeOverride would be NULL of FALSE, it
would not take the default value defined in
$GLOBALS['TSFE']->config['config']['forceTypeValue'].

Please use !t3lib_div::testInt($typeOverride) instead.

cheers
Ingmar


More information about the TYPO3-team-core mailing list