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 16
16
use Magento \Customer \Model \AuthenticationInterface ;
17
17
use Magento \Customer \Model \Customer \Mapper ;
18
18
use Magento \Customer \Model \EmailNotificationInterface ;
19
+ use Magento \Customer \Model \Metadata \Form \File ;
19
20
use Magento \Framework \App \CsrfAwareActionInterface ;
20
21
use Magento \Framework \App \ObjectManager ;
21
22
use Magento \Framework \App \Request \InvalidRequestException ;
@@ -234,8 +235,11 @@ public function execute()
234
235
$ customerCandidate = $ this ->populateNewCustomerDataObject ($ this ->_request , $ customer );
235
236
236
237
$ 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
+ }
239
243
}
240
244
241
245
try {
You can’t perform that action at this time.
0 commit comments