Commit df41786c authored by Evaldas Užkuras's avatar Evaldas Užkuras Committed by Jonathan Sacksick
Browse files

Issue #3274438 by Evaldas Užkuras, miketsai: Trying to access array offset on...

Issue #3274438 by Evaldas Užkuras, miketsai: Trying to access array offset on value of type null in Drupal\commerce_cart\Form\AddToCartForm.
parent 389a9d05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ class AddToCartForm extends ContentEntityForm implements AddToCartFormInterface
    // If the product references variations of a different type, fallback
    // to using the title widget as the attributes widget cannot properly
    // work.
    if ($component['type'] === 'commerce_product_variation_attributes') {
    if ($component && $component['type'] === 'commerce_product_variation_attributes') {
      $product = $form_state->get('product');
      /** @var \Drupal\commerce_product\ProductVariationStorageInterface $product_variation_storage */
      $product_variation_storage = $this->entityTypeManager->getStorage('commerce_product_variation');