From 508b076a384d54dd291810f1fdb6b316138a1b7a Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 2 Feb 2015 13:57:55 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E7=A9=BA=E5=80=BC=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/module/Westdc/Dataimport/Processing/Csv.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/module/Westdc/Dataimport/Processing/Csv.php b/application/module/Westdc/Dataimport/Processing/Csv.php index f9521c58..c5ee80c1 100644 --- a/application/module/Westdc/Dataimport/Processing/Csv.php +++ b/application/module/Westdc/Dataimport/Processing/Csv.php @@ -117,7 +117,7 @@ class Csv extends AbstractProcessing implements ProcessingInterface{ $t1=gettype($var1); $t2=gettype($var2); if ($t1==$t2) return true; - if (emtpy($var1) || emtpy($var2)) + if ($var1=="" || $var2=="") return true; if (($t1=='integer' || $t1=='double') && ($t2=='integer' || $t2=='double')) return true; @@ -222,6 +222,8 @@ class Csv extends AbstractProcessing implements ProcessingInterface{ foreach($this->getLines() as $line) { + foreach($line as $k=>$v) + if ($v=="") $line[$k]=null; $sth->execute($line); } @@ -234,4 +236,4 @@ class Csv extends AbstractProcessing implements ProcessingInterface{ return true; } -} \ No newline at end of file +}