File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,14 @@ property, instead of the actual filename::
443
443
return;
444
444
}
445
445
446
+ // check if we have an old image
447
+ if (isset($this->temp)) {
448
+ // delete the old image
449
+ unlink($this->temp);
450
+ // clear the temp image path
451
+ $this->temp = null;
452
+ }
453
+
446
454
// you must throw an exception here if the file cannot be moved
447
455
// so that the entity is not persisted to the database
448
456
// which the UploadedFile move() method does
@@ -452,14 +460,6 @@ property, instead of the actual filename::
452
460
);
453
461
454
462
unset($this->file);
455
-
456
- // check if we have an old image
457
- if (isset($this->temp)) {
458
- // delete the old image
459
- unlink($this->temp);
460
- // clear the temp image path
461
- $this->temp = null;
462
- }
463
463
}
464
464
465
465
/**
You can’t perform that action at this time.
0 commit comments