diff options
-rw-r--r-- | it.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -921,8 +921,8 @@ static function _stdin_next() { if ($result = $GLOBALS['it_stdin']['args']) { - $GLOBALS['it_stdin']['filename'] = array_shift($GLOBALS['it_stdin']['args']); - $GLOBALS['it_stdin']['fd'] = ($GLOBALS['it_stdin']['filename'] == "-") ? STDIN : @it::fopen($GLOBALS['it_stdin']['filename'], "r"); + $GLOBALS['it_stdin']['filename'] = $filename = array_shift($GLOBALS['it_stdin']['args']); + $GLOBALS['it_stdin']['fd'] = $filename == "-" ? STDIN : (file_exists($filename) ? it::fopen($filename, "r") : false); $GLOBALS['it_stdin']['line'] = 0; } |