Project

General

Profile

Actions

Bug #23253

closed

intExplode somehow returns comma-containing string values

Added by Björn Pedersen over 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
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

typo error.png (66.1 KB) typo error.png Administrator Admin, 2010-07-23 10:02
t3lib_db_listQuery.diff (524 Bytes) t3lib_db_listQuery.diff Administrator Admin, 2010-07-23 10:40
15211-v2.diff (2.44 KB) 15211-v2.diff Administrator Admin, 2010-07-24 08:54

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22959: t3lib_db->listQuery() performanceClosedXavier Perseguers2010-06-22

Actions
Actions

Also available in: Atom PDF