PHP 8.0 and PHP 8.1 compatibility

Created on 20 June 2023, over 1 year ago
Updated 18 October 2023, about 1 year ago

Problem/Motivation

This issue was already highlighted earlier and later changed in 1.15.
But for this version of the module, I think it is necessary to create this patch.
On PHP 7.4, this notification becomes a warning in PHP 8.0:

Warning: Undefined array key "css" in eu_cookie_compliance_page_build() (line 123 of eu_cookie_compliance/eu_cookie_compliance.module).

🐛 Bug report
Status

Needs work

Version

1.14

Component

Code

Created by

🇺🇦Ukraine Igumnov_aleksey

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Comments & Activities

  • Issue created by @Igumnov_aleksey
  • Status changed to Needs work about 1 year ago
  • 🇳🇴Norway svenryen

    Hi @Igumnov_aleksey!

    Thanks you for the concern and the patch. I have tried applying the patch to 7.x-1.x. It doesn't apply and there's already a line saying $data['css'] = ''; (line 236).

    Since you have a warning reported at line 123, may I ask you to update to the lates 7.x build and see if that resolves your problem?

  • 🇮🇳India mohd sahzad

    I have updated for this issue : Warning: Undefined array key "css" in eu_cookie_compliance_page_build() (line 123 of eu_cookie_compliance/eu_cookie_compliance.module), please check attached patch2.

  • 🇳🇴Norway svenryen

    Thanks @Mohd Sahzad, I'll take a look.

  • Status changed to Needs review about 1 year ago
  • Status changed to Needs work about 1 year ago
  • 🇳🇴Norway svenryen

    @Mohd Sahzad could you let me know what branch you're submitting the patch for? I tried applying to 7.x-1.x (dev) and it doesn't apply properly. Note that we are at 7.x-1.43, not 1.14. Is there any reason why you're not at the latest revision?

  • 🇮🇳India mohd sahzad

    @svenryen, this patch was generated for version 7.x-1.14. I updated the patch for this specific version (7.x-1.14) because the issue was created for this version, not the latest one.

  • 🇳🇴Norway svenryen

    I see. Do you still have this issue/problem when you use the latest 7.x-1.x build? I'm used to people creating patches for the latest build (now 7.x-1.43) or the 7.x-dev branch which you can check out from git.

    I'm not really sure how to proceed since the patch doesn't apply and there's no way for us to release something like a 7.x-1.15b.

    Hope you understand. If you intend to patch 7.x-1,14 you're welcome to do so, but most likely the issue will be closed stating the patch is outdated.

Production build 0.71.5 2024