Due to some wrong or missing checks the link to create a shortcut
to a create new record form misses the correct name of the
"motherModName" as a result the shortcut links are not rendered
for non-admins. For admins these links do not work if PHP notices
are transformed to exceptions.
Resolves: #59946
Releases: 6.3, 6.2
Change-Id: I9acd74fd5dfefea62badc79e42e380466ce6c497
Reviewed-on: https://review.typo3.org/31198
Reviewed-by: Markus Klein
Tested-by: Markus Klein
}
}
// Default values as submitted:
- if (is_array($this->defVals[$table])) {
+ if (!empty($this->defVals[$table]) && is_array($this->defVals[$table])) {
foreach ($this->defVals[$table] as $theF => $theV) {
if (isset($GLOBALS['TCA'][$table]['columns'][$theF])) {
$newRow[$theF] = $theV;
if (preg_match('/typo3\\/mod\\.php$/', $pathInfo['path']) && isset($GLOBALS['TBE_MODULES']['_PATHS'][$modName])) {
$storeUrl = '&M=' . $modName . $storeUrl;
}
- if ($motherModName === '1') {
+ if ((int)$motherModName === 1) {
$mMN = '&motherModName=\'+top.currentModuleLoaded+\'';
} elseif ($motherModName) {
$mMN = '&motherModName=' . rawurlencode($motherModName);
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
$icon = IconUtility::getIcon($table, $row, $this->backPath);
} elseif ($shortcut['type'] == 'new') {
- $icon = IconUtility::getIcon($table, '', $this->backPath);
+ $icon = IconUtility::getIcon($table, array(), $this->backPath);
}
$icon = IconUtility::skinImg($this->backPath, $icon, '', 1);
break;