Bug #90883
closedTypeError "htmlspecialchars() expects parameter 1 to be string, int given" inside ArrayBrowser
100%
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.
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
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.
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
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
Updated by Christian Eßl over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1106bd5c54f86c166d4b71c95a91967d9b9183e9.
Updated by Christian Eßl over 4 years ago
- Related to Bug #91007: Configuration -> PSR-14 Search yields error added