Util::removeHtmlComments can return both string and MarkupInterface

Created on 25 January 2024, 5 months ago
Updated 8 February 2024, 5 months ago

Problem/Motivation

When an empty string is passed through Util::removeHtmlComments, MarkupInterface::create will return an empty string and not a MarkupInterface instance

TypeError: Drupal\sdc_display\Util::removeHtmlComments(): Return value must be of type Drupal\Component\Render\MarkupInterface, string returned in Drupal\sdc_display\Util::removeHtmlComments() (line 63 of modules/contrib/sdc_display/src/Util.php).

Proposed resolution

Fix the method signature and comments to reflect the right returns.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain pcambra Spain, πŸ‡ͺπŸ‡Ί

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024