summaryrefslogtreecommitdiff
path: root/it_pipe.class
diff options
context:
space:
mode:
authorUrban Müller2012-08-20 17:14:36 +0000
committerUrban Müller2012-08-20 17:14:36 +0000
commit7abbf2ce713200bb62ed472884a7ddef84111416 (patch)
treeaef4ddd8b14841d32f29ed881d656a8b9fab2906 /it_pipe.class
parentfff44d4edaa5855f29f52c096b2a1e38bb19408c (diff)
downloaditools-7abbf2ce713200bb62ed472884a7ddef84111416.tar.gz
itools-7abbf2ce713200bb62ed472884a7ddef84111416.tar.bz2
itools-7abbf2ce713200bb62ed472884a7ddef84111416.zip
return zero element array on 404
Diffstat (limited to 'it_pipe.class')
-rw-r--r--it_pipe.class2
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);
}
/**