From d5997ce775ab5ae8d39ebadbce91fbc7f83c13d9 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Wed, 16 Oct 2019 16:54:18 +0530 Subject: [PATCH] version checker test failed --- .../Block/Adminhtml/Order/Create/Form/Account.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 03915c0499367..07800cc4c10a0 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -163,16 +163,14 @@ public function getFormValues() { try { $customer = $this->customerRepository->getById($this->getCustomerId()); - } catch (\Exception $e) { - /** If customer does not exist do nothing. */ - } - $data = isset($customer) - ? $this->_extensibleDataObjectConverter->toFlatArray( + $data = $this->_extensibleDataObjectConverter->toFlatArray( $customer, [], - \Magento\Customer\Api\Data\CustomerInterface::class - ) - : []; + CustomerInterface::class + ); + } catch (\Exception $e) { + $data = []; + } foreach ($this->getQuote()->getData() as $key => $value) { if (strpos($key, 'customer_') === 0) { $data[substr($key, 9)] = $value;