Skip to content

Commit 7da3d53

Browse files
author
solwininfotech
committed
corrected di.xml and Account.php files
1 parent 4e4e6a2 commit 7da3d53

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

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

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

app/etc/di.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<preference for="Magento\Framework\App\RequestSafetyInterface" type="Magento\Framework\App\Request\Http" />
4848
<preference for="\Magento\Framework\Setup\SchemaSetupInterface" type="\Magento\Setup\Module\Setup" />
4949
<preference for="\Magento\Framework\Setup\ModuleDataSetupInterface" type="\Magento\Setup\Module\DataSetup" />
50+
<preference for="Magento\Framework\App\ExceptionHandlerInterface" type="Magento\Framework\App\ExceptionHandler" />
5051
<type name="Magento\Store\Model\Store">
5152
<arguments>
5253
<argument name="currencyInstalled" xsi:type="string">system/currency/installed</argument>
@@ -1777,4 +1778,7 @@
17771778
type="Magento\Framework\Mail\MimeMessage" />
17781779
<preference for="Magento\Framework\Mail\MimePartInterface"
17791780
type="Magento\Framework\Mail\MimePart" />
1781+
<type name="Magento\Framework\DB\Adapter\AdapterInterface">
1782+
<plugin name="execute_commit_callbacks" type="Magento\Framework\Model\ExecuteCommitCallbacks" />
1783+
</type>
17801784
</config>

0 commit comments

Comments
 (0)