#19721enableFields doesn't work with boolean as parameter
Description
According to typo3conf/ext/t3dev/apidocs/tslib_content_api.html the method enableFields expects a boolean as the second parameter ($show_hidden), but if I give TRUE as $show_hidden, I don’t get the expected result. However, if I give 1 it works.
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: “if($show_hidden==-1)” is true for $show_hidden=TRUE.
This check should either be changed to “if($show_hidden===-1)” or the documentation has to be changed.
(issue imported from #M9979)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.