Commit fde68a5e authored by Jeroen Tubex's avatar Jeroen Tubex Committed by Jonathan Sacksick
Browse files

Issue #3163698 by JeroenT, SenneS: _clone method called on non-object when...

Issue #3163698 by JeroenT, SenneS: _clone method called on non-object when there is no billing address.
parent 6a81cebc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -445,6 +445,10 @@ class ShippingInformation extends CheckoutPaneBase implements ContainerFactoryPl
    // Save the modified shipments.
    $shipments = [];
    foreach (Element::children($pane_form['shipments']) as $index) {
      if (!isset($pane_form['shipments'][$index]['#shipment'])) {
        continue;
      }

      /** @var \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment */
      $shipment = clone $pane_form['shipments'][$index]['#shipment'];
      $form_display = EntityFormDisplay::collectRenderDisplay($shipment, 'checkout');