Problem/Motivation

If the environment has error reporting ON to show warnings, then the payment gateway page breaks as it shows the "Undefined Index" warnings.

Steps to reproduce

  1. Install Drupal commerce and this module.
  2. Turn on error reporting to show all errors and warnings.
  3. Navigate to 'admin/commerce/config/payment-gateways/add' page.
  4. The warnings are shown and the AJAX also breaks.

Screenshots

Undefined Index
AJAX Error

Proposed resolution

Add ISSET check in the array key where the error is shown.

Remaining tasks

  1. Add the fix and create a patch.
  2. Review and Commit.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

aneek created an issue. See original summary.

aneek’s picture

StatusFileSize
new836 bytes

Adding a patch to solve this issue.

aneek’s picture

Assigned: aneek » Unassigned
Status: Active » Needs review