diff --git a/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php b/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php index 8c05b9fe61c43e8054e854063f9112ead21425d4..7bb2bb870ee43aaa49ffec9880d665ef5af7c5a0 100644 --- a/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php +++ b/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php @@ -38,7 +38,7 @@ class MemoryUtility */ public static function isMemoryConsumptionTooHigh(): bool { - $iniLimit = ini_get('memory_limit'); + $iniLimit = (string)ini_get('memory_limit'); $memoryLimit = $iniLimit === '-1' ? -1 : GeneralUtility::getBytesFromSizeMeasurement($iniLimit); $freeMemory = $memoryLimit - memory_get_usage(true); diff --git a/typo3/sysext/dashboard/Classes/Widgets/Provider/SysLogErrorsDataProvider.php b/typo3/sysext/dashboard/Classes/Widgets/Provider/SysLogErrorsDataProvider.php index 9a5349b99439d319853cec4aaf73a7a8da4c9bac..d402f285cd9aba931f33bb25b9c2cf8b4bc3bbb1 100644 --- a/typo3/sysext/dashboard/Classes/Widgets/Provider/SysLogErrorsDataProvider.php +++ b/typo3/sysext/dashboard/Classes/Widgets/Provider/SysLogErrorsDataProvider.php @@ -101,9 +101,9 @@ class SysLogErrorsDataProvider implements ChartDataProviderInterface $format = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] ?: 'Y-m-d'; for ($daysBefore = $this->days; $daysBefore >= 0; $daysBefore--) { - $this->labels[] = date($format, strtotime('-' . $daysBefore . ' day')); - $startPeriod = strtotime('-' . $daysBefore . ' day 0:00:00'); - $endPeriod = strtotime('-' . $daysBefore . ' day 23:59:59'); + $this->labels[] = date($format, (int)strtotime('-' . $daysBefore . ' day')); + $startPeriod = (int)strtotime('-' . $daysBefore . ' day 0:00:00'); + $endPeriod = (int)strtotime('-' . $daysBefore . ' day 23:59:59'); $this->data[] = $this->getNumberOfErrorsInPeriod($startPeriod, $endPeriod); } diff --git a/typo3/sysext/reports/Classes/Report/Status/Typo3Status.php b/typo3/sysext/reports/Classes/Report/Status/Typo3Status.php index bb528ad50c74be5f1e35609b425548177095adac..9d68bd07421e196b5584743806eec2ddcc0c223a 100644 --- a/typo3/sysext/reports/Classes/Report/Status/Typo3Status.php +++ b/typo3/sysext/reports/Classes/Report/Status/Typo3Status.php @@ -64,7 +64,7 @@ class Typo3Status implements StatusProviderInterface foreach ($xclassFoundArray as $originalClass => $xClassName) { $messageDetail = sprintf( $this->getLanguageService()->getLL('status_xclassUsageFound_message_detail'), - '<code>' . htmlspecialchars($originalClass) . '</code>', + '<code>' . htmlspecialchars((string)$originalClass) . '</code>', '<code>' . htmlspecialchars($xClassName) . '</code>' ); $message .= '<li>' . $messageDetail . '</li>'; diff --git a/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php b/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php index 139ce80031c993a229826d877a09660e65206a3a..8f35ff6ede1389c1fe6fc077ff2bcbf3d31f74ee 100644 --- a/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php +++ b/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php @@ -230,7 +230,7 @@ class BrowseLinksController extends AbstractLinkBrowserController $selected = 'selected="selected"'; } $classLabel = !empty($this->thisConfig['classes'][$class]['name']) - ? $this->getPageConfigLabel($this->thisConfig['classes'][$class]['name'], 0) + ? $this->getPageConfigLabel($this->thisConfig['classes'][$class]['name'], false) : $class; $classStyle = !empty($this->thisConfig['classes'][$class]['value']) ? $this->thisConfig['classes'][$class]['value'] diff --git a/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php b/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php index ba7372ffc917b9ad6ef2606dee9603483531eb0d..60cd9f6e5916d2693b62fcd15075537c692fca91 100644 --- a/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php +++ b/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php @@ -228,7 +228,7 @@ class RichTextElement extends AbstractFormElement $externalPlugins .= '\'\');'; } - $jsonConfiguration = json_encode($configuration); + $jsonConfiguration = (string)json_encode($configuration); // Make a hash of the configuration and append it to CKEDITOR.timestamp // This will mitigate browser caching issue when plugins are updated @@ -428,8 +428,8 @@ class RichTextElement extends AbstractFormElement */ protected function sanitizeFieldId(string $itemFormElementName): string { - $fieldId = preg_replace('/[^a-zA-Z0-9_:.-]/', '_', $itemFormElementName); - return htmlspecialchars(preg_replace('/^[^a-zA-Z]/', 'x', $fieldId)); + $fieldId = (string)preg_replace('/[^a-zA-Z0-9_:.-]/', '_', $itemFormElementName); + return htmlspecialchars((string)preg_replace('/^[^a-zA-Z]/', 'x', $fieldId)); } /** diff --git a/typo3/sysext/t3editor/Classes/Form/Element/T3editorElement.php b/typo3/sysext/t3editor/Classes/Form/Element/T3editorElement.php index c75a47efdd79179fef7940879ec634da8242bebb..86a33f61f194ca3687d25bc98287f0794cd2407c 100644 --- a/typo3/sysext/t3editor/Classes/Form/Element/T3editorElement.php +++ b/typo3/sysext/t3editor/Classes/Form/Element/T3editorElement.php @@ -223,7 +223,7 @@ class T3editorElement extends AbstractFormElement if (!empty($hiddenfields)) { foreach ($hiddenfields as $attributeName => $value) { - $code[] = '<input type="hidden" name="' . htmlspecialchars($attributeName) . '" value="' . htmlspecialchars((string)$value) . '" />'; + $code[] = '<input type="hidden" name="' . htmlspecialchars((string)$attributeName) . '" value="' . htmlspecialchars((string)$value) . '" />'; } } return implode(LF, $code); diff --git a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php index 471ab3810d9de4e24964242ff26c1b7c1174eb27..ae843fb3f3f61557475ac84294c3d67f478eb178 100644 --- a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php +++ b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php @@ -194,6 +194,7 @@ class TypoScriptTemplateModuleController $this->request = $request; $this->id = (int)($request->getParsedBody()['id'] ?? $request->getQueryParams()['id'] ?? 0); $changedMenuSettings = $request->getParsedBody()['SET'] ?? $request->getQueryParams()['SET'] ?? []; + $changedMenuSettings = is_array($changedMenuSettings) ? $changedMenuSettings : []; $this->menuConfig($changedMenuSettings); // Loads $this->extClassConf with the configuration for the CURRENT function of the menu. $this->extClassConf = $this->getExternalItemConfig('web_ts', 'function', $this->MOD_SETTINGS['function']); @@ -630,7 +631,7 @@ page.10.value = HELLO WORLD! * Then MOD_SETTINGS array is cleaned up (see \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()) so it contains only valid values. It's also updated with any SET[] values submitted. * Also loads the modTSconfig internal variable. * - * @param array|string|null $changedSettings can be anything + * @param array $changedSettings can be anything * @see mainAction() * @see \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData() * @see mergeExternalItems() @@ -699,7 +700,7 @@ page.10.value = HELLO WORLD! * If an instance is created it is initiated with $this passed as value and $this->extClassConf as second argument. Further the $this->MOD_SETTING is cleaned up again after calling the init function. * * @see \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction() - * @param array|string|null $changedSettings + * @param array $changedSettings * @param ServerRequestInterface $request */ protected function checkExtObj($changedSettings, ServerRequestInterface $request) diff --git a/typo3/sysext/tstemplate/ext_tables.php b/typo3/sysext/tstemplate/ext_tables.php index 5ef53627c8b88a5583f376f0292bd32e5e57e45f..45b446c444beb4d26262cc0df09e3f0cee2d47b8 100644 --- a/typo3/sysext/tstemplate/ext_tables.php +++ b/typo3/sysext/tstemplate/ext_tables.php @@ -19,27 +19,27 @@ defined('TYPO3_MODE') or die(); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( 'web_ts', \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController::class, - null, + '', 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:constantEditor' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( 'web_ts', \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController::class, - null, + '', 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:infoModify' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( 'web_ts', \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::class, - null, + '', 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:objectBrowser' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( 'web_ts', \TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController::class, - null, + '', 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:templateAnalyzer' );