Commit fde68a5e authored by JeroenT's avatar JeroenT Committed by jsacksick
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
......@@ -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');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment