Bug #87473

Type error in PageLinkBuilder.php

Added by Robert von Hackwitz about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2019-01-18
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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;

History

#1 Updated by Robert von Hackwitz about 1 month ago

  • Category set to Frontend

#2 Updated by Robert von Hackwitz about 1 month ago

  • Priority changed from Must have to Should have
  • Target version set to Candidate for patchlevel

#3 Updated by Robert von Hackwitz about 1 month ago

  • Target version changed from Candidate for patchlevel to next-patchlevel

Also available in: Atom PDF