summaryrefslogtreecommitdiff
path: root/it_pipe.class
diff options
context:
space:
mode:
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 bed5537..f9e64e2 100644
--- a/it_pipe.class
+++ b/it_pipe.class
@@ -15,7 +15,7 @@ function __construct($p = array())
if ($p['data'])
$this->lines = $p['data'];
else if ($p['cmd'])
- $this->lines = explode("\n", rtrim(it::exec($p['cmd'], $p['args'])));
+ $this->lines = strlen($data = it::exec($p['cmd'], $p['args'])) ? explode("\n", rtrim($data)) : array();
else
foreach ((array)($p['fn'] ? $p['fn'] : "php://stdin") as $fn)
$this->lines = array_merge((array)$this->lines, file($fn, FILE_IGNORE_NEW_LINES));