[BUGFIX] Cast PSR-7 Uri object to string in preview links 97/58897/3
authorAchim Fritz <af@achimfritz.de>
Wed, 14 Nov 2018 18:00:38 +0000 (19:00 +0100)
committerBenni Mack <benni@typo3.org>
Wed, 14 Nov 2018 19:55:08 +0000 (20:55 +0100)
When generating the workspace preview links, the Uri
object needs to be case to string.

Resolves: #86928
Releases: master
Change-Id: I4eca3742044ee886923632297d5402467333acd9
Reviewed-on: https://review.typo3.org/58897
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php

index 324ee34..69a8fc5 100644 (file)
@@ -124,7 +124,7 @@ class PreviewUriBuilder
         $viewScript = $uriBuilder->buildUriFromRoute('workspace_previewcontrols', ['id' => $uid]);
         if ($addDomain === true) {
             $viewScript = $uriBuilder->buildUriFromRoute('workspace_previewcontrols', ['id' => $uid]);
-            return BackendUtility::getViewDomain($uid) . 'index.php?redirect_url=' . urlencode($viewScript);
+            return BackendUtility::getViewDomain($uid) . 'index.php?redirect_url=' . urlencode((string)$viewScript);
         }
         return (string)$viewScript;
     }