Merge pull request #23710 from Hystepik/develop#1

Fix : php 8.1 warning
This commit is contained in:
Laurent Destailleur 2023-01-29 20:25:56 +01:00 committed by GitHub
commit 9324273f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -46,6 +46,11 @@ $action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$socid = GETPOST('socid', 'int');
if ($socid < 0) {
$socid = 0;
}
$object = new Paiement($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('paymentcard', 'globalcard'));

View File

@ -513,6 +513,7 @@ foreach ($arrayfields as $column) {
$i = 0;
$totalarray = array();
$totalarray['nbfield'] = 0;
while ($i < min($num, $limit)) {
$objp = $db->fetch_object($resql);
@ -620,7 +621,11 @@ while ($i < min($num, $limit)) {
$totalarray['nbfield']++;
}
$totalarray['pos'][$checkedCount] = 'amount';
$totalarray['val']['amount'] += $objp->amount;
if (empty($totalarray['val']['amount'])) {
$totalarray['val']['amount'] = $objp->amount;
} else {
$totalarray['val']['amount'] += $objp->amount;
}
}
// Status