Bug #63240 [Csd]: stream_get_line return contains delimiter string

From: Date: Fri, 19 Oct 2012 14:53:54 +0000
Subject: Bug #63240 [Csd]: stream_get_line return contains delimiter string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-174190@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63240&edit=1

 ID:                 63240
 Updated by:         cataphract@php.net
 Reported by:        scope at planetavent dot de
 Summary:            stream_get_line return contains delimiter string
 Status:             Closed
 Type:               Bug
 Package:            Streams related
 Operating System:   Windows Server 2008 / RHEL 6.2
 PHP Version:        5.3.17
 Assigned To:        cataphract
 Block user comment: N
 Private report:     N

 New Comment:

Yes, this has already been committed. See the "All" tab in the "History" section
of this bug report page and you'll find a link to the revision.


Previous Comments:
------------------------------------------------------------------------
[2012-10-19 12:52:02] datibbaw@php.net

Is it tomorrow yet? :)

------------------------------------------------------------------------
[2012-10-12 18:23:20] cataphract@php.net

Automatic comment on behalf of glopes@nebm.ist.utl.pt
Revision: http://git.php.net/?p=php-src.git;a=commit;h=76601c4fd1052bd46e8db4addb1bb9dd3b001f98
Log: Fix bug #63240 on stream_get_line()

------------------------------------------------------------------------
[2012-10-09 21:14:04] cataphract@php.net

Thanks, I'll commit this tomorrow.

As to your other comment on the list about the bool(false) return instead of an empty string for an
empty file, that was a bug fix. A return of "" would indicate an empty line. The result is
now corect:

$ php -r '$fd = fopen("php://temp", "r+"); var_dump(stream_get_line($fd,
10, "MM"));'
bool(false)
$ php -r '$fd = fopen("php://temp", "r+"); fwrite($fd, "MM");
rewind($fd); var_dump(stream_get_line($fd, 10, "MM"), stream_get_line($fd, 10,
"MM"));
string(0) ""
bool(false)

------------------------------------------------------------------------
[2012-10-09 09:02:54] datibbaw@php.net

Added a patch that will apply to 5.4.4

------------------------------------------------------------------------
[2012-10-09 09:02:18] datibbaw@php.net

The following patch has been added/updated:

Patch Name: getrecord-delimiter-search-fix
Revision:   1349773338
URL:        https://bugs.php.net/patch-display.php?bug=63240&patch=getrecord-delimiter-search-fix&revision=1349773338

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=63240


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63240&edit=1


Thread (8 messages)

« previous php.bugs (#174190) next »