Skip to content

Commit

Permalink
[BUGFIX] Cast replacement values to strings
Browse files Browse the repository at this point in the history
Avoid exceptions due to wrong type in the link validator module.

Resolves: #101352
Releases: main, 12.4, 11.5
Change-Id: Ic54b38e2fad6c203526fe27fa1b2ea6815f0578f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80028
Reviewed-by: Stefan B�rk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan B�rk <stefan@buerk.tech>
  • Loading branch information
georgringer authored and sbuerk committed Jul 14, 2023
1 parent 61602bc commit 207864d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php
Expand Up @@ -251,7 +251,7 @@ public function getErrorMessage($errorParams)
],
[
$errorParams['page']['title'],
$errorParams['page']['uid'],
(string)$errorParams['page']['uid'],
],
$lang->getLL('list.report.pagedeleted')
);
Expand All @@ -264,15 +264,15 @@ public function getErrorMessage($errorParams)
],
[
$errorParams['page']['title'],
$errorParams['page']['uid'],
(string)$errorParams['page']['uid'],
],
$lang->getLL('list.report.pagenotvisible')
);
break;
default:
$errorPage = str_replace(
'###uid###',
$errorParams['page']['uid'],
(string)$errorParams['page']['uid'],
$lang->getLL('list.report.pagenotexisting')
);
}
Expand All @@ -287,7 +287,7 @@ public function getErrorMessage($errorParams)
],
[
$errorParams['content']['title'],
$errorParams['content']['uid'],
(string)$errorParams['content']['uid'],
],
$lang->getLL('list.report.contentdeleted')
);
Expand All @@ -300,7 +300,7 @@ public function getErrorMessage($errorParams)
],
[
$errorParams['content']['title'],
$errorParams['content']['uid'],
(string)$errorParams['content']['uid'],
],
$lang->getLL('list.report.contentnotvisible')
);
Expand All @@ -315,15 +315,15 @@ public function getErrorMessage($errorParams)
],
[
$errorParams['content']['title'],
$errorParams['content']['uid'],
$errorParams['content']['wrongPage'],
$errorParams['content']['rightPage'],
(string)$errorParams['content']['uid'],
(string)$errorParams['content']['wrongPage'],
(string)$errorParams['content']['rightPage'],
],
$lang->getLL('list.report.contentmoved')
);
break;
default:
$errorContent = str_replace('###uid###', $errorParams['content']['uid'], $lang->getLL('list.report.contentnotexisting'));
$errorContent = str_replace('###uid###', (string)$errorParams['content']['uid'], $lang->getLL('list.report.contentnotexisting'));
}
}
if (isset($errorPage) && isset($errorContent)) {
Expand Down

0 comments on commit 207864d

Please sign in to comment.