2
0
forked from Wavyzz/dolibarr

Fix : php 8.1 warning

This commit is contained in:
hystepik
2023-01-27 11:01:16 +01:00
committed by Laurent Destailleur
parent 7e9d3c22e2
commit 5d787a0ba9
2 changed files with 10 additions and 1 deletions

View File

@@ -46,6 +46,10 @@ $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