diff --git a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php index f08a247135ae7d30014c855fe1280dbe5bbcc397..ff351400f8944e9eb003fbd746545737bd7dbff9 100644 --- a/typo3/sysext/backend/Classes/Clipboard/Clipboard.php +++ b/typo3/sysext/backend/Classes/Clipboard/Clipboard.php @@ -589,7 +589,7 @@ class Clipboard $selectedItem = reset($selectedElements); $selectedRecordTitle = PathUtility::basename($selectedItem); } else { - $selectedRecordTitle = count($selectedElements); + $selectedRecordTitle = (string)count($selectedElements); } } else { $recordTitle = $table !== 'pages' && is_array($reference) @@ -599,7 +599,7 @@ class Clipboard $selectedItem = $this->getSelectedRecord(); $selectedRecordTitle = $selectedItem['_RECORD_TITLE']; } else { - $selectedRecordTitle = count($selectedElements); + $selectedRecordTitle = (string)count($selectedElements); } } // @TODO diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php index 9c866f32a646fd14449ec0323e289a0e950d06be..36590b5e0475c903c5346a89a1ac0add6a6209fe 100644 --- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php +++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php @@ -184,13 +184,9 @@ class GeneralUtility * @param int $chars Must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end. * @param string $appendString Appendix to the truncated string * @return string Cropped string - * @todo Add strict types and return types as breaking change in v12. */ - public static function fixed_lgd_cs($string, $chars, $appendString = '...') + public static function fixed_lgd_cs(string $string, int $chars, string $appendString = '...'): string { - $string = (string)$string; - $chars = (int)$chars; - $appendString = (string)$appendString; if ($chars === 0 || mb_strlen($string, 'utf-8') <= abs($chars)) { return $string; }