[BUGFIX] Fix typolink forceAbsoluteUrl 72/44972/4
authorSebastian Michaelsen <sebastian@michaelsen.io>
Fri, 27 Nov 2015 08:51:33 +0000 (09:51 +0100)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Fri, 27 Nov 2015 09:54:34 +0000 (10:54 +0100)
Fix a regression introduced with code cleanup by catching
all kind of empty host values returned by parse_url().

Resolves: #71843
Related: #71690
Releases: master
Change-Id: I8f89344b915d36bdfe103061e31a115518815637
Reviewed-on: https://review.typo3.org/44972
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Sebastian Michaelsen <michaelsen@t3seo.de>
Tested-by: Sebastian Michaelsen <michaelsen@t3seo.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index 0a85eca..3d73128 100644 (file)
@@ -6694,7 +6694,7 @@ class ContentObjectRenderer
                                 }
                             }
                             $urlParts = parse_url($LD['totalURL']);
-                            if ($urlParts['host'] === '') {
+                            if (empty($urlParts['host'])) {
                                 $LD['totalURL'] = $absoluteUrlScheme . '://' . $targetDomain . ($LD['totalURL'][0] === '/' ? '' : '/') . $LD['totalURL'];
                             }
                         }