to avoid : Warning: A non-numeric value encountered

This commit is contained in:
Philippe GRAND 2019-04-05 09:41:27 +02:00
parent fff9b7db9d
commit 0513ae8cd0

View File

@ -136,7 +136,7 @@ if (empty($reshook))
if (substr($key, 0, 7) == 'amount_')
{
$cursorfacid = substr($key, 7);
$amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
$amounts[$cursorfacid] = (float) price2num(trim(GETPOST($key)));
$totalpayment = $totalpayment + $amounts[$cursorfacid];
if (! empty($amounts[$cursorfacid])) $atleastonepaymentnotnull++;
$result=$tmpinvoice->fetch($cursorfacid);