diff --git a/typo3/sysext/recordlist/Classes/Browser/AbstractElementBrowser.php b/typo3/sysext/recordlist/Classes/Browser/AbstractElementBrowser.php
index a806ddcbcff535c71b4ebac07e39dbb52b2fba69..066c325bc2ca1448592162b0304e3bcd216b41bb 100644
--- a/typo3/sysext/recordlist/Classes/Browser/AbstractElementBrowser.php
+++ b/typo3/sysext/recordlist/Classes/Browser/AbstractElementBrowser.php
@@ -132,14 +132,14 @@ abstract class AbstractElementBrowser
     }
 
     /**
-     * @return string[] Array of body-tag attributes
+     * @return array<string, string> Array of body-tag attributes
      */
     abstract protected function getBodyTagAttributes();
 
     /**
      * Splits parts of $this->bparams and returns needed data attributes for the Javascript
      *
-     * @return string[] Data attributes for Javascript
+     * @return array<string, string> Data attributes for Javascript
      */
     protected function getBParamDataAttributes()
     {
diff --git a/typo3/sysext/recordlist/Classes/Browser/FileBrowser.php b/typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
index 27c7a4a702f065081ed81037ca0f65406d6b4c17..3aa6a4c55584040d2e4ade14bcf291ce245ed193 100644
--- a/typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
+++ b/typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
@@ -300,9 +300,9 @@ class FileBrowser extends AbstractElementBrowser implements ElementBrowserInterf
                 'fileIcon' => $icon
             ];
             if ($this->fileIsSelectableInFileList($fileObject, $imgInfo)) {
-                $ATag = '<a href="#" class="btn btn-default" title="' . htmlspecialchars($fileObject->getName()) . '" data-file-index="' . htmlspecialchars($filesIndex) . '" data-close="0">';
+                $ATag = '<a href="#" class="btn btn-default" title="' . htmlspecialchars($fileObject->getName()) . '" data-file-index="' . $filesIndex . '" data-close="0">';
                 $ATag .= '<span title="' . htmlspecialchars($lang->getLL('addToList')) . '">' . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . '</span>';
-                $ATag_alt = '<a href="#" title="' . htmlspecialchars($fileObject->getName()) . $size . '" data-file-index="' . htmlspecialchars($filesIndex) . '" data-close="1">';
+                $ATag_alt = '<a href="#" title="' . htmlspecialchars($fileObject->getName()) . $size . '" data-file-index="' . $filesIndex . '" data-close="1">';
                 $ATag_e = '</a>';
                 $bulkCheckBox = '<label class="btn btn-default btn-checkbox"><input type="checkbox" class="typo3-bulk-item" name="file_' . $filesIndex . '" value="0" /><span class="t3-icon fa"></span></label>';
             } else {
diff --git a/typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php b/typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php
index 3ba1ccb05da563dc5c8c6fa42acfd322ddfaa9e7..21c3e5069003ed0ec3af10d0571a8f043fb7735b 100644
--- a/typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php
+++ b/typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php
@@ -254,7 +254,7 @@ abstract class AbstractLinkBrowserController
     /**
      * Reads the configured link handlers from page TSconfig
      *
-     * @return array
+     * @return array<string, array<mixed>>
      */
     protected function getLinkHandlers()
     {
diff --git a/typo3/sysext/recordlist/Classes/Controller/RecordListController.php b/typo3/sysext/recordlist/Classes/Controller/RecordListController.php
index 9086f21907cfcce3950c3056727d9ee343fa762a..3776503912a7b211dd74e13a74ca18afeb896fc1 100644
--- a/typo3/sysext/recordlist/Classes/Controller/RecordListController.php
+++ b/typo3/sysext/recordlist/Classes/Controller/RecordListController.php
@@ -219,7 +219,7 @@ class RecordListController
                 if (!empty($items)) {
                     $cmd = [];
                     foreach ($items as $iK => $value) {
-                        $iKParts = explode('|', $iK);
+                        $iKParts = explode('|', (string)$iK);
                         $cmd[$iKParts[0]][$iKParts[1]]['delete'] = 1;
                     }
                     $tce = GeneralUtility::makeInstance(DataHandler::class);
diff --git a/typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php b/typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php
index dbbcb6f7ec7b437743eb872e3d78fd6a61e359fb..b4193e9dddd91819a744b07fa722a46693faafe8 100644
--- a/typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php
+++ b/typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php
@@ -202,7 +202,7 @@ class FileLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
         }
         // Get size and icon:
         $size = GeneralUtility::formatSize(
-            $fileOrFolderObject->getSize(),
+            (int)$fileOrFolderObject->getSize(),
             $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:byteSizeUnits')
         );
 
diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
index 56c07beb5430c6fa55f07d9ef8ffcd5c007a4476..3dac65aa0ce07c8e750f87426bf18b737e3155ce 100644
--- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
+++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
@@ -1563,7 +1563,7 @@ class DatabaseRecordList
      */
     protected function renderListNavigation($renderPart, int $totalItems, int $iLimit, string $table)
     {
-        $totalPages = ceil($totalItems / $iLimit);
+        $totalPages = (int)ceil($totalItems / $iLimit);
         // Show page selector if not all records fit into one page
         if ($totalPages <= 1) {
             return '';
@@ -1572,7 +1572,7 @@ class DatabaseRecordList
         $listURL = $this->listURL('', $this->table, 'firstElementNumber');
         // 1 = first page
         // 0 = first element
-        $currentPage = floor($this->firstElementNumber / $iLimit) + 1;
+        $currentPage = (int)floor($this->firstElementNumber / $iLimit) + 1;
         // Compile first, previous, next, last and refresh buttons
         if ($currentPage > 1) {
             $labelFirst = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:first'));
@@ -1913,7 +1913,7 @@ class DatabaseRecordList
                     $table,
                     $row['uid'],
                     ' ' . $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.referencesToRecord'),
-                    $this->getReferenceCount($table, $row['uid'])
+                    (string)$this->getReferenceCount($table, $row['uid'])
                 ) . BackendUtility::translationCount(
                     $table,
                     $row['uid'],
@@ -2426,6 +2426,7 @@ class DatabaseRecordList
     protected function addHeaderRowToCSV()
     {
         $fieldArray = array_combine($this->fieldArray, $this->fieldArray);
+        $fieldArray = is_array($fieldArray) ? $fieldArray : [];
         $hooks = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][__CLASS__]['customizeCsvHeader'] ?? [];
         if (!empty($hooks)) {
             $hookParameters = [
@@ -3117,7 +3118,7 @@ class DatabaseRecordList
                 // Output the label now:
                 if ($table === 'pages') {
                     $code = '<a href="' . htmlspecialchars(
-                        $this->listURL($uid, '', 'firstElementNumber')
+                        $this->listURL((string)$uid, '', 'firstElementNumber')
                     ) . '" onclick="setHighlight(' . (int)$uid . ')">' . $code . '</a>';
                 } else {
                     $code = $this->linkUrlMail($code, $origCode);