Fix missing return
This commit is contained in:
parent
a577f33f1e
commit
f61e79dc55
@ -762,8 +762,12 @@ class EmailCollector extends CommonObject
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3274,7 +3278,7 @@ class EmailCollector extends CommonObject
|
||||
* @param Object $mbox Structure
|
||||
* @param string $mid UID email
|
||||
* @param string $destdir Target dir for attachments
|
||||
* @return array Array with number and object
|
||||
* @return void
|
||||
*/
|
||||
private function getmsg($mbox, $mid, $destdir = '')
|
||||
{
|
||||
|
||||
@ -245,6 +245,7 @@ class FichinterRec extends Fichinter
|
||||
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
@ -478,6 +479,7 @@ class FichinterRec extends Fichinter
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) {
|
||||
$this->error = 'Bad value for parameter type';
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -569,6 +571,9 @@ class FichinterRec extends Fichinter
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = 'Bad status of recurring intervention. Must be draft status to allow addition of lines';
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user