Deprecation in Number::alphadecimalToInt()

Created on 23 April 2024, 12 months ago
Updated 30 April 2024, 11 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 15 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