Fix scrutinizer warning

This commit is contained in:
Laurent Destailleur 2017-04-15 03:14:31 +02:00
parent 7354cb148a
commit 4490477cfb

View File

@ -96,7 +96,8 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
$max_length = $levels * 3;
$num = substr('00' . $num, -$max_length);
$num_levels = str_split($num, 3);
for ($i = 0; $i < count($num_levels); $i++) {
$nboflevels = count($num_levels);
for ($i = 0; $i < $nboflevels; $i++) {
$levels--;
$hundreds = (int) ($num_levels[$i] / 100);
$hundreds = ($hundreds ? ' ' . $list1[$hundreds] . ' '.$langs->transnoentities('hundred') . ( $hundreds == 1 ? '' : 's' ) . ' ': '');