summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
05c6b4f)
BackendUtility::getProcessedValue() fails to initialize a variable which
causes a PHP warning on array access.
Fix this by initializing the variable to array properly.
Resolves: #59994
Releases: 6.3, 6.2
Change-Id: I26711b512a9a7fad40000de6f2de6a2b4a81ac75
Reviewed-on: https://review.typo3.org/31243
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
$selectUids = $dbGroup->tableArray[$theColConf['foreign_table']];
if (is_array($selectUids) && count($selectUids) > 0) {
$MMres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, ' . $MMfield, $theColConf['foreign_table'], 'uid IN (' . implode(',', $selectUids) . ')' . self::deleteClause($theColConf['foreign_table']));
$selectUids = $dbGroup->tableArray[$theColConf['foreign_table']];
if (is_array($selectUids) && count($selectUids) > 0) {
$MMres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, ' . $MMfield, $theColConf['foreign_table'], 'uid IN (' . implode(',', $selectUids) . ')' . self::deleteClause($theColConf['foreign_table']));
while ($MMrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMres)) {
// Keep sorting of $selectUids
$mmlA[array_search($MMrow['uid'], $selectUids)] = $noRecordLookup ?
while ($MMrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMres)) {
// Keep sorting of $selectUids
$mmlA[array_search($MMrow['uid'], $selectUids)] = $noRecordLookup ?
self::getRecordTitle($theColConf['foreign_table'], $MMrow, FALSE, $forceResult);
}
$GLOBALS['TYPO3_DB']->sql_free_result($MMres);
self::getRecordTitle($theColConf['foreign_table'], $MMrow, FALSE, $forceResult);
}
$GLOBALS['TYPO3_DB']->sql_free_result($MMres);
- ksort($mmlA);
- if (is_array($mmlA)) {
+ if (!empty($mmlA)) {
+ ksort($mmlA);
$l = implode('; ', $mmlA);
} else {
$l = 'N/A';
$l = implode('; ', $mmlA);
} else {
$l = 'N/A';