Problem/Motivation
Starting in PHP 8.4, relying on the default value of the $escape parameter in str_getcsv() is deprecated. You must explicitly pass the $escape parameter to suppress the deprecation warning and guarantee future compatibility.
FILE: /var/www/html/web/modules/contrib/charts/modules/charts_blocks/src/Plugin/Block/ChartsCanvasBlock.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
410 | WARNING | The $escape parameter must be passed when calling str_getcsv() as its default value will change in a future PHP version.
------------------------------------------------------------------------------------------------------------------------------------------
Time: 2.38 secs; Memory: 20MB
Steps to reproduce
Test the code base with PHPCompatibility code sniffer.
Proposed resolution
Fix the deprecation.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | charts-fix-php84-deprecation-3616607-3.patch | 609 bytes | maursilveira |
Issue fork charts-3616607
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
maursilveira commentedI've created a merge request with the fix for the PHP 8.4 deprecation.
I'm also attaching here a patch file for the same fix, for composer patches.
Please let me know if you have any questions. Thank you.
Comment #5
andileco commentedThank you!
Comment #7
maursilveira commented@andileco Thank you for reviewing and merging this.
Whenever you have a chance, would you mind setting the credits on the contribution record?
Thank you.
Comment #8
andileco commentedDone! Thanks for making sure I didn't forget.