]> granicus.if.org Git - php/commitdiff
Fixed bug #26772 (fgets returns NULL instead of FALSE). (Wez)
authorWez Furlong <wez@php.net>
Wed, 14 Jan 2004 14:31:27 +0000 (14:31 +0000)
committerWez Furlong <wez@php.net>
Wed, 14 Jan 2004 14:31:27 +0000 (14:31 +0000)
NEWS
ext/standard/file.c

diff --git a/NEWS b/NEWS
index 7fde8768091a5609bb6d448cf5af28ef6b54fa0b..dc2b86db4c3378972411bf7246142d92abe51316 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ PHP 4                                                                      NEWS
 - Fixed bug #26878 (problem with multiple references to the same variable 
   with different types). (Ilia)
 - Fixed bug #26896 (ext/ftp does not work as shared extension). (Jani)
+- Fixed bug #26772 (fgets returns NULL instead of FALSE). (Wez)
 
 12 Jan 2004, Version 4.3.5RC1
 - Synchronized bundled GD library with GD 2.0.17
index e8b3f8d4a87109186d370650ed6cf3a2be8d7a0a..25db8f3435d6f2232bbfac0d569c1d8fc0b861b9 100644 (file)
@@ -1363,7 +1363,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) {
+               /* want a false return value here */
+               goto exit_failed;
+       }
 
        if (argc == 1) {
                /* ask streams to give us a buffer of an appropriate size */