Skip to content

Commit

Permalink
fix method sendfile return type
Browse files Browse the repository at this point in the history
  • Loading branch information
lamrani002 committed Mar 12, 2024
1 parent 367f474 commit 8bf54de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/core/class/CMailFile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ public function sendfile()
$this->error = "Error in hook maildao sendMail ".$reshook;
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);

return $reshook;
return false;
}
if ($reshook == 1) { // Hook replace standard code
return true;
Expand Down Expand Up @@ -1283,7 +1283,7 @@ public function sendfile()
// Send mail method not correctly defined
// --------------------------------------

return 'Bad value for sendmode';
$this->error = 'Bad value for sendmode';
}

// Now we delete image files that were created dynamically to manage data inline files
Expand All @@ -1300,7 +1300,7 @@ public function sendfile()
$this->error = "Error in hook maildao sendMailAfter ".$reshook;
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);

return $reshook;
return false;
}
} else {
$this->error = 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
Expand Down

0 comments on commit 8bf54de

Please sign in to comment.