[TYPO3-core] RFC #9979: Bug: enableFields doesn't work with boolean as parameter
t3 at aafhh.de
Wed Dec 9 01:25:07 CET 2009
I know you had a lot of stress with the release of 4.3. But hopefully
you had enough time to relax now. So this is
Michael Knabe schrieb:
> This is an SVN patch request.
> Type: Bugfix
> Bugtracker references:
> Branch: Trunk
> According to typo3conf/ext/t3dev/apidocs/tslib_content_api.html
> the method enableFields expects a boolean as the second parameter
> ($show_hidden) but only integers lead to the desired result.
> enableFields($table, TRUE) does not work correctly while
> enableFields($table, 1) does.
> The reason is found in t3lib_pageSelect::enableFields(), where -1 is
> used as the default value for $show_hidden. That default value means
> "look in $GLOBALS['TSFE']->showHiddenRecords for the real $show_hidden
> value" . The problem is, how $show_hidden is tested for -1:
> "$show_hidden==-1" evaluates to TRUE for $show_hidden===TRUE.
> Change the comparison to identity (===)
More information about the TYPO3-team-core