summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2008-12-16 01:50:30 +0000
committerUrban Müller2008-12-16 01:50:30 +0000
commit3a50d48b13ecef44438b33be15b8fa6491f9899a (patch)
tree6e15e3a59db427c0553559e1df3c19ceb837386d /it.class
parent0cd524a1dc1b89ee62aabee262e6a03c1b1c7465 (diff)
downloaditools-3a50d48b13ecef44438b33be15b8fa6491f9899a.tar.gz
itools-3a50d48b13ecef44438b33be15b8fa6491f9899a.tar.bz2
itools-3a50d48b13ecef44438b33be15b8fa6491f9899a.zip
handly empty arrays
Diffstat (limited to 'it.class')
-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);
}