Fatal Error: Operand types eu_cookie_compilance.module line 639

Created on 18 December 2020, about 4 years ago
Updated 29 May 2023, over 1 year ago

Fatal Error on domain with no eu_cookie_compilance info saved.

Steps to reproduce

With multi-domain Drupal 7 (7.73) installation not configure settings for one of them.
The front page crash with attached error.
It seems a operand error, concat array with +=

Proposed resolution:

File: sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.module
line 638: -- $popup_settings += array(

Replace by:

$popup_settings2 = array(
    'consent_storage_method' => 'do_not_store',
    'enable_save_preferences_button' => NULL,
    'show_disagree_button' => TRUE,
    'withdraw_button_on_info_popup' => NULL,
  );

  $popup_settings = array_merge($popup_settings, $popup_settings2);

Related links:
https://www.php.net/manual/es/function.array-merge.php

Remaining tasks

Review code.

🐛 Bug report
Status

Fixed

Version

1.36

Component

Code

Created by

🇪🇸Spain hectorelgomez

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024