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.

Comments

hectorelgomez created an issue. See original summary.

hectorelgomez’s picture

Issue summary: View changes
hectorelgomez’s picture

added link

svenryen’s picture

Hi @hectorelgomez - may I check - what version of PHP are you using on your site?

svenryen’s picture

Here's the proposed change as a patch.

  • svenryen committed 07c1b5f on 7.x-1.x
    Issue #3189040 by svenryen, hectorelgomez: Fatal Error: Operand types...
svenryen’s picture

Status: Needs review » Fixed

  • svenryen committed 07c1b5f on 7.x-2.x
    Issue #3189040 by svenryen, hectorelgomez: Fatal Error: Operand types...
  • svenryen committed df4e221 on 7.x-2.x
    Merge branch '7.x-1.x' into 7.x-2.x
    
    * 7.x-1.x:
      Issue #3206637 by...

Status: Fixed » Closed (fixed)

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

hectorelgomez’s picture