diff --git a/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php b/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php index ef50c88550a07c50e5e9f2cd15aaf095a29263ea..ae748bbcec7c37476ef8b61e2e63bc228afb7678 100644 --- a/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php +++ b/typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php @@ -270,7 +270,7 @@ class SiteConfigurationController $currentSiteConfiguration = []; $isNewConfiguration = true; $pageId = (int)$parsedBody['rootPageId']; - if (!$pageId > 0) { + if ($pageId <= 0) { // Early validation of rootPageId - it must always be given and greater than 0 throw new \RuntimeException('No root page id found', 1521719709); } diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php b/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php index 2ece5fc370b40c398b63ac707c1e8195b22bd1ca..e9970c8d287b90275419786645090f63987d0f69 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php @@ -501,7 +501,7 @@ class Typo3DbBackend implements BackendInterface, SingletonInterface $querySettings = $query->getQuerySettings(); // If current row is a translation select its parent $languageOfCurrentRecord = 0; - if ($GLOBALS['TCA'][$tableName]['ctrl']['languageField'] ?? null + if (($GLOBALS['TCA'][$tableName]['ctrl']['languageField'] ?? null) && $row[$GLOBALS['TCA'][$tableName]['ctrl']['languageField']] ?? 0 ) { $languageOfCurrentRecord = $row[$GLOBALS['TCA'][$tableName]['ctrl']['languageField']]; diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php index be68f7a15e07c5e150354fc12cb461458436148e..ec85e3287fb8f627716d845df697717812db849e 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php +++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php @@ -1423,7 +1423,7 @@ abstract class AbstractMenuContentObject protected function changeLinksForAccessRestrictedPages(&$LD, $page, $mainTarget, $typeOverride) { // If access restricted pages should be shown in menus, change the link of such pages to link to a redirection page: - if ($this->mconf['showAccessRestrictedPages'] ?? false && $this->mconf['showAccessRestrictedPages'] !== 'NONE' && !$this->getTypoScriptFrontendController()->checkPageGroupAccess($page)) { + if (($this->mconf['showAccessRestrictedPages'] ?? false) && $this->mconf['showAccessRestrictedPages'] !== 'NONE' && !$this->getTypoScriptFrontendController()->checkPageGroupAccess($page)) { $thePage = $this->sys_page->getPage($this->mconf['showAccessRestrictedPages']); $addParams = str_replace( [ diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php index aae9f01a79fd708068dafa9bf4642489c44fac84..e75077c6add90095bfeffbf46802de5df75cd263 100644 --- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php +++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php @@ -405,11 +405,11 @@ class RequestHandler implements RequestHandlerInterface $stylesFromPlugins = ''; foreach ($controller->tmpl->setup['plugin.'] as $key => $iCSScode) { if (is_array($iCSScode)) { - if ($iCSScode['_CSS_DEFAULT_STYLE'] ?? false && empty($controller->config['config']['removeDefaultCss'])) { + if (($iCSScode['_CSS_DEFAULT_STYLE'] ?? false) && empty($controller->config['config']['removeDefaultCss'])) { $cssDefaultStyle = $controller->cObj->stdWrapValue('_CSS_DEFAULT_STYLE', $iCSScode ?? []); $stylesFromPlugins .= '/* default styles for extension "' . substr($key, 0, -1) . '" */' . LF . $cssDefaultStyle . LF; } - if ($iCSScode['_CSS_PAGE_STYLE'] ?? false && empty($controller->config['config']['removePageCss'])) { + if (($iCSScode['_CSS_PAGE_STYLE'] ?? false) && empty($controller->config['config']['removePageCss'])) { $cssPageStyle = implode(LF, $iCSScode['_CSS_PAGE_STYLE']); if (isset($iCSScode['_CSS_PAGE_STYLE.'])) { $cssPageStyle = $controller->cObj->stdWrap($cssPageStyle, $iCSScode['_CSS_PAGE_STYLE.']); diff --git a/typo3/sysext/impexp/Classes/Export.php b/typo3/sysext/impexp/Classes/Export.php index 09b7af156ca991323ee7f8abf62308b4341db25e..775204a14754bbe703b8b08f7a51e158939c9808 100644 --- a/typo3/sysext/impexp/Classes/Export.php +++ b/typo3/sysext/impexp/Classes/Export.php @@ -347,7 +347,7 @@ class Export extends ImportExport protected function removeExcludedPagesFromPageTree(array &$pageTree): void { foreach ($pageTree as $pid => $value) { - if ($this->isRecordExcluded('pages', (int)$pageTree[$pid]['uid'] ?? 0)) { + if ($this->isRecordExcluded('pages', (int)($pageTree[$pid]['uid'] ?? 0))) { unset($pageTree[$pid]); } elseif (is_array($pageTree[$pid]['subrow'] ?? null)) { $this->removeExcludedPagesFromPageTree($pageTree[$pid]['subrow']); diff --git a/typo3/sysext/install/Classes/Updates/BackendUserLanguageMigration.php b/typo3/sysext/install/Classes/Updates/BackendUserLanguageMigration.php index 356d34f459b7d4c965227ec9e12f7040e0e6bc9e..e3bd3e62249a16309d5621035cb0081117e9af06 100644 --- a/typo3/sysext/install/Classes/Updates/BackendUserLanguageMigration.php +++ b/typo3/sysext/install/Classes/Updates/BackendUserLanguageMigration.php @@ -60,7 +60,7 @@ class BackendUserLanguageMigration implements UpgradeWizardInterface $connection = $this->getConnectionPool()->getConnectionForTable(self::TABLE_NAME); foreach ($this->getRecordsToUpdate() as $record) { - $currentDatabaseFieldValue = (string)$record['lang'] ?? ''; + $currentDatabaseFieldValue = (string)($record['lang'] ?? ''); $uc = unserialize($user['uc'] ?? '', ['allowed_classes' => false]); // Check if the user has a preference set, otherwise use the default from the database field // however, "default" is now explicitly set.