diff options
author | Urban Müller | 2008-12-16 01:50:30 +0000 |
---|---|---|
committer | Urban Müller | 2008-12-16 01:50:30 +0000 |
commit | 3a50d48b13ecef44438b33be15b8fa6491f9899a (patch) | |
tree | 6e15e3a59db427c0553559e1df3c19ceb837386d /it.class | |
parent | 0cd524a1dc1b89ee62aabee262e6a03c1b1c7465 (diff) | |
download | itools-3a50d48b13ecef44438b33be15b8fa6491f9899a.tar.gz itools-3a50d48b13ecef44438b33be15b8fa6491f9899a.tar.bz2 itools-3a50d48b13ecef44438b33be15b8fa6491f9899a.zip |
handly empty arrays
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |