scrutinizer: multiple attribute errors considered as boolean instead of string[] in if()
This commit is contained in:
parent
423c4bdf70
commit
e4faf16c56
@ -368,7 +368,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
||||||
if ($mailfile->error || $mailfile->errors) {
|
if ($mailfile->error || !empty($mailfile->errors)) {
|
||||||
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
@ -409,7 +409,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message_admin, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
$mailfile = new CMailFile($subject, $sendto, $from, $message_admin, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
||||||
if ($mailfile->error || $mailfile->errors) {
|
if ($mailfile->error || !empty($mailfile->errors)) {
|
||||||
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
|
|||||||
@ -1654,7 +1654,7 @@ class Ticket extends CommonObject
|
|||||||
$sendtocc = '';
|
$sendtocc = '';
|
||||||
$deliveryreceipt = 0;
|
$deliveryreceipt = 0;
|
||||||
$mailfile = new CMailFile($subject, $info_sendto['email'], $from, $tmpmessage, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0);
|
$mailfile = new CMailFile($subject, $info_sendto['email'], $from, $tmpmessage, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0);
|
||||||
if ($mailfile->error || $mailfile->errors) {
|
if ($mailfile->error || !empty($mailfile->errors)) {
|
||||||
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user