Skip to content

Commit

Permalink
fix: return error when delete extrafield failed
Browse files Browse the repository at this point in the history
  • Loading branch information
FHenry committed Aug 1, 2024
1 parent c445e7d commit d48e0d2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions htdocs/core/class/extrafields.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,20 @@ public function delete($attrname, $elementtype = 'member')
if ($result < 0) {
$this->error = $this->db->lasterror();
$this->errors[] = $this->db->lasterror();
$result = -2;
$error++;
}
}
} else {
$this->error = $this->db->lasterror();
$this->errors[] = $this->db->lasterror();
$error++;
}
}

return $result;
if (empty($error)) {
return $result;
} else {
return $error*-1;
}
} else {
return 0;
}
Expand Down

0 comments on commit d48e0d2

Please sign in to comment.