guys,
I recently installed an extension to display the installment price.
However, the following error appears in the log:
Warning: A non-numeric value encountered in /app/code/community/Contardi/Installments/Helper/Data.php on line 87
The code in the Data.php file is as follows:
public function getDescontoPrimeiraParcela($valorParcela)
{
$percentual = $this->descontoPrimeiraParcela;
$desconto = (float)(str_ireplace(',', '.', $percentual) / 100); // line 87
if ($desconto) $valorParcela -= ($valorParcela * $desconto);
return $valorParcela;
}
Does anyone know what can it be?
Thanks.
Best Answer
Which value do you get back for
$percentual = $this->descontoPrimeiraParcela
? It seems like it's not returning a numeric value. Maybe there's a percent sign in it or something that cannot be casted to a proper float value.In general you could disable PHP Warnings through editing the index.php, more information about it here: https://www.php.net/manual/de/function.error-reporting.php