Fix missing return

This commit is contained in:
Laurent Destailleur 2023-05-02 05:08:19 +02:00
parent a577f33f1e
commit f61e79dc55
2 changed files with 10 additions and 1 deletions

View File

@ -762,8 +762,12 @@ class EmailCollector extends CommonObject
$i++; $i++;
} }
$this->db->free($resql); $this->db->free($resql);
return 1;
} else { } else {
dol_print_error($this->db); dol_print_error($this->db);
return -1;
} }
} }
@ -3274,7 +3278,7 @@ class EmailCollector extends CommonObject
* @param Object $mbox Structure * @param Object $mbox Structure
* @param string $mid UID email * @param string $mid UID email
* @param string $destdir Target dir for attachments * @param string $destdir Target dir for attachments
* @return array Array with number and object * @return void
*/ */
private function getmsg($mbox, $mid, $destdir = '') private function getmsg($mbox, $mid, $destdir = '')
{ {

View File

@ -245,6 +245,7 @@ class FichinterRec extends Fichinter
if ($error) { if ($error) {
$this->db->rollback(); $this->db->rollback();
return -1;
} else { } else {
$this->db->commit(); $this->db->commit();
return $this->id; return $this->id;
@ -478,6 +479,7 @@ class FichinterRec extends Fichinter
// Check parameters // Check parameters
if ($type < 0) { if ($type < 0) {
$this->error = 'Bad value for parameter type';
return -1; return -1;
} }
@ -569,6 +571,9 @@ class FichinterRec extends Fichinter
$this->error = $this->db->lasterror(); $this->error = $this->db->lasterror();
return -1; return -1;
} }
} else {
$this->error = 'Bad status of recurring intervention. Must be draft status to allow addition of lines';
return -1;
} }
} }