File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/code/Magento/Customer/Controller/Account Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1616use Magento \Customer \Model \AuthenticationInterface ;
1717use Magento \Customer \Model \Customer \Mapper ;
1818use Magento \Customer \Model \EmailNotificationInterface ;
19+ use Magento \Customer \Model \Metadata \Form \File ;
1920use Magento \Framework \App \CsrfAwareActionInterface ;
2021use Magento \Framework \App \ObjectManager ;
2122use Magento \Framework \App \Request \InvalidRequestException ;
@@ -234,8 +235,11 @@ public function execute()
234235 $ customerCandidate = $ this ->populateNewCustomerDataObject ($ this ->_request , $ customer );
235236
236237 $ attributeToDelete = $ this ->_request ->getParam ('delete_attribute_value ' );
237- if ($ attributeToDelete !== null ) {
238- $ this ->deleteCustomerFileAttribute ($ customerCandidate , $ attributeToDelete );
238+ if ((string )$ attributeToDelete !== "" ) {
239+ $ uploadedValue = $ this ->_request ->getParam ($ attributeToDelete . File::UPLOADED_FILE_SUFFIX );
240+ if ((string )$ uploadedValue === "" ) {
241+ $ this ->deleteCustomerFileAttribute ($ customerCandidate , $ attributeToDelete );
242+ }
239243 }
240244
241245 try {
You can’t perform that action at this time.
0 commit comments