Wrong return type in Renderer::ensureMarkupIsSafe()

Created on 18 February 2024, 10 months ago
Updated 14 March 2024, 10 months ago

Problem/Motivation

When checking the code, i have just realized the function protected function ensureMarkupIsSafe(array $elements) located in core\lib\Drupal\Core\Render\Renderer.php has a wrong return type:

   * @return \Drupal\Component\Render\MarkupInterface|string
   *   The escaped markup wrapped in a Markup object. If $elements['#markup']
   *   is an instance of \Drupal\Component\Render\MarkupInterface, it won't be
   *   escaped or filtered again.

while it returns an array

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
RenderΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium gorkagr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024