Skip to content

Commit

Permalink
Fix add protection to avoir fatal error 500
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 18, 2018
1 parent 5d50831 commit 75dee75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htdocs/core/class/CMailFile.class.php
Expand Up @@ -657,6 +657,12 @@ function sendfile()
}
else if ($this->sendmode == 'smtps')
{
if (! is_object($this->smtps))
{
$this->error="Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."<br>Constructor of object CMailFile was not initialized without errors.";
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
return false;
}

// Use SMTPS library
// ------------------------------------------
Expand Down

0 comments on commit 75dee75

Please sign in to comment.