From 02935c52c7cf9e32274e834ebd632fc29cb44cd2 Mon Sep 17 00:00:00 2001
From: llaffont <laurent.laffont@gmail.com>
Date: Thu, 20 Mar 2014 11:36:32 +0100
Subject: [PATCH] Cosmogramme: remove a php warning

---
 cosmogramme/php/classes/classe_sql.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/cosmogramme/php/classes/classe_sql.php b/cosmogramme/php/classes/classe_sql.php
index 13e867cca68..845cec63dfe 100644
--- a/cosmogramme/php/classes/classe_sql.php
+++ b/cosmogramme/php/classes/classe_sql.php
@@ -144,9 +144,11 @@ class sql
 		$statement = isset($this->statements[$table][$cols])
 			? $this->statements[$table][$cols] 
 			: $this->statements[$table][$cols] = $this->createInsertPrepareStatement($table, $data);
-		
-		foreach($data as $col => $valeur)
-			$statement->bindParam(":$col", trim($valeur));
+
+		foreach($data as $col => $valeur) {
+			$valeur = trim($valeur);
+			$statement->bindParam(":$col", $valeur);
+		}
 
 		try	{
 			$result = $statement->execute();
-- 
GitLab