Issue Bug Closed

#23253intExplode somehow returns comma-containing string values

Björn Pedersen 07/23/10, 10:02 updated 03/29/11, 14:24

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.