From 7abbf2ce713200bb62ed472884a7ddef84111416 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 20 Aug 2012 17:14:36 +0000 Subject: return zero element array on 404 --- it_pipe.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_pipe.class') 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); } /** -- cgit v1.2.3