diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 0045e494edf..2568f9229d9 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -95,7 +95,8 @@ if ($_GET["action"] == 'specimen') // define constants for models generator that need parameters if ($_POST["action"] == 'setModuleOptions') { - for($i=0;$i < count($_POST);$i++) + $post_size=count($_POST); + for($i=0;$i < $post_size;$i++) { if (array_key_exists('param'.$i,$_POST)) { diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index 6fe20ccc94a..df6f8256d13 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -79,7 +79,8 @@ if ($_POST["action"] == 'usesearchtoselectcompany') // define constants for models generator that need parameters if ($_POST["action"] == 'setModuleOptions') { - for($i=0;$i < count($_POST);$i++) + $post_size=count($_POST); + for($i=0;$i < $post_size;$i++) { if (array_key_exists('param'.$i,$_POST)) { diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 7414bce37bb..56e784b8664 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -200,7 +200,8 @@ class Facturation { } $tab=$ret; - for ( $i = 0; $i < count($tab); $i++ ) { + $tab_size=count($tab); + for($i=0;$i < $tab_size;$i++) { // Total HT $remise = $tab[$i]['remise']; diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index f5fd1b6bee4..1e27a12141e 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -81,7 +81,8 @@ if ( dol_strlen ($_GET["code"]) >= 0 ) // If search criteria is on char length a } $tab=$ret; - for ( $i = 0; $i < count ($tab); $i++ ) + $tab_size=count($tab); + for($i=0;$i < $tab_size;$i++) { $resultat .= '
'.$tab[$i]['ref'].' - '.$tab[$i]['label'].'
'."\n"); diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index e5b62951ddb..8d7ebb1e54d 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -133,7 +133,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. } $tab = $ret; - for ( $i = 0; $i < count($tab); $i++ ) { + $tab_size=count($tab); + for($i=0;$i < $tab_size;$i++) { $remise = $tab[$i]['remise']; echo ('