#10 php warning in arinvoicereptax.php

open
nobody
None
5
2004-04-29
2004-04-29
Peter Kools
No

The foreach statement on line 34 presumes that $exmpt
is an array, which isn't always true. Bracketing the line
with if (is_array($exmpt)) {} resolves the php warning
when $exmpt is not an array.

if (is_array ($exmpt)) {
foreach ($exmpt as $data) echo ''.$lang
['STR_EXEMPT_SALES'].' -
'.${'name'.$data}.': '.CURRENCY_SYMBOL.num_format
(${'total'.$data},PREFERRED_DECIMAL_PLACES).'<br>';
}

Discussion


Log in to post a comment.