Problem/Motivation

Hello.

I found some issue related to requirements of PHP 8.1
Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _eu_cookie_compliance_extract_category_key_label_description() (line 709 of modules/contrib/eu_cookie_compliance/eu_cookie_compliance.module)

Steps to reproduce

Install and configure EU Cookie Compliance (GDPR Compliance)
Enable logs in live stream
Open project by anonymous and don't press to pop-up window of EU Cookie Compliance (GDPR Compliance)
Go to some page of project
Get warning of deprecated function: explode()

CommentFileSizeAuthor
#9 3386932-9.patch1017 bytesajay gadhavana
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

ankondrat4 created an issue. See original summary.

ankondrat4’s picture

Issue summary: View changes

ankondrat4’s picture

Hello.

I have created issue fork and fix deprecated function: explode() as proposed here https://stackoverflow.com/questions/71097927/php-8-1-explode-passing-nul...

ankondrat4’s picture

Title: PHP 8.1: : Passing null to parameter #2 ($string) of type string is deprecated in _eu_cookie_compliance_extract_category_key_label_description() » PHP 8.1: Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _eu_cookie_compliance_extract_category_key_label_description()
ankondrat4’s picture

Assigned: ankondrat4 » Unassigned
Status: Active » Needs review
ankondrat4’s picture

Issue tags: +PHP 8.1, +explode
ankondrat4’s picture

Issue summary: View changes
ajay gadhavana’s picture

StatusFileSize
new1017 bytes

I have fixed this, right now fixed for two places where it was generating an error.

svenryen’s picture

Status: Needs review » Fixed

Hi!

Thanks for the patch and merge request. I tested in D8, D9 and D10 and seems like this one is good to go.

svenryen’s picture

Fixed.

Status: Fixed » Closed (fixed)

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