Browse Source

Fix #26772: fgets returns NULL instead of FALSE.

PEAR_1_4DEV
Wez Furlong 23 years ago
parent
commit
cd4262eedd
  1. 6
      ext/standard/file.c

6
ext/standard/file.c

@ -907,7 +907,11 @@ PHPAPI PHP_FUNCTION(fgets)
WRONG_PARAM_COUNT;
}
php_stream_from_zval(stream, arg1);
php_stream_from_zval_no_verify(stream, arg1);
if (stream == NULL) {
/* we want false return value, rather than NULL */
goto exit_failed;
}
if (argc == 1) {
/* ask streams to give us a buffer of an appropriate size */

Loading…
Cancel
Save