[BUGFIX] CKEditor: Make link editable 15/54415/3
authorChristoph Lehmann <christoph.lehmann@networkteam.com>
Tue, 17 Oct 2017 14:37:06 +0000 (16:37 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 18 Oct 2017 07:00:19 +0000 (09:00 +0200)
Fixes the TypeError

htmlspecialchars() expects parameter 1 to be string, null given

Resolves: #82787
Releases: master,8.7
Change-Id: I38a689022ed45c34a8ae78c046abe51803eb0f4c
Reviewed-on: https://review.typo3.org/54415
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Henrik Elsner <helsner@dfau.de>
Tested-by: Henrik Elsner <helsner@dfau.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php

index fa8c30b..534f5d9 100644 (file)
@@ -373,9 +373,14 @@ class BrowseLinksController extends AbstractLinkBrowserController
             return '';
         }
 
-        $currentRel = $this->displayedLinkHandler === $this->currentLinkHandler && !empty($this->currentLinkParts)
-            ? $this->linkAttributeValues['rel']
-            : '';
+        $currentRel = '';
+        if ($this->displayedLinkHandler === $this->currentLinkHandler
+            && !empty($this->currentLinkParts)
+            && isset($this->linkAttributeValues['rel'])
+            && is_string($this->linkAttributeValues['rel'])
+        ) {
+            $currentRel = $this->linkAttributeValues['rel'];
+        }
 
         return '
             <form action="" name="lrelform" id="lrelform" class="t3js-dummyform form-horizontal">