Problem/Motivation

When a Mollie account already contains (older) payments you get the following notice on /admin/mollie/payments:

Notice: Trying to access array offset on value of type null in Drupal\mollie\Entity\PaymentStorage->createEntityFromTransaction() (line 48 of modules/contrib/mollie/src/Entity/PaymentStorage.php).

Steps to reproduce

Install the module and configure a Mollie account that already contains (older) payments. Go to /admin/mollie payments.

Proposed resolution

Only try to print array keys when they exist.

Remaining tasks

A patch is following.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 3262450-2-fix-php-notice.patch673 bytesmarty2081

Comments

Marty2081 created an issue. See original summary.

marty2081’s picture

Status: Active » Needs review
StatusFileSize
new673 bytes

And here is a patch.

ricovandevin’s picture

Status: Needs review » Fixed

Good catch @Marty2081! Thanks for the patch.

  • ricovandevin committed e8bdd94 on 2.2.x
    Issue #3262450 by Marty2081: PHP Notice when Mollie account already...

Status: Fixed » Closed (fixed)

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