- Issue created by @prudloff
- ๐ฎ๐ณIndia Vivek Panicker Kolkata
@prudloff Question: The method expects a CSS identifier as argument. Why are we passing the output of
file_get_contents()
? - ๐ซ๐ทFrance prudloff Lille
The file contains an example of a bogus unicode string that can be used to reproduce the deprecation.
I tried to paste the content directly in my PHP example, but it would lose some of the buggy invisible characters. - Gaurav Gupta Jaipur, Rajasthsan
Hi @prudloff i am trying to reproduce the issue in php8.3 but failed to do so.
I have provided the attatchment . - ๐ซ๐ทFrance prudloff Lille
Is your PHP configured to display/log deprecations?
If I try to reproduce with
drush php-eval
, it seems I need to call it with-v
to see the deprecation. - Gaurav Gupta Jaipur, Rajasthsan
@prudloff i can only see error when i am providing $content=null
- ๐ซ๐ทFrance prudloff Lille
Here is an easier way to reproduce:
\Drupal\Component\Utility\Html::cleanCssIdentifier("\x80\x81");
- Merge request !7758Issue #3442829: Solve deprecated function error. โ (Open) created by Gaurav Gupta
- Status changed to Needs review
2 months ago 5:58am 26 April 2024 - ๐ฎ๐ณIndia Binoli Lalani Gujarat
Binoli Lalani โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia Binoli Lalani Gujarat
Hello,
I have added test coverage for this PHP deprecation error along with this error fix. Please review.
Thank you!
- Status changed to Needs work
2 months ago 1:48pm 26 April 2024 - ๐บ๐ธUnited States smustgrave
Should find where null is being passed in. This change could be masking a larger issue.
- Gaurav Gupta Jaipur, Rajasthsan
Hi @smustgrave ,
In this particular situation error is coming after line 127 , in this when using preg_replace function it is stripping of all the character which are not in the list and that 's why it is getting null.