Skip to content

Commit 44d2c8c

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 64881a1 + efa5674 commit 44d2c8c

File tree

4 files changed

+108
-56
lines changed

4 files changed

+108
-56
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ PHP NEWS
7070
- Standard:
7171
. Fixed bug #75533 (array_reduce is slow when $carry is large array).
7272
(Manabu Matsui)
73+
. Fixed bug #76965 (INI_SCANNER_RAW doesn't strip trailing whitespace).
74+
(Pierrick)
7375

7476
- XMLRPC:
7577
. Fixed bug #76886 (Can't build xmlrpc with expat). (Thomas Petazzoni, cmb)

Zend/tests/bug76965.phpt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
Bug #76965 (INI_SCANNER_RAW doesn't strip trailing whitespace)
3+
--FILE--
4+
<?php
5+
// the trailing whitespace is intentional
6+
$ini = <<<END
7+
1="foo"
8+
2="bar" ; comment
9+
3= baz
10+
4= "foo;bar"
11+
5= "foo" ; bar ; baz
12+
6= "foo;bar" ; baz
13+
7= foo"bar ; "ok
14+
END;
15+
16+
var_dump(parse_ini_string($ini, false, INI_SCANNER_RAW));
17+
?>
18+
===DONE===
19+
--EXPECT--
20+
array(7) {
21+
[1]=>
22+
string(3) "foo"
23+
[2]=>
24+
string(3) "bar"
25+
[3]=>
26+
string(3) "baz"
27+
[4]=>
28+
string(7) "foo;bar"
29+
[5]=>
30+
string(3) "foo"
31+
[6]=>
32+
string(7) "foo;bar"
33+
[7]=>
34+
string(7) "foo"bar"
35+
}
36+
===DONE===

0 commit comments

Comments
 (0)