From 76601c4fd1052bd46e8db4addb1bb9dd3b001f98 Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Fri, 12 Oct 2012 20:00:37 +0200 Subject: Fix bug #63240 on stream_get_line() stream_get_line() could contain the delimiter string if that string had more than one character. The bug manifested itself when a read on the stream ended with part of the delimiter string and the read after would start with the rest of the delimiter string; provided that the data of first read did not complete the max length result of the call to stream_get_line() with the partial delimiter used in that max length return. In that case, the delimiter will still appear in the result, divided in two subsequent return values. That is not a bug. See --- ext/standard/tests/streams/bug63240.phpt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ext/standard/tests/streams/bug63240.phpt (limited to 'ext') diff --git a/ext/standard/tests/streams/bug63240.phpt b/ext/standard/tests/streams/bug63240.phpt new file mode 100644 index 0000000000..7612c43745 --- /dev/null +++ b/ext/standard/tests/streams/bug63240.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #63240: stream_get_line() return contains delimiter string +--FILE-- + +--EXPECT-- +int(8191) +string(4) "rest" -- cgit v1.2.1