Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix method sendfile return type #28783

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 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,8 @@ public function sendfile()
// Send mail method not correctly defined
// --------------------------------------

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

// Now we delete image files that were created dynamically to manage data inline files
Expand All @@ -1300,7 +1301,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
Loading