File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,17 @@ public function getFormValues()
165
165
{
166
166
try {
167
167
$ customer = $ this ->customerRepository ->getById ($ this ->getCustomerId ());
168
- $ data = $ this ->_extensibleDataObjectConverter ->toFlatArray (
169
- $ customer ,
170
- [],
171
- CustomerInterface::class
172
- );
173
168
} catch (\Exception $ e ) {
174
- $ data = [];
169
+ /** If customer does not exist do nothing. */
175
170
}
171
+ $ data = isset ($ customer )
172
+ ? $ this ->_extensibleDataObjectConverter ->toFlatArray (
173
+ $ customer ,
174
+ [],
175
+ \Magento \Customer \Api \Data \CustomerInterface::class
176
+ )
177
+ : [];
178
+
176
179
foreach ($ this ->getQuote ()->getData () as $ key => $ value ) {
177
180
if (strpos ($ key , 'customer_ ' ) === 0 ) {
178
181
$ data [substr ($ key , 9 )] = $ value ;
You can’t perform that action at this time.
0 commit comments