summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it.class b/it.class
index 4f6514a..baaf91c 100644
--- a/it.class
+++ b/it.class
@@ -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;
}