0
Inside this Script, gives the following error:
Fatal error: Unsupported operand types in C: Easyphp-Devserver-14.1VC11 data localweb Administrating application holerites holerites.php on line 126
if($r->totalProvento==NULL){
#total a receber
$totalProvento = "0.00";
$totalDesconto = "0.00";
$totalReceber = "0.00";
} else {
#total a receber
----> 126 - $totalProvento = $r->totalProvento->totalProvento + $r->salario;
$totalDesconto = $r->totalDesconto->totalDesconto;
$totalReceber = $totalProvento - $totalDesconto;
}
Some of them are empty?
– rray
Yes, the empty array may occur
– Sr. André Baill
cast to double, it must force null or '' to zero
– rray
Strings are not numbers, and numbers are not strings, that’s exactly what you did there, putting the
0.00
amid" "
– Edilson
I didn’t understand a thing..
– Sr. André Baill
What is this ?
$r->totalProvento->totalProvento
?– Edilson
That’s right ----> 126 ?
– Marcos Xavier
I’m just pointing out which line is coming wrong
– Sr. André Baill