Deprecation in Number::alphadecimalToInt()

Created on 23 April 2024, 8 months ago
Updated 30 April 2024, 8 months ago

Problem/Motivation

Number::alphadecimalToInt() triggers a deprecation when called with a malformed string:

   DEPRECATED  Invalid characters passed for attempted conversion, these have been ignored in core/lib/Drupal/Component/Utility/Number.php on line 98.

Steps to reproduce

\Drupal\Component\Utility\Number::alphadecimalToInt("ร ");

Proposed resolution

The code should probably make sure substr($string, 1) returns a valid value before feeding it to base_convert().

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Baseย  โ†’

Last updated about 2 hours ago

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance prudloff Lille

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