Commit eac7d30c authored by Tymoteusz Motylewski's avatar Tymoteusz Motylewski Committed by Andreas Fernandez
Browse files

[BUGFIX] Fix notices in Filelist module

Resolves: #83002
Releases: master
Change-Id: I06c09f282df7fdcc0d8af11d65c5113f33a9c849
Reviewed-on: https://review.typo3.org/54651


Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
parent 67a7dddc
......@@ -370,7 +370,7 @@ class Clipboard
public function getContentFromTab($pad)
{
$lines = [];
if (is_array($this->clipData[$pad]['el'])) {
if (is_array($this->clipData[$pad]['el'] ?? false)) {
foreach ($this->clipData[$pad]['el'] as $k => $v) {
if ($v) {
list($table, $uid) = explode('|', $k);
......@@ -752,7 +752,7 @@ class Clipboard
$params = [];
$params['tx_impexp']['action'] = 'export';
// Traverse items:
if (is_array($this->clipData[$pad]['el'])) {
if (is_array($this->clipData[$pad]['el'] ?? false)) {
foreach ($this->clipData[$pad]['el'] as $k => $v) {
if ($v) {
list($table, $uid) = explode('|', $k);
......@@ -808,7 +808,7 @@ class Clipboard
*/
public function currentMode()
{
return $this->clipData[$this->current]['mode'] === 'copy' ? 'copy' : 'cut';
return ($this->clipData[$this->current]['mode'] ?? '') === 'copy' ? 'copy' : 'cut';
}
/**
......@@ -817,7 +817,7 @@ class Clipboard
*/
public function cleanCurrent()
{
if (is_array($this->clipData[$this->current]['el'])) {
if (is_array($this->clipData[$this->current]['el'] ?? false)) {
foreach ($this->clipData[$this->current]['el'] as $k => $v) {
list($table, $uid) = explode('|', $k);
if ($table !== '_FILE') {
......@@ -853,7 +853,7 @@ class Clipboard
{
$pad = $pad ? $pad : $this->current;
$list = [];
if (is_array($this->clipData[$pad]['el'])) {
if (is_array($this->clipData[$pad]['el'] ?? false)) {
foreach ($this->clipData[$pad]['el'] as $k => $v) {
if ($v) {
list($table, $uid) = explode('|', $k);
......@@ -883,7 +883,7 @@ class Clipboard
public function isSelected($table, $uid)
{
$k = $table . '|' . $uid;
return $this->clipData[$this->current]['el'][$k] ? ($this->current === 'normal' ? $this->currentMode() : 1) : '';
return !empty($this->clipData[$this->current]['el'][$k]) ? ($this->current === 'normal' ? $this->currentMode() : 1) : '';
}
/**
......
......@@ -57,7 +57,7 @@ class MetaInformation
$pageRecord = $this->recordArray;
$title = '';
// Is this a real page
if (is_array($pageRecord) && $pageRecord['uid']) {
if (is_array($pageRecord) && !empty($pageRecord['uid'])) {
$title = substr($pageRecord['_thePathFull'], 0, -1);
// Remove current page title
$pos = strrpos($title, $pageRecord['title']);
......@@ -174,7 +174,7 @@ class MetaInformation
$additionalInfo = (!empty($pageRecord['_additional_info']) ? $pageRecord['_additional_info'] : '');
// Add icon with context menu, etc:
// If there IS a real page
if (is_array($pageRecord) && $pageRecord['uid']) {
if (is_array($pageRecord) && !empty($pageRecord['uid'])) {
$toolTip = BackendUtility::getRecordToolTip($pageRecord, 'pages');
$iconImg = '<span ' . $toolTip . '>' . $iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
// Make Icon:
......@@ -185,7 +185,7 @@ class MetaInformation
// If the module is about a FAL resource
try {
$resourceObject = ResourceFactory::getInstance()->getInstance()->getObjectFromCombinedIdentifier($pageRecord['combined_identifier']);
$fileMountTitle = $resourceObject->getStorage()->getFileMounts()[$resourceObject->getIdentifier()]['title'];
$fileMountTitle = $resourceObject->getStorage()->getFileMounts()[$resourceObject->getIdentifier()]['title'] ?? '';
$title = $fileMountTitle ?: $resourceObject->getName();
// If this is a folder but not in within file mount boundaries this is the root folder
if ($resourceObject instanceof FolderInterface && !$resourceObject->getStorage()->isWithinFileMountBoundaries($resourceObject)) {
......
......@@ -256,7 +256,7 @@ function jumpToUrl(URL) {
$this->scriptID = ltrim(GeneralUtility::_GET('route'), '/');
$this->bodyTagId = preg_replace('/[^A-Za-z0-9-]/', '-', $this->scriptID);
// Individual configuration per script? If so, make a recursive merge of the arrays:
if (is_array($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID])) {
if (is_array($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID] ?? false)) {
// Make copy
$ovr = $GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID];
// merge styles.
......@@ -265,16 +265,16 @@ function jumpToUrl(URL) {
unset($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID]);
}
// Main Stylesheets:
if ($GLOBALS['TBE_STYLES']['stylesheet']) {
if (!empty($GLOBALS['TBE_STYLES']['stylesheet'])) {
$this->styleSheetFile = $GLOBALS['TBE_STYLES']['stylesheet'];
}
if ($GLOBALS['TBE_STYLES']['stylesheet2']) {
if (!empty($GLOBALS['TBE_STYLES']['stylesheet2'])) {
$this->styleSheetFile2 = $GLOBALS['TBE_STYLES']['stylesheet2'];
}
if ($GLOBALS['TBE_STYLES']['styleSheetFile_post']) {
if (!empty($GLOBALS['TBE_STYLES']['styleSheetFile_post'])) {
$this->styleSheetFile_post = $GLOBALS['TBE_STYLES']['styleSheetFile_post'];
}
if ($GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle']) {
if (!empty($GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'])) {
$this->inDocStylesArray['TBEstyle'] = $GLOBALS['TBE_STYLES']['inDocStyles_TBEstyle'];
}
// include all stylesheets
......
......@@ -603,7 +603,7 @@ abstract class AbstractTreeView
*/
public function expandNext($id)
{
return $this->stored[$this->bank][$id] || $this->expandAll ? 1 : 0;
return !empty($this->stored[$this->bank][$id]) || $this->expandAll ? 1 : 0;
}
/**
......
......@@ -236,7 +236,7 @@ class FolderTreeView extends AbstractTreeView
}
/**
* Returns the title for the input record. If blank, a "no title" labele (localized) will be returned.
* Returns the title for the input record. If blank, a "no title" label (localized) will be returned.
* '_title' is used for setting an alternative title for folders.
*
* @param array $row The input row array (where the key "_title" is used for the title)
......@@ -245,7 +245,7 @@ class FolderTreeView extends AbstractTreeView
*/
public function getTitleStr($row, $titleLen = 30)
{
return $row['_title'] ?: parent::getTitleStr($row, $titleLen);
return $row['_title'] ?? parent::getTitleStr($row, $titleLen);
}
/**
......@@ -492,7 +492,7 @@ class FolderTreeView extends AbstractTreeView
foreach ($treeItems as $treeItem) {
/** @var $folderObject Folder */
$folderObject = $treeItem['row']['folder'];
$classAttr = $treeItem['row']['_CSSCLASS'];
$classAttr = $treeItem['row']['_CSSCLASS'] ?? '';
$folderIdentifier = $folderObject->getCombinedIdentifier();
// this is set if the AJAX request has just opened this folder (via the PM command)
$isExpandedFolderIdentifier = $expandedFolderHash == GeneralUtility::md5int($folderIdentifier);
......@@ -500,27 +500,27 @@ class FolderTreeView extends AbstractTreeView
$itemHTML = '';
// If this item is the start of a new level,
// then a new level <ul> is needed, but not in ajax mode
if ($treeItem['isFirst'] && !$doCollapse && !($doExpand && $isExpandedFolderIdentifier)) {
if (!empty($treeItem['isFirst']) && !$doCollapse && !($doExpand && $isExpandedFolderIdentifier)) {
$itemHTML = '<ul class="list-tree">';
}
// Add CSS classes to the list item
if ($treeItem['hasSub']) {
if (!empty($treeItem['hasSub'])) {
$classAttr .= ' list-tree-control-open';
}
$itemHTML .= '
<li id="' . $idAttr . '" ' . ($classAttr ? ' class="' . trim($classAttr) . '"' : '') . '><span class="list-tree-group">' . $treeItem['HTML'] . $this->wrapTitle($this->getTitleStr($treeItem['row'], $titleLength), $folderObject, $treeItem['bank']) . '</span>';
if (!$treeItem['hasSub']) {
if (empty($treeItem['hasSub'])) {
$itemHTML .= '</li>';
}
// We have to remember if this is the last one
// on level X so the last child on level X+1 closes the <ul>-tag
if ($treeItem['isLast'] && !($doExpand && $isExpandedFolderIdentifier)) {
if (!empty($treeItem['isLast']) && !($doExpand && $isExpandedFolderIdentifier)) {
$closeDepth[$treeItem['invertedDepth']] = 1;
}
// If this is the last one and does not have subitems, we need to close
// the tree as long as the upper levels have last items too
if ($treeItem['isLast'] && !$treeItem['hasSub'] && !$doCollapse && !($doExpand && $isExpandedFolderIdentifier)) {
for ($i = $treeItem['invertedDepth']; $closeDepth[$i] == 1; $i++) {
if (!empty($treeItem['isLast']) && empty($treeItem['hasSub']) && !$doCollapse && !($doExpand && $isExpandedFolderIdentifier)) {
for ($i = $treeItem['invertedDepth']; !empty($closeDepth[$i]); $i++) {
$closeDepth[$i] = 0;
$itemHTML .= '</ul></li>';
}
......@@ -670,9 +670,9 @@ class FolderTreeView extends AbstractTreeView
}
}
// Take the first three parameters
list($mountKey, $doExpand, $folderIdentifier) = explode('_', $PM, 3);
list($mountKey, $doExpand, $folderIdentifier) = array_pad(explode('_', $PM, 3), 3, null);
// In case the folder identifier contains "_", we just need to get the fourth/last parameter
list($folderIdentifier, $treeName) = GeneralUtility::revExplode('_', $folderIdentifier, 2);
list($folderIdentifier, $treeName) = array_pad(GeneralUtility::revExplode('_', $folderIdentifier, 2), 2, null);
return [
$mountKey,
$doExpand,
......
......@@ -272,7 +272,7 @@ class LanguageService
if (is_array($localLanguage) && !empty($localLanguage)) {
// it depends on, whether we should return the result or set it in the global $LOCAL_LANG array
if ($setGlobal) {
$globalLanguage = (array)$GLOBALS['LOCAL_LANG'];
$globalLanguage = (array)($GLOBALS['LOCAL_LANG'] ?? []);
ArrayUtility::mergeRecursiveWithOverrule($globalLanguage, $localLanguage);
} else {
$globalLanguage = $localLanguage;
......
......@@ -1370,10 +1370,7 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
public function getRole($folderIdentifier)
{
$name = PathUtility::basename($folderIdentifier);
$role = $this->mappingFolderNameToRole[$name];
if (empty($role)) {
$role = FolderInterface::ROLE_DEFAULT;
}
$role = $this->mappingFolderNameToRole[$name] ?? FolderInterface::ROLE_DEFAULT;
return $role;
}
......
......@@ -142,7 +142,7 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
if ($uid === 0 && $fileIdentifier !== null) {
$uid = $this->findBestMatchingStorageByLocalPath($fileIdentifier);
}
if (!$this->storageInstances[$uid]) {
if (empty($this->storageInstances[$uid])) {
$storageConfiguration = null;
$storageObject = null;
list($_, $uid, $recordData, $fileIdentifier) = $this->emitPreProcessStorageSignal($uid, $recordData, $fileIdentifier);
......@@ -374,7 +374,7 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
if (!is_numeric($uid)) {
throw new \InvalidArgumentException('The UID of file has to be numeric. UID given: "' . $uid . '"', 1300096564);
}
if (!$this->fileInstances[$uid]) {
if (empty($this->fileInstances[$uid])) {
// Fetches data in case $fileData is empty
if (empty($fileData)) {
$fileData = $this->getFileIndexRepository()->findOneByUid($uid);
......
......@@ -1570,7 +1570,7 @@ class ResourceStorage implements ResourceStorageInterface
foreach ($allStorages as $storage) {
// To circumvent the permission check of the folder, we use the factory to create it "manually" instead of directly using $storage->getProcessingFolder()
// See #66695 for details
list($storageUid, $processingFolderIdentifier) = GeneralUtility::trimExplode(':', $storage->getStorageRecord()['processingfolder']);
list($storageUid, $processingFolderIdentifier) = array_pad(GeneralUtility::trimExplode(':', $storage->getStorageRecord()['processingfolder']), 2, null);
if (empty($processingFolderIdentifier) || (int)$storageUid !== $this->getUid()) {
continue;
}
......
......@@ -843,7 +843,7 @@ class ExtensionManagementUtility
// If there is already a main module by this name:
// Adding the submodule to the correct position:
if (isset($GLOBALS['TBE_MODULES'][$main]) && $sub) {
list($place, $modRef) = GeneralUtility::trimExplode(':', $position, true);
list($place, $modRef) = array_pad(GeneralUtility::trimExplode(':', $position, true), 2, null);
$modules = ',' . $GLOBALS['TBE_MODULES'][$main] . ',';
if ($place === null || ($modRef !== null && !GeneralUtility::inList($modules, $modRef))) {
$place = 'bottom';
......@@ -1779,7 +1779,7 @@ tt_content.' . $key . $suffix . ' {
global $_EXTKEY;
// Load each ext_tables.php file of loaded extensions
foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $_EXTKEY => $extensionInformation) {
if ((is_array($extensionInformation) || $extensionInformation instanceof \ArrayAccess) && $extensionInformation['ext_tables.php']) {
if ((is_array($extensionInformation) || $extensionInformation instanceof \ArrayAccess) && !empty($extensionInformation['ext_tables.php'])) {
// $_EXTKEY and $_EXTCONF are available in ext_tables.php
// and are explicitly set in cached file as well
$_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] ?? null;
......
......@@ -205,7 +205,7 @@ class GeneralUtility
*/
public static function _POST($var = null)
{
$value = $var === null ? $_POST : (empty($var) ? null : $_POST[$var]);
$value = $var === null ? $_POST : (empty($var) || !isset($_POST[$var]) ? null : $_POST[$var]);
// This is there for backwards-compatibility, in order to avoid NULL
if (isset($value) && !is_array($value)) {
$value = (string)$value;
......@@ -1664,13 +1664,13 @@ class GeneralUtility
break;
case 'complete':
// If "complete", then it's a value. If the attribute "base64" is set, then decode the value, otherwise just set it.
if ($val['attributes']['base64']) {
if (!empty($val['attributes']['base64'])) {
$current[$tagName] = base64_decode($val['value']);
} else {
// Had to cast it as a string - otherwise it would be evaluate FALSE if tested with isset()!!
$current[$tagName] = (string)$val['value'];
$current[$tagName] = (string)($val['value'] ?? '');
// Cast type:
switch ((string)$val['attributes']['type']) {
switch ((string)($val['attributes']['type'] ?? '')) {
case 'integer':
$current[$tagName] = (int)$current[$tagName];
break;
......@@ -2458,7 +2458,7 @@ class GeneralUtility
if (!$mode) {
// If use of .htaccess rule is not configured,
// we use the default query-string method
if ($lookupFile[1]) {
if (!empty($lookupFile[1])) {
$separator = '&';
} else {
$separator = '?';
......@@ -2606,7 +2606,7 @@ class GeneralUtility
break;
case 'REQUEST_URI':
// Typical application of REQUEST_URI is return urls, forms submitting to itself etc. Example: returnUrl='.rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'))
if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']) {
if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar'])) {
// This is for URL rewriters that store the original URI in a server variable (eg ISAPI_Rewriter for IIS: HTTP_X_REWRITE_URL)
list($v, $n) = explode('|', $GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']);
$retVal = $GLOBALS[$v][$n];
......
......@@ -304,13 +304,13 @@ class PathUtility
$theDirPartsCount--;
}
// "." in path: remove element
if ($theDirParts[$partCount] === '.') {
if (($theDirParts[$partCount] ?? '') === '.') {
array_splice($theDirParts, $partCount, 1);
$partCount--;
$theDirPartsCount--;
}
// ".." in path:
if ($theDirParts[$partCount] === '..') {
if (($theDirParts[$partCount] ?? '') === '..') {
if ($partCount >= 1) {
// Rremove this and previous element
array_splice($theDirParts, $partCount - 1, 2);
......
......@@ -86,12 +86,12 @@ class BackendConfigurationManager extends AbstractConfigurationManager
{
$setup = $this->getTypoScriptSetup();
$pluginConfiguration = [];
if (is_array($setup['module.']['tx_' . strtolower($extensionName) . '.'])) {
if (is_array($setup['module.']['tx_' . strtolower($extensionName) . '.'] ?? false)) {
$pluginConfiguration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup['module.']['tx_' . strtolower($extensionName) . '.']);
}
if ($pluginName !== null) {
$pluginSignature = strtolower($extensionName . '_' . $pluginName);
if (is_array($setup['module.']['tx_' . $pluginSignature . '.'])) {
if (is_array($setup['module.']['tx_' . $pluginSignature . '.'] ?? false)) {
$overruleConfiguration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup['module.']['tx_' . $pluginSignature . '.']);
ArrayUtility::mergeRecursiveWithOverrule($pluginConfiguration, $overruleConfiguration);
}
......@@ -112,7 +112,7 @@ class BackendConfigurationManager extends AbstractConfigurationManager
*/
protected function getSwitchableControllerActions($extensionName, $pluginName)
{
$switchableControllerActions = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$pluginName]['controllers'];
$switchableControllerActions = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$pluginName]['controllers'] ?? false;
if (!is_array($switchableControllerActions)) {
$switchableControllerActions = [];
}
......
......@@ -121,7 +121,7 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
switch ($configurationType) {
case self::CONFIGURATION_TYPE_SETTINGS:
$configuration = $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
return $configuration['settings'];
return $configuration['settings'] ?? [];
case self::CONFIGURATION_TYPE_FRAMEWORK:
return $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
case self::CONFIGURATION_TYPE_FULL_TYPOSCRIPT:
......
......@@ -173,7 +173,7 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface
$request->setRequestUri(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
$request->setBaseUri(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'));
$request->setMethod($this->environmentService->getServerRequestMethod());
if (is_string($parameters['format']) && $parameters['format'] !== '') {
if (isset($parameters['format']) && is_string($parameters['format']) && $parameters['format'] !== '') {
$request->setFormat(filter_var($parameters['format'], FILTER_SANITIZE_STRING));
} else {
$request->setFormat($this->defaultFormat);
......
......@@ -194,7 +194,7 @@ tt_content.' . $pluginSignature . ' {
}
$moduleConfiguration['extensionName'] = $extensionName;
$moduleConfiguration['routeTarget'] = \TYPO3\CMS\Extbase\Core\Bootstrap::class . '::handleBackendRequest';
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature])) {
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature] ?? false)) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['modules'][$moduleSignature] = [];
}
foreach ($controllerActions as $controllerName => $actions) {
......
......@@ -438,7 +438,7 @@ class FileListController extends ActionController
'html' => BackendUtility::getFuncCheck(
$this->id,
'SET[bigControlPanel]',
$this->MOD_SETTINGS['bigControlPanel'],
$this->MOD_SETTINGS['bigControlPanel'] ?? '',
'',
'',
'id="bigControlPanel"'
......@@ -450,7 +450,7 @@ class FileListController extends ActionController
'html' => BackendUtility::getFuncCheck(
$this->id,
'SET[displayThumbs]',
$this->MOD_SETTINGS['displayThumbs'],
$this->MOD_SETTINGS['displayThumbs'] ?? '',
'',
'',
'id="checkDisplayThumbs"'
......@@ -462,7 +462,7 @@ class FileListController extends ActionController
'html' => BackendUtility::getFuncCheck(
$this->id,
'SET[clipBoard]',
$this->MOD_SETTINGS['clipBoard'],
$this->MOD_SETTINGS['clipBoard'] ?? '',
'',
'',
'id="checkClipBoard"'
......
......@@ -564,10 +564,10 @@ class FileList
$colType = ($colType === 'th') ? 'th' : 'td';
$noWrap = $this->no_noWrap ? '' : ' nowrap';
// Start up:
$l10nParent = isset($data['_l10nparent_']) ? (int)$data['_l10nparent_'] : 0;
$l10nParent = (int)($data['_l10nparent_'] ?? 0);
$out = '
<!-- Element, begin: -->
<tr ' . $rowParams . ' data-uid="' . (int)$data['uid'] . '" data-l10nparent="' . $l10nParent . '">';
<tr ' . $rowParams . ' data-uid="' . (int)($data['uid'] ?? 0) . '" data-l10nparent="' . $l10nParent . '">';
// Show icon and lines
if ($this->showIcon) {
$out .= '
......@@ -601,12 +601,12 @@ class FileList
foreach ($fields as $vKey) {
if (isset($data[$vKey])) {
if ($lastKey) {
$cssClass = $this->addElement_tdCssClass[$lastKey];
$cssClass = $this->addElement_tdCssClass[$lastKey] ?? '';
if ($this->oddColumnsCssClass && $ccount % 2 == 0) {
$cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);
$cssClass = implode(' ', [$cssClass, $this->oddColumnsCssClass]);
}
$out .= '
<' . $colType . ' class="' . $cssClass . $noWrap . '"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';
<' . $colType . ' class="' . $cssClass . $noWrap . '"' . $colsp . ($this->addElement_tdParams[$lastKey] ?? '') . '>' . $data[$lastKey] . '</' . $colType . '>';
}
$lastKey = $vKey;
$c = 1;
......@@ -624,12 +624,12 @@ class FileList
}
}
if ($lastKey) {
$cssClass = $this->addElement_tdCssClass[$lastKey];
$cssClass = $this->addElement_tdCssClass[$lastKey] ?? '';
if ($this->oddColumnsCssClass) {
$cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);
$cssClass = implode(' ', [$cssClass, $this->oddColumnsCssClass]);
}
$out .= '
<' . $colType . ' class="' . $cssClass . $noWrap . '"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';
<' . $colType . ' class="' . $cssClass . $noWrap . '"' . $colsp . ($this->addElement_tdParams[$lastKey] ?? '') . '>' . $data[$lastKey] . '</' . $colType . '>';
}
// End row
$out .= '
......@@ -919,7 +919,7 @@ class FileList
$theData[$field] = $this->makeRef($folderObject);
break;
default:
$theData[$field] = GeneralUtility::fixed_lgd_cs($theData[$field], $this->fixedL);
$theData[$field] = GeneralUtility::fixed_lgd_cs($theData[$field] ?? '', $this->fixedL);
}
}
}
......@@ -1430,7 +1430,7 @@ class FileList
}
// Hook for manipulating edit icons.
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'])) {
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'] ?? false)) {
$cells['__fileOrFolderObject'] = $fileOrFolderObject;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'] as $className) {
$hookObject = GeneralUtility::makeInstance($className);
......
......@@ -52,7 +52,7 @@ class AjaxWidgetContextHolder implements \TYPO3\CMS\Core\SingletonInterface
if (TYPO3_MODE === 'FE') {
$this->widgetContexts = unserialize($GLOBALS['TSFE']->fe_user->getKey('ses', $this->widgetContextsStorageKey));
} else {
$this->widgetContexts = unserialize($GLOBALS['BE_USER']->uc[$this->widgetContextsStorageKey]);
$this->widgetContexts = isset($GLOBALS['BE_USER']->uc[$this->widgetContextsStorageKey]) ? unserialize($GLOBALS['BE_USER']->uc[$this->widgetContextsStorageKey]) : [];
$GLOBALS['BE_USER']->writeUC();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment