summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 480f270..2cb625b 100644
--- a/it.class
+++ b/it.class
@@ -718,7 +718,7 @@ function file_put($filename, $data, $p = array())
if ($p['keyval'])
$data = join("", it::map('"$k\t$v\n"', $data));
else if ($p['lines'])
- $data = join("", it::map('"$v\n"', $data));
+ $data = count((array)$data) ? join("\n", (array)$data) ."\n" : "";
return file_put_contents($filename == "-" ? "php://stdout" : $filename, $data);
}