]> git.nbdom.net Git - nb.git/commitdiff
out::csv no more enclose
authorNicolas Boisselier <nicolas.boisselier@semantico.com>
Mon, 17 Oct 2016 13:39:30 +0000 (14:39 +0100)
committerNicolas Boisselier <nicolas.boisselier@semantico.com>
Mon, 17 Oct 2016 13:39:30 +0000 (14:39 +0100)
lib/php/out.php

index ff1a806d08909c10bdb1d9eafc067044c418683a..aa8e60c4dff8b2d72ed9aa8712df30d0626adaa9 100644 (file)
@@ -111,7 +111,7 @@ Class Out extends Nb {
       'csv' => array(
         'sep' => self::p('sep',"\t"),
         'eol' => self::p('eol',"\n"),
-        'enclose' => array("","\n"),
+# NB 17.10.16         'enclose' => ["","\n"],
       ),
 
       'yaml' => [
@@ -357,7 +357,7 @@ Class Out extends Nb {
     foreach (array_keys(self::$types) as $t) {
       if (preg_match("@^\w+/$t@",self::client_header('Accept'))) return $t;
     }
-    return;
+    #return;
   }
 
   /*
@@ -444,7 +444,11 @@ Class Out extends Nb {
   }
 
   public static function head_csv(&$o,&$row) {
-    if (!is_array($row)) echo 0;
+    if (!is_array($row)) {
+      echo 0;
+      return 0;
+    }
+
     if (self::is_hash($row)) {
       $ar = array_keys($row);
       return self::row_csv($o,$ar);