mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix #65483: quoted-printable encode stream filter incorrectly encoding spaces Update NEWS
This commit is contained in:
commit
bdccf0a61d
2
NEWS
2
NEWS
@ -5,6 +5,8 @@ PHP NEWS
|
||||
- Core:
|
||||
. Fixed bug #65490 (Duplicate calls to get lineno & filename for
|
||||
DTRACE_FUNCTION_*). (Chris Jones)
|
||||
. Fixed bug #65483 (quoted-printable encode stream filter incorrectly encoding
|
||||
spaces). (Michael M Slusarz)
|
||||
. Fixed bug #65470 (Segmentation fault in zend_error() with
|
||||
--enable-dtrace). (Chris Jones, Kris Van Hees)
|
||||
. Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
|
||||
|
@ -951,7 +951,9 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins
|
||||
*(pd++) = qp_digits[(c & 0x0f)];
|
||||
ocnt -= 3;
|
||||
line_ccnt -= 3;
|
||||
trail_ws--;
|
||||
if (trail_ws > 0) {
|
||||
trail_ws--;
|
||||
}
|
||||
CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt);
|
||||
}
|
||||
}
|
||||
|
19
ext/standard/tests/streams/bug65483.phpt
Normal file
19
ext/standard/tests/streams/bug65483.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #65483: quoted-printable encode stream filter incorrectly encoding spaces
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$data = 'a b=c d';
|
||||
|
||||
$fd = fopen('php://temp', 'w+');
|
||||
fwrite($fd, $data);
|
||||
rewind($fd);
|
||||
|
||||
$res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ);
|
||||
var_dump(stream_get_contents($fd, -1, 0));
|
||||
|
||||
fclose($fd);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(9) "a b=3Dc d"
|
Loading…
Reference in New Issue
Block a user