Skip to content
Snippets Groups Projects
Commit 52e88b7a authored by Oliver Hader's avatar Oliver Hader Committed by Wouter Wolters
Browse files

[BUGFIX] Handle empty absRefPrefix in PageLinkBuilder

Using empty values for absRefPrefix as needle in strpos() will
throw a warning. In order to avoid that, it's now checked more
explicitly if the prefixed slash originally was absRefPrefix.

Resolves: #84676
Releases: master
Change-Id: I7515e8d283b2d68e39f7a0451432d453471088f0
Reviewed-on: https://review.typo3.org/56616


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
parent 3fa35bfb
Branches
Tags
No related merge requests found
......@@ -559,7 +559,7 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
// $totalUri contains /index.php for legacy URLs, as previously "it was index.php"
// In case an URI has is prefixed with "/" which is not the absRefPrefix, remove it.
// this might change in the future
if (strpos($totalUrl, '/index.php') === 0 && strpos($totalUrl, $absRefPrefix) !== 0) {
if (strpos($totalUrl, '/index.php') === 0 && $absRefPrefix !== '/') {
$totalUrl = substr($totalUrl, 1);
}
......
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