Problem/Motivation

Steps to reproduce

Step 1: Install a site based on the latest tag 7.x-1.43
Step 2: go to admin/config/system/eu-cookie-compliance, it will get the below error messages.
Notice: Undefined index: reject_button_enabled in eu_cookie_compliance_admin_form() (line 509 of eu_cookie_compliance.admin.inc).
Notice: Undefined index: reject_button_label in eu_cookie_compliance_admin_form() (line 515 of eu_cookie_compliance.admin.inc).
Notice: Undefined index: close_button_enabled in eu_cookie_compliance_admin_form() (line 526 of eu_cookie_compliance.admin.inc).
Notice: Undefined index: close_button_action in eu_cookie_compliance_admin_form() (line 538 of eu_cookie_compliance.admin.inc).

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

lily.yan created an issue. See original summary.

lily.yan’s picture

Here is a patch.

poker10’s picture

Status: Active » Needs work

Thanks for the patch @lily.yan. Can we please not introduce incompatible changes with PHP 5.6 and below intentionally? The "null coalescing operator" was added in PHP 7.0 and therefore it will not work with PHP 5.6 and below, which Drupal 7 still supports. I think it would be better to add a classic isset check.

poker10’s picture

Status: Needs work » Needs review

Created an MR with proposed changes from #3.

svenryen’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Code is looking good.

  • svenryen committed d3d27f50 on 7.x-1.x authored by poker10
    Issue #3334594 by lily.yan: Undefined index: reject_button_enabled,...
svenryen’s picture

Status: Reviewed & tested by the community » Fixed

Merged. Thanks for contributing!

Status: Fixed » Closed (fixed)

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