Project

General

Profile

Actions

Bug #90883

closed

TypeError "htmlspecialchars() expects parameter 1 to be string, int given" inside ArrayBrowser

Added by Julian Mair over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-03-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the BE Configuration Module, inside "HTTP Middlewares (PSR-15)", the following error is triggerd, if i open a "after/before" node in the new primary node 'raw':

(1/1) TypeError
htmlspecialchars() expects parameter 1 to be string, int given

in /var/www/html/httpdocs/typo3/sysext/backend/Classes/View/ArrayBrowser.php line 115

            if ($isArray && !$this->expAll && $this->route) {
                $goto = 'a' . substr(md5($depth), 0, 6);
                $output .= '<a class="list-tree-control' . ($isExpanded ? ' list-tree-control-open' : ' list-tree-control-closed') . '" id="' . $goto . '" href="' . htmlspecialchars((string)$this->uriBuilder->buildUriFromRoute($this->route->getOption('_identifier'), ['node' => [rawurldecode($depth) => $isExpanded ? 0 : 1]]) . '#' . $goto) . '"><i class="fa"></i></a> ';
            }
            $output .= '<span class="list-tree-label">' . htmlspecialchars($key) . '</span>';
            if (!$isArray) {
                $output .= ' = <span class="list-tree-value">' . htmlspecialchars($value) . '</span>';
            }
            $output .= '</span>';

I'm not really familiar with the core code, but i think a simple string conversion for the $key in `htmlspecialchars($key)` could solve the problem.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91007: Configuration -> PSR-14 Search yields errorClosed2020-04-12

Actions
Actions #1

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64005

Actions #2

Updated by Georg Tiefenbrunn over 4 years ago

Also see Configuration > Backend routes, expand e.g. web_list > options. The value of key module is TRUE.

Both $key and $value must be cast to string.

Actions #3

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64005

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64005

Actions #5

Updated by Christian Eßl over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Christian Eßl over 4 years ago

  • Related to Bug #91007: Configuration -> PSR-14 Search yields error added
Actions #7

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF