[BUGFIX] Backend users: Exception in element browser with PHP 7 00/46000/4
authorMichael Oehlhof <typo3@oehlhof.de>
Sat, 16 Jan 2016 11:43:38 +0000 (12:43 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Sat, 16 Jan 2016 12:45:35 +0000 (13:45 +0100)
Make the Declaration of
TYPO3\CMS\Recordlist\Tree\View\ElementBrowserPageTreeView::wrapTitle()
compatible with
TYPO3\CMS\Backend\Tree\View\ElementBrowserPageTreeView::wrapTitle()

Resolves: #72767
Releases: master, 7.6
Change-Id: Ic855be1b3e8020a28a7c44c21709d75a3a04e3b5
Reviewed-on: https://review.typo3.org/46000
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/recordlist/Classes/Tree/View/ElementBrowserPageTreeView.php

index e236e26..af410fb 100644 (file)
@@ -39,15 +39,15 @@ class ElementBrowserPageTreeView extends \TYPO3\CMS\Backend\Tree\View\ElementBro
      * Wrapping the title in a link, if applicable.
      *
      * @param string $title Title, ready for output.
-     * @param array $row The record
+     * @param array $v The record
      * @param bool $ext_pArrPages If set, pages clicked will return immediately, otherwise reload page.
      * @return string Wrapping title string.
      */
-    public function wrapTitle($title, $row, $ext_pArrPages)
+    public function wrapTitle($title, $v, $ext_pArrPages = false)
     {
-        if ($ext_pArrPages && $row['uid']) {
+        if ($ext_pArrPages && $v['uid']) {
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-            $ficon = $iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL)->render();
+            $ficon = $iconFactory->getIconForRecord('pages', $v, Icon::SIZE_SMALL)->render();
             $out = '<span data-uid="' . htmlspecialchars($row['uid']) . '" data-table="pages" data-title="' . htmlspecialchars($row['title']) . '" data-icon="' . htmlspecialchars($ficon) . '">';
             $out .= '<a href="#" data-close="1">' . $title . '</a>';
             $out .= '</span>';