Commit f0165a61 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack
Browse files

[BUGFIX] Fix TypeError on fetching the backend layout for a page

This fixes a TypeError by type-casting the $pageId argument.

Resolves: #94409
Related: #89700
Related: #94210
Releases: master
Change-Id: I0840ace1fbcaf62e4a5d2883e1d50a511e949d81
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69548


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent da9eb0d9
......@@ -74,7 +74,7 @@ class BackendLayoutFromParentPage extends AbstractNode
// Get the resolved backend layout for the current page.
$backendLayoutView = GeneralUtility::makeInstance(BackendLayoutView::class);
$backendLayout = $backendLayoutView->getBackendLayoutForPage(
$this->data['databaseRow']['uid'] ?? $this->data['effectivePid'] ?? 0
(int)($this->data['databaseRow']['uid'] ?? $this->data['effectivePid'] ?? 0)
);
if ($backendLayout !== null) {
$backendLayoutInformation = sprintf(
......
......@@ -411,7 +411,7 @@ class PageInformationController
$theData[$field] = $row[$field] ? '<strong>x</strong>' : '&nbsp;';
break;
case 'actual_backend_layout':
$backendLayout = $this->backendLayoutView->getBackendLayoutForPage($row['uid']);
$backendLayout = $this->backendLayoutView->getBackendLayoutForPage((int)$row['uid']);
$theData[$field] = $backendLayout !== null
? htmlspecialchars($this->getLanguageService()->sL($backendLayout->getTitle()))
: '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment