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.

Issue fork charts-3616607

Command icon 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

maursilveira created an issue. See original summary.

maursilveira’s picture

Status: Active » Needs review
StatusFileSize
new609 bytes

I'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.

andileco’s picture

Status: Needs review » Fixed

Thank you!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

maursilveira’s picture

@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.

andileco’s picture

Done! Thanks for making sure I didn't forget.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.