Actions
Bug #23253
closedintExplode somehow returns comma-containing string values
Start date:
2010-07-23
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
An strange uncaugt exception error happens sometime during felogin.
We get the following error backtrace during login (see attached error.png).
Looking at the code, there should never be string values or commas in the meberGroups array.
/**
* Creating where-clause for checking group access to elements in enableFields function
*
* @param string Field with group list
* @param string Table name
* @return string AND sql-clause
* @see enableFields()
*/
function getMultipleGroupsWhereClause($field, $table) {
$memberGroups = t3lib_div::intExplode(',',$GLOBALS['TSFE']->gr_list);
$orChecks=array();
$orChecks[]=$field.'=\'\''; // If the field is empty, then OK
$orChecks[]=$field.' IS NULL'; // If the field is NULL, then OK
$orChecks[]=$field.'=\'0\''; // If the field contsains zero, then OK
foreach($memberGroups as $value) {
$orChecks[] = $GLOBALS['TYPO3_DB']->listQuery($field, $value, $table);
}
return ' AND ('.implode(' OR ',$orChecks).')';
}
(issue imported from #M15211)
Files
Actions