File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/code/Magento/OfflineShipping
Model/ResourceModel/Carrier
Test/Unit/Model/ResourceModel/Carrier Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -298,16 +298,19 @@ public function uploadAndImport(\Magento\Framework\DataObject $object)
298298 } else {
299299 $ request = $ this ->requestFactory ->create ();
300300 $ files = (array )$ request ->getFiles ();
301+
301302 if (empty ($ files ['groups ' ]['tablerate ' ]['fields ' ]['import ' ]['value ' ])) {
302303 return $ this ;
303304 } else {
304305 $ filePath = $ files ['groups ' ]['tablerate ' ]['fields ' ]['import ' ]['value ' ]['tmp_name ' ];
305306 }
306307 }
308+ if (!$ filePath ) {
309+ return $ this ;
310+ }
307311
308312 $ websiteId = $ this ->storeManager ->getWebsite ($ object ->getScopeId ())->getId ();
309313 $ conditionName = $ this ->getConditionName ($ object );
310-
311314 $ file = $ this ->getCsvFile ($ filePath );
312315 try {
313316 // delete old data by website and condition name
Original file line number Diff line number Diff line change 1111use Magento \Framework \App \DeploymentConfig ;
1212use Magento \Framework \App \Request \Http ;
1313use Magento \Framework \App \RequestFactory ;
14- use Magento \Framework \App \RequestInterface ;
1514use Magento \Framework \App \ResourceConnection ;
1615use Magento \Framework \DB \Adapter \AdapterInterface ;
1716use Magento \Framework \Filesystem ;
You can’t perform that action at this time.
0 commit comments