Skip to content

Commit 781684a

Browse files
author
solwininfotech
committed
Integration test changes
1 parent 225ba00 commit 781684a

File tree

1 file changed

+9
-6
lines changed
  • app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form

1 file changed

+9
-6
lines changed

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,17 @@ public function getFormValues()
165165
{
166166
try {
167167
$customer = $this->customerRepository->getById($this->getCustomerId());
168-
$data = $this->_extensibleDataObjectConverter->toFlatArray(
169-
$customer,
170-
[],
171-
CustomerInterface::class
172-
);
173168
} catch (\Exception $e) {
174-
$data = [];
169+
/** If customer does not exist do nothing. */
175170
}
171+
$data = isset($customer)
172+
? $this->_extensibleDataObjectConverter->toFlatArray(
173+
$customer,
174+
[],
175+
\Magento\Customer\Api\Data\CustomerInterface::class
176+
)
177+
: [];
178+
176179
foreach ($this->getQuote()->getData() as $key => $value) {
177180
if (strpos($key, 'customer_') === 0) {
178181
$data[substr($key, 9)] = $value;

0 commit comments

Comments
 (0)