From 63dd6d98eccf31d15642fc41fd51f8e1d025ceb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 Apr 2016 19:53:16 +0200 Subject: [PATCH] Remove warnings --- htdocs/core/lib/functions2.lib.php | 3 ++- htdocs/core/lib/functionsnumtoword.lib.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 5f57234d4bb..e9ec126e328 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -640,7 +640,8 @@ function dolObfuscateEmail($mail, $replace="*", $nbreplace=8, $nbdisplaymail=4, $mail_domaine = $tab2[0]; $mail_tld = ''; - for($i=1; $i < count($tab2) && $displaytld ;$i++) + $nbofelem = count($tab2); + for($i=1; $i < $nbofelem && $displaytld; $i++) { $mail_tld .= '.'.$tab2[$i]; } diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 24a7cd86e47..0eff5075594 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -37,7 +37,9 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number') return -1; // Get 2 decimals to cents, another functions round or truncate $strnumber = number_format ($numero,10); - for ($i=0; $i