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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | undefined-index-rejectbuttonenabled-3334594-2.patch | 2.01 KB | lily.yan |
Issue fork eu_cookie_compliance-3334594
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
Comment #2
lily.yan commentedHere is a patch.
Comment #3
poker10 commentedThanks 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.
Comment #5
poker10 commentedCreated an MR with proposed changes from #3.
Comment #6
svenryen commentedThanks! Code is looking good.
Comment #8
svenryen commentedMerged. Thanks for contributing!