strpos() and htmlspecialchars() related warning messages on help page

Created on 6 November 2021, about 3 years ago
Updated 12 October 2024, 3 months ago

Problem/Motivation

On the help page (/admin/help/styleguide) there are two warning messages.

Warning: strpos() expects parameter 1 to be string, object given in Drupal\Component\Utility\UrlHelper::stripDangerousProtocols()

Warning: htmlspecialchars() expects parameter 1 to be string, object given in Drupal\Component\Utility\Html::escape()

Steps to reproduce

Visit the help page of the style guide module: /admin/help/styleguide

Proposed resolution

The problem can be found in the styleguide.module file's styleguide_help function.
The URL object needs to be converted to string.

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary david.czinege

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States dcam

    I verified the bug. The help page at /admin/help/styleguide crashes with an error about a Url object being passed instead of a string. The solution in the MR fixes the page and there are no more errors showing up in the site log. It's a simple bug with an easy fix. This is RTBC.

Production build 0.71.5 2024