[BUGFIX] Handle invalid link strings gracefully in LinkHandler 30/51530/2
authorMarkus Klein <markus.klein@typo3.org>
Fri, 3 Feb 2017 22:45:41 +0000 (23:45 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 5 Feb 2017 14:05:17 +0000 (15:05 +0100)
Resolves: #79623
Releases: master
Change-Id: Iefef14b968d4edfbfbe221ee5b58e3947d5f0d9c
Reviewed-on: https://review.typo3.org/51530
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/recordlist/Classes/LinkHandler/UrlLinkHandler.php

index a6021fd..87edbcc 100644 (file)
@@ -58,12 +58,10 @@ class UrlLinkHandler extends AbstractLinkHandler implements LinkHandlerInterface
      */
     public function canHandleLink(array $linkParts)
     {
-        if (!$linkParts['url']) {
+        if (!isset($linkParts['url']['url'])) {
             return false;
         }
-        if (isset($linkParts['url']['url'])) {
-            $linkParts['url'] = $linkParts['url']['url'];
-        }
+        $linkParts['url'] = $linkParts['url']['url'];
         $this->linkParts = $linkParts;
 
         return true;