Merge pull request #15156 from frederic34/patch-11

set unknown variables
This commit is contained in:
Laurent Destailleur 2020-10-26 19:22:43 +01:00 committed by GitHub
commit 87f65d2487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -2304,7 +2304,8 @@ if ($action == 'create')
if ($action == 'valid')
{
// We check if number is temporary number
if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) { // empty should not happened, but when it occurs, the test save life
if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) {
// empty should not happened, but when it occurs, the test save life
$numref = $object->getNextNumRef($societe);
} else {
$numref = $object->ref;

View File

@ -1515,6 +1515,8 @@ class Ticket extends CommonObject
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
}
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$sendtocc = '';
$deliveryreceipt = 0;
$mailfile = new CMailFile($subject, $info_sendto['email'], $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0);
if ($mailfile->error || $mailfile->errors) {
setEventMessages($mailfile->error, $mailfile->errors, 'errors');