From 0cab8780785a9ebde76274f9ded5c438631154dd Mon Sep 17 00:00:00 2001 From: Alexander Schnitzler <git@alexanderschnitzler.de> Date: Mon, 11 May 2020 17:33:41 +0200 Subject: [PATCH] [TASK] Fix phpstan checkFunctionArgumentTypes errors in ext:core Tree This patch fixes incompatible type usage in function arguments and is preparatory work for introducing native type hints and strict mode in all core files. Releases: master, 10.4 Resolves: #92261 Change-Id: I9fe2fc72a60e794a03663625ea7ec3e40984b04b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65660 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Daniel Goerz <daniel.goerz@posteo.de> Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: Sascha Egerer <sascha@sascha-egerer.de> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Oliver Bartsch <bo@cedev.de> Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Tree/TableConfiguration/DatabaseTreeDataProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php b/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php index 01608fd06d8f..54e10b7580f1 100644 --- a/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php +++ b/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php @@ -263,13 +263,13 @@ class DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvide $node->setExpanded(true); $node->setLabel($this->getLanguageService()->sL($GLOBALS['TCA'][$this->tableName]['ctrl']['title'])); } else { - $row = BackendUtility::getRecordWSOL($this->tableName, $basicNode->getId(), '*', '', false); + $row = BackendUtility::getRecordWSOL($this->tableName, (int)$basicNode->getId(), '*', '', false); $node->setLabel(BackendUtility::getRecordTitle($this->tableName, $row) ?: $basicNode->getId()); $node->setSelected(GeneralUtility::inList($this->getSelectedList(), $basicNode->getId())); $node->setExpanded($this->isExpanded($basicNode)); } $node->setId($basicNode->getId()); - $node->setSelectable(!GeneralUtility::inList($this->getNonSelectableLevelList(), $level) && !in_array($basicNode->getId(), $this->getItemUnselectableList())); + $node->setSelectable(!GeneralUtility::inList($this->getNonSelectableLevelList(), (string)$level) && !in_array($basicNode->getId(), $this->getItemUnselectableList())); $node->setSortValue($this->nodeSortValues[$basicNode->getId()]); $iconFactory = GeneralUtility::makeInstance(IconFactory::class); $node->setIcon($iconFactory->getIconForRecord($this->tableName, $row, Icon::SIZE_SMALL)); -- GitLab