Project

General

Profile

Actions

Bug #19721

closed

enableFields doesn't work with boolean as parameter

Added by Michael Knabe almost 16 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-12-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Files

9979.diff (1.11 KB) 9979.diff Administrator Admin, 2009-08-28 21:15
Actions

Also available in: Atom PDF