[BUGFIX] CKEditor: Make link editable 34/54434/2
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:24:03 +0000 (09:24 +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/54434
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christoph Lehmann <christoph.lehmann@networkteam.com>
Tested-by: Christoph Lehmann <christoph.lehmann@networkteam.com>
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 9f30d56..634621c 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">