diff options
author | Urban Müller | 2012-08-20 17:14:36 +0000 |
---|---|---|
committer | Urban Müller | 2012-08-20 17:14:36 +0000 |
commit | 7abbf2ce713200bb62ed472884a7ddef84111416 (patch) | |
tree | aef4ddd8b14841d32f29ed881d656a8b9fab2906 | |
parent | fff44d4edaa5855f29f52c096b2a1e38bb19408c (diff) | |
download | itools-7abbf2ce713200bb62ed472884a7ddef84111416.tar.gz itools-7abbf2ce713200bb62ed472884a7ddef84111416.tar.bz2 itools-7abbf2ce713200bb62ed472884a7ddef84111416.zip |
return zero element array on 404
-rw-r--r-- | it_pipe.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_pipe.class b/it_pipe.class index faa93ea..a5a3f7b 100644 --- a/it_pipe.class +++ b/it_pipe.class @@ -18,7 +18,7 @@ function __construct($p = array()) $this->lines = strlen($data = it::exec($p['cmd'], $p['args'])) ? explode("\n", rtrim($data, "\n")) : array(); else foreach ((array)($p['fn'] ? $p['fn'] : "php://stdin") as $fn) - $this->lines = array_merge((array)$this->lines, (array)file($fn, FILE_IGNORE_NEW_LINES)); + $this->lines = array_merge((array)$this->lines, ($t = file($fn, FILE_IGNORE_NEW_LINES)) === false ? array() : $t); } /** |