diff --git a/scripts/bank/export-bank-receipts.php b/scripts/bank/export-bank-receipts.php index d90db1be316..a33fcf016a4 100755 --- a/scripts/bank/export-bank-receipts.php +++ b/scripts/bank/export-bank-receipts.php @@ -2,7 +2,7 @@ - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * Copyright (C) 2024-2026 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -261,7 +261,7 @@ if ($resql) { $sql2 = "SELECT sum(b.amount) as amount"; $sql2 .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql2 .= " WHERE b.num_releve < '".$db->escape($objp->num_releve)."'"; - $sql2 .= " AND b.fk_account = ".$objp->bankid; + $sql2 .= " AND b.fk_account = ".((int) $objp->bankid); $resql2 = $db->query($sql2); if ($resql2) { $obj2 = $db->fetch_object($resql2); diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 2bf567b2a3f..b5783bd18b3 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -5,7 +5,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2024-2025 Frédéric France - * Copyright (C) 2025 MDW + * Copyright (C) 2025-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -219,7 +219,7 @@ if (function_exists('posix_kill') && function_exists('posix_get_last_error')) { $sqlu = "UPDATE ".MAIN_DB_PREFIX."cronjob"; $sqlu .= " SET processing = 0, pid = NULL, datelastresult = '".$db->idate($nowcleanup)."', lastresult = '-1', lastoutput = '".$db->escape($msg)."'"; - $sqlu .= " WHERE rowid = ".((int) $obj->rowid)." AND processing = 1 AND pid = ".$pid." AND datelastresult IS NULL"; + $sqlu .= " WHERE rowid = ".((int) $obj->rowid)." AND processing = 1 AND pid = ".((int) $pid)." AND datelastresult IS NULL"; $db->query($sqlu); dol_syslog("cron_run_jobs.php unlocked stuck job id=".$obj->rowid." (stale pid ".$pid.")", LOG_WARNING); diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 8498d9f0e20..ae8662fa074 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2016 Regis Houssin * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2024 Frédéric France - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,7 +153,7 @@ if ($resql) { $id = $emailing->id; $subject = $emailing->sujet; $message = $emailing->body; - $from = $emailing->email_from; + $email_from = $emailing->email_from; $replyto = $emailing->email_replyto; $errorsto = $emailing->email_errorsto; // Le message est-il en html @@ -173,7 +173,7 @@ if ($resql) { if (getDolGlobalInt('MAILING_LIMIT_SENDBYCLI') > 0 && empty($max)) { $sql2 .= " LIMIT " . getDolGlobalInt('MAILING_LIMIT_SENDBYCLI'); } elseif (getDolGlobalInt('MAILING_LIMIT_SENDBYCLI') > 0 && $max > 0) { - $sql2 .= " LIMIT ".min(getDolGlobalInt('MAILING_LIMIT_SENDBYCLI'), $max); + $sql2 .= " LIMIT ".min(getDolGlobalInt('MAILING_LIMIT_SENDBYCLI'), ((int) $max)); } elseif ($max > 0) { $sql2 .= " LIMIT ".((int) $max); } @@ -336,7 +336,7 @@ if ($resql) { // Fabrication du mail $trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid; $upload_dir_tmp = $upload_dir; - $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp); + $mail = new CMailFile($newsubject, $sendto, $email_from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp); if ($mail->error) { $res = 0;