Fix: Added array checks for $rows in fxGetRangesForBatchAssign and fxLoadUsedBibsForBatch functions to prevent potential errors.

This commit is contained in:
2026-06-03 14:14:56 -04:00
parent 162052a2d1
commit 2ee8ee21d2
2 changed files with 7 additions and 3 deletions

View File

@ -3565,6 +3565,7 @@ function fxGetRangesForBatchAssign($epr_id, $ranges) {
// =====================
$out = [];
if (is_array($rows)) {
foreach ($rows as $r) {
$start = (int)$r['epr_bib_start'];
@ -3579,6 +3580,7 @@ function fxGetRangesForBatchAssign($epr_id, $ranges) {
];
}
}
}
return $out;
}
@ -3641,8 +3643,10 @@ function fxLoadUsedBibsForBatch($epr_id) {
";
$rows = $objDatabase->fxGetResults($sql);
foreach ($rows as $r) {
$usedBib[(int)$r['no_bib']] = true;
if (is_array($rows)) {
foreach ($rows as $r) {
$usedBib[(int)$r['no_bib']] = true;
}
}
return $usedBib;

View File

@ -7,7 +7,7 @@
* Constantes *
*
**************/
define('_VERSION_CODE', '4.72.59');
define('_VERSION_CODE', '4.72.60');
define('_DATE_CODE', '2026-06-02');
//MSIN-4290
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');