Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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()
Comment | File | Size | Author |
---|---|---|---|
#2 | 3135347-2.patch | 846 bytes | zaporylie |
Comments
Comment #2
zaporylieIn this patch I just wrap it with isset to prevent error occurrence but I wonder why parentEntity is used in the first place.
Comment #3
jsacksick CreditAttribution: jsacksick at Centarro commentedWhich version of Commerce are you using? (See #3092772: Give plugins access to the full parent config entity, not just its ID).
Comment #4
zaporylieI am on 2.15 which is compliant with drupal/commerce version constraint in composer.json
Comment #5
jsacksick CreditAttribution: jsacksick at Centarro commentedOk, 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.
Comment #7
jsacksick CreditAttribution: jsacksick at Centarro commentedCommitted the fix.