mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
fix bug when editing profile request adding a file and no previous file exists
This commit is contained in:
@@ -716,13 +716,12 @@ class ProfilUpdate extends FHCAPI_Controller
|
||||
|
||||
private function deleteOldVersionFile($dms_id)
|
||||
{
|
||||
if (!isset($dms_id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// starting the transaction
|
||||
$this->db->trans_start();
|
||||
|
||||
|
||||
if (!isset($dms_id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//? delete the file from the profilUpdate first
|
||||
$profilUpdateFileDelete = $this->ProfilUpdateModel->removeFileFromProfilUpdate($dms_id);
|
||||
|
||||
Reference in New Issue
Block a user