diff options
Diffstat (limited to 'it_pipe.class')
-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 28ef36a..2c5a184 100644 --- a/it_pipe.class +++ b/it_pipe.class @@ -13,7 +13,7 @@ class it_pipe implements Iterator function __construct($p = array()) { if ($p['data']) - $this->lines = $p['data']; + $this->lines = is_array($p['data']) ? $p['data'] : explode("\n", rtrim($p['data'], "\n")); else if ($p['cmd']) $this->lines = strlen($data = it::exec($p['cmd'], $p['args'])) ? explode("\n", rtrim($data, "\n")) : array(); else |