#87473Type error in PageLinkBuilder.php
Description
Argument 2 passed to TYPO3\CMS\Frontend\Typolink\PageLinkBuilder::populateMountPointMapForPageRecursively() must be of the type integer, string given, called in typo3_src-9.5.3/typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php on line 612
but actually method initializeMountPointMap can pass a string.
Method populateMountPointMapForPageRecursively:
protected function populateMountPointMapForPageRecursively(array &$mountPointMap, int $id, $MP_array = [], $level = 0)
{
if ($id <= 0) {
return;
}
// First level, check id
if (!$level) {
// Find mount point if any:
$mount_info = $this->getTypoScriptFrontendController()->sys_page->getMountPointInfo($id);
Call inside method initializeMountPointMap:
$rootPoints = GeneralUtility::trimExplode(',', strtolower($mapRootPointList), true);
// Traverse rootpoints
foreach ($rootPoints as $p) {
$initMParray = [];
if ($p === 'root') {
$rootPage = $this->getTypoScriptFrontendController()->tmpl->rootLine[0];
$p = $rootPage['uid'];
if ($p['_MOUNT_OL'] && $p['_MP_PARAM']) {
$initMParray[] = $p['_MP_PARAM'];
}
}
$this->populateMountPointMapForPageRecursively($mountPointMap, $p, $initMParray);
}
$runtimeCache->set('pageLinkBuilderMountPointMap', $mountPointMap);
return $mountPointMap;Reviews 5
- 9.5 62933[FEATURE] Native MountPoint support for Site Handling
- main 62878[FEATURE] Native MountPoint support for Site Handling
- main 59915[BUGFIX] Re-Enable MountPoint linking functionality
- 9.5 59923[BUGFIX] Fix strict type error in recursive mount point resolving
- main 59916[BUGFIX] Fix strict type error in recursive mount point resolving