Undeclared member variable 'parentEntity' is used in KlarnaCheckout::acknowledgeOrder causing failure when visiting complete page.

Notice: Undefined property: Drupal\commerce_klarna_checkout\Plugin\Commerce\PaymentGateway\KlarnaCheckout::$parentEntity in Drupal\commerce_klarna_checkout\Plugin\Commerce\PaymentGateway\KlarnaCheckout->acknowledgeOrder()
CommentFileSizeAuthor
#2 3135347-2.patch846 byteszaporylie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zaporylie created an issue. See original summary.

zaporylie’s picture

FileSize
846 bytes

In this patch I just wrap it with isset to prevent error occurrence but I wonder why parentEntity is used in the first place.

jsacksick’s picture

zaporylie’s picture

I am on 2.15 which is compliant with drupal/commerce version constraint in composer.json

jsacksick’s picture

Ok, so perhaps that needs to be changed... #3092772: Give plugins access to the full parent config entity, not just its ID was committed in 2.16, that's the reason why you're getting this waning.

  • jsacksick committed 48631b4 on 8.x-2.x authored by zaporylie
    Issue #3135347 by zaporylie: Fix PHP Notice when acknowledging order.
    
jsacksick’s picture

Status: Active » Fixed

Committed the fix.

Status: Fixed » Closed (fixed)

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