diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -932,7 +932,6 @@ static function getopt($usage, $p = array()) it_debug::set($result['debug']); $GLOBALS['it_stdin']['args'] = $result['args'] ? $result['args'] : array("-"); - it::_stdin_next(); if ($result['verbose']) $GLOBALS['debug_verbose']++; @@ -959,6 +958,11 @@ static function _stdin_next() */ static function gets() { + static $initialized = 0; + + if (!$initialized++) + it::_stdin_next(); + do { $result = fgets($GLOBALS['it_stdin']['fd']); } while (($result === false) && it::_stdin_next()); |