#40047 [NEW]: stream_eof() return code ignored
| From: | alex at kiesel dot name | Date: | Sun, 07 Jan 2007 13:01:45 +0000 |
| Subject: | #40047 [NEW]: stream_eof() return code ignored | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-107276@lists.php.net to get a copy of this message | ||
From: alex at kiesel dot name
Operating system: Gentoo Linux
PHP version: 5.2.0
PHP Bug Type: Streams related
Bug description: stream_eof() return code ignored
Description:
------------
When reading through a stream wrapper, the method stream_eof() is called,
but it's result is discarded and ignored.
This leads to an obsolete call to stream_read().
Reproduce code:
---------------
http://kiesel.name/php/stream.phps
Expected result:
----------------
string(11) "stream_stat"
string(43) "stream_read(8192) / 80 / returning 80 bytes"
string(14) "stream_eof(): "
bool(true)
Actual result:
--------------
string(11) "stream_stat"
string(43) "stream_read(8192) / 80 / returning 80 bytes"
string(14) "stream_eof(): "
bool(true)
string(42) "stream_read(8192) / 80 / returning 0 bytes"
string(14) "stream_eof(): "
bool(true)
--
Edit bug report at http://bugs.php.net/?id=40047&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40047&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40047&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40047&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40047&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40047&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40047&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40047&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40047&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40047&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40047&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40047&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40047&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40047&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40047&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40047&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40047&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40047&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40047&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40047&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40047&r=mysqlcfg