mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 02:15:42 +00:00
Compare commits
637
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c8bda1fe9 | ||
|
|
657609ebae | ||
|
|
0da10134f2 | ||
|
|
735468a0b8 | ||
|
|
649027b963 | ||
|
|
65d5e025a7 | ||
|
|
4ef9f536ba | ||
|
|
e0282c3b58 | ||
|
|
4d08b9dac0 | ||
|
|
2e82ed9b73 | ||
|
|
0db20a7cb1 | ||
|
|
6cd140fdf8 | ||
|
|
0b5683e480 | ||
|
|
5d15fdc4a4 | ||
|
|
3b60af90fd | ||
|
|
c1504b81d3 | ||
|
|
91aad4bc81 | ||
|
|
2f606dc5e8 | ||
|
|
8b04e89ef0 | ||
|
|
04cc2f6473 | ||
|
|
82acb58d8a | ||
|
|
3da01a9652 | ||
|
|
3bcab31749 | ||
|
|
be531ce9f0 | ||
|
|
b47cff48de | ||
|
|
7360e6a36f | ||
|
|
a797421e98 | ||
|
|
fd08eaa8bc | ||
|
|
de32c9efc8 | ||
|
|
2689917b17 | ||
|
|
ccd0ff3ac4 | ||
|
|
5cf54f6073 | ||
|
|
7938b9ccac | ||
|
|
e89476a870 | ||
|
|
62700f76cb | ||
|
|
02cc492015 | ||
|
|
b5338c0b7d | ||
|
|
b38de96733 | ||
|
|
0fdceb6cd5 | ||
|
|
0d3e6f6add | ||
|
|
5c96a255ea | ||
|
|
5ca02ca494 | ||
|
|
18eb78854c | ||
|
|
700803b70c | ||
|
|
739ecf5430 | ||
|
|
1af5ca0746 | ||
|
|
2928feca46 | ||
|
|
fb140d582c | ||
|
|
af07b76ccf | ||
|
|
390f64701d | ||
|
|
7991a88675 | ||
|
|
489f3a3234 | ||
|
|
aa3fceeaad | ||
|
|
1e3b960ab5 | ||
|
|
8b1559b9f4 | ||
|
|
55b880070c | ||
|
|
703be4f77e | ||
|
|
27a743b82b | ||
|
|
bdf7393ddb | ||
|
|
2693e52113 | ||
|
|
4e68b2c52b | ||
|
|
0ba04f7737 | ||
|
|
54840f9c8f | ||
|
|
f269cdcd4f | ||
|
|
f76a6cd023 | ||
|
|
6b18d956de | ||
|
|
e46d589624 | ||
|
|
0496f5407f | ||
|
|
3a25a56a92 | ||
|
|
0525574913 | ||
|
|
73cabfedf5 | ||
|
|
12107d619b | ||
|
|
f7f4fd4706 | ||
|
|
e8b7698f5e | ||
|
|
2aae60461c | ||
|
|
f8c514ba6b | ||
|
|
8dc4f4dc9e | ||
|
|
5f8380d33e | ||
|
|
89637c6b41 | ||
|
|
1fa8e74d6e | ||
|
|
4b38feabe7 | ||
|
|
41ba98f02d | ||
|
|
a29264eb8c | ||
|
|
396c0f7a76 | ||
|
|
4903f044d3 | ||
|
|
6f78923d1f | ||
|
|
04904333fd | ||
|
|
ce64b82ebb | ||
|
|
2dc24005d9 | ||
|
|
d02f953faf | ||
|
|
9d1575c495 | ||
|
|
d0b7eed0c9 | ||
|
|
667185a264 | ||
|
|
c71b773a62 | ||
|
|
af7bfc71fd | ||
|
|
e3cc15daf2 | ||
|
|
72f7143295 | ||
|
|
e57fce4d00 | ||
|
|
2a1ad88538 | ||
|
|
3f4340a796 | ||
|
|
c8bb64c406 | ||
|
|
f15790ec73 | ||
|
|
08089f014c | ||
|
|
a99c5f28c5 | ||
|
|
4e4f2f9f89 | ||
|
|
751d19f698 | ||
|
|
e938cfc921 | ||
|
|
604827b694 | ||
|
|
44d734254a | ||
|
|
cfee5116dd | ||
|
|
0c4f11ecaa | ||
|
|
653b96347c | ||
|
|
2fddc4a7f1 | ||
|
|
0c707fcb10 | ||
|
|
bda0f4e8dc | ||
|
|
de66e80d75 | ||
|
|
fda0a8b735 | ||
|
|
cd1869bcf2 | ||
|
|
3eecee16d1 | ||
|
|
4e98990f6b | ||
|
|
b714309056 | ||
|
|
5b5a92b8b6 | ||
|
|
4948da178a | ||
|
|
721de5b542 | ||
|
|
4d6100569b | ||
|
|
bd8940a1fe | ||
|
|
b255b97e43 | ||
|
|
b903733762 | ||
|
|
b1301a0686 | ||
|
|
21cbdf6984 | ||
|
|
660250f4da | ||
|
|
c56378b0d5 | ||
|
|
81c2a4b9ba | ||
|
|
ed1f64e083 | ||
|
|
db287b2303 | ||
|
|
c288ed44a2 | ||
|
|
5d666d2a02 | ||
|
|
b3bd379198 | ||
|
|
cda87977a5 | ||
|
|
b4c5f20c46 | ||
|
|
fa3615f14e | ||
|
|
13347e8a7d | ||
|
|
3fbbcf7f93 | ||
|
|
d9feb3c2d0 | ||
|
|
1bdc290017 | ||
|
|
18b6de7a91 | ||
|
|
14c422a32f | ||
|
|
78bec63ad9 | ||
|
|
67f063e3ac | ||
|
|
6a854e2740 | ||
|
|
3f2cfac5d6 | ||
|
|
b4fa2ba295 | ||
|
|
0f8cf3b849 | ||
|
|
3303e87101 | ||
|
|
7ecddd2c24 | ||
|
|
27d6814351 | ||
|
|
f39c9d8345 | ||
|
|
64447030bb | ||
|
|
b1431c6174 | ||
|
|
073ac50374 | ||
|
|
98bcc0bd43 | ||
|
|
82bb98ce1a | ||
|
|
135265ef69 | ||
|
|
b742a18ba4 | ||
|
|
ec6ac50812 | ||
|
|
1b797f7ad3 | ||
|
|
058bec9e33 | ||
|
|
a6c67a088a | ||
|
|
51a7e35c24 | ||
|
|
fbb884e532 | ||
|
|
509f5097ab | ||
|
|
bfa9362d43 | ||
|
|
887fabe78f | ||
|
|
7275084388 | ||
|
|
4a39d33ee5 | ||
|
|
c2a348b5bc | ||
|
|
f19dfac830 | ||
|
|
84b9b164a8 | ||
|
|
648be8600f | ||
|
|
6408c66d3c | ||
|
|
90f33b1ac7 | ||
|
|
c4d7cfa536 | ||
|
|
78970d5338 | ||
|
|
5f07a895cc | ||
|
|
593d37376b | ||
|
|
3aa80c482c | ||
|
|
aea8c6ddc1 | ||
|
|
81b2533a68 | ||
|
|
b7c2c44a8d | ||
|
|
c0678be3e0 | ||
|
|
3968ffe7b3 | ||
|
|
caf35c5cf5 | ||
|
|
e05f79c3de | ||
|
|
0fa40b0546 | ||
|
|
91f129ebf7 | ||
|
|
6d46528d54 | ||
|
|
cbe73b3cfe | ||
|
|
1980234fc2 | ||
|
|
c3b910370c | ||
|
|
ee0e6963f3 | ||
|
|
844f4292ef | ||
|
|
9997767dc3 | ||
|
|
c39a10bc6e | ||
|
|
ff93f74f63 | ||
|
|
3704947696 | ||
|
|
6af1d7ad01 | ||
|
|
585c9f3c4b | ||
|
|
6b511d124e | ||
|
|
d9fd44366d | ||
|
|
d027bc2add | ||
|
|
bfedff58e3 | ||
|
|
95c4564f93 | ||
|
|
c742abb3ce | ||
|
|
cea34425f3 | ||
|
|
e9ff1fac85 | ||
|
|
48598a2302 | ||
|
|
741769d933 | ||
|
|
9064dca58b | ||
|
|
9c5717d0de | ||
|
|
316aaca155 | ||
|
|
77cbf8a657 | ||
|
|
1bb295e659 | ||
|
|
dc7e53690f | ||
|
|
b11393fccb | ||
|
|
bee52f352f | ||
|
|
46bb35a853 | ||
|
|
1c845d2950 | ||
|
|
5416deec66 | ||
|
|
6a8ae7cf8d | ||
|
|
60b1829e1c | ||
|
|
1e0c4386ab | ||
|
|
d6922ef8e3 | ||
|
|
d351c199bb | ||
|
|
2dee44c74c | ||
|
|
e628ee9e9d | ||
|
|
8dcfec9789 | ||
|
|
6d2d0bbda7 | ||
|
|
d9458aac9d | ||
|
|
05849a242a | ||
|
|
398efb087c | ||
|
|
19befb1ca2 | ||
|
|
60912e66c8 | ||
|
|
1838f965bc | ||
|
|
ece7d223e8 | ||
|
|
63ca6f93a1 | ||
|
|
cd3520c4d3 | ||
|
|
5269c4cacb | ||
|
|
49d1cdc393 | ||
|
|
fc87715950 | ||
|
|
d51b8f915f | ||
|
|
e7a7065024 | ||
|
|
872e43d6e5 | ||
|
|
e535b80257 | ||
|
|
056cb8c256 | ||
|
|
fff1cab367 | ||
|
|
65bf0364b6 | ||
|
|
c4ae856912 | ||
|
|
11b4f105bf | ||
|
|
08293a960b | ||
|
|
459c382df5 | ||
|
|
26f217bf40 | ||
|
|
464c1639ae | ||
|
|
649494c0ee | ||
|
|
78b10dd9d6 | ||
|
|
0954ea8d6d | ||
|
|
f38487a0e0 | ||
|
|
ef09bc0645 | ||
|
|
d3e3bc611a | ||
|
|
e347b2ded6 | ||
|
|
02e9e59beb | ||
|
|
6e3d24bcf4 | ||
|
|
b73a73da25 | ||
|
|
71f8c4dcfd | ||
|
|
c667bb94fa | ||
|
|
8a1713e39c | ||
|
|
9f49ebb5ba | ||
|
|
7d418430fd | ||
|
|
d74fbfb38f | ||
|
|
7f051ac583 | ||
|
|
e04b91e6e2 | ||
|
|
89dd7fb328 | ||
|
|
8ec91086ee | ||
|
|
b067bda4cd | ||
|
|
777929b1ae | ||
|
|
42e5df141c | ||
|
|
ae3f975c5d | ||
|
|
2e5a747b59 | ||
|
|
c1d5718697 | ||
|
|
8cbfc882d2 | ||
|
|
cfe577fb86 | ||
|
|
90bd4be3f9 | ||
|
|
b8e0351978 | ||
|
|
05c90e5994 | ||
|
|
1b22e9dc2e | ||
|
|
d40a852919 | ||
|
|
15dbe775d1 | ||
|
|
99549ce79c | ||
|
|
b39c70b4a7 | ||
|
|
72073228ca | ||
|
|
1a06fae543 | ||
|
|
83033f0b32 | ||
|
|
bdd66e1492 | ||
|
|
ca870dfee7 | ||
|
|
abad134681 | ||
|
|
2d30bc96a1 | ||
|
|
b966a8b5fa | ||
|
|
62c1edf535 | ||
|
|
2c070847e7 | ||
|
|
87d56a3d07 | ||
|
|
5dafb523fd | ||
|
|
6658b437ae | ||
|
|
5c957b502e | ||
|
|
378f785515 | ||
|
|
561f1afe6e | ||
|
|
4b3a11b329 | ||
|
|
476b7f1667 | ||
|
|
622dc2a611 | ||
|
|
64adba3b3f | ||
|
|
c0c0871911 | ||
|
|
7431d6dda6 | ||
|
|
f97607027a | ||
|
|
36c53036e7 | ||
|
|
3d9563b8b2 | ||
|
|
20a608d9da | ||
|
|
6bd30e8f1a | ||
|
|
4c0e50c88a | ||
|
|
2735318c7b | ||
|
|
f50df1d0e3 | ||
|
|
023cbdb2ca | ||
|
|
a581e64199 | ||
|
|
e3f411c9f7 | ||
|
|
1967950dc3 | ||
|
|
9622a3be43 | ||
|
|
d9dfac90bf | ||
|
|
6028fe511e | ||
|
|
9891b9ede2 | ||
|
|
c436fe2426 | ||
|
|
a0b9554f94 | ||
|
|
d83d5f4198 | ||
|
|
7b392c7154 | ||
|
|
e7166ea9be | ||
|
|
9a07e9e1f8 | ||
|
|
38a65d5ef9 | ||
|
|
e67096dbbb | ||
|
|
392bcba58d | ||
|
|
09ef61e3ca | ||
|
|
bf3e2dce7b | ||
|
|
66dbeb81ba | ||
|
|
36301bd615 | ||
|
|
a1e74a9e0e | ||
|
|
c0203c0ceb | ||
|
|
3f6d9fe9cc | ||
|
|
f639b64dca | ||
|
|
7962185ded | ||
|
|
8cfaea656c | ||
|
|
91a0d48675 | ||
|
|
8c50a1a3e2 | ||
|
|
53a702c020 | ||
|
|
7d560514fc | ||
|
|
bf2fc2800e | ||
|
|
6aac86ec29 | ||
|
|
faf19a7756 | ||
|
|
cda7dcf4ca | ||
|
|
44fdae4360 | ||
|
|
6afcd6c86a | ||
|
|
e969966468 | ||
|
|
7260f65c62 | ||
|
|
9fa347997a | ||
|
|
f504e9eb72 | ||
|
|
f7b8322b14 | ||
|
|
d37c4b0948 | ||
|
|
dd36541f2c | ||
|
|
b720160444 | ||
|
|
f3c4e2f5bf | ||
|
|
ba83b18ce3 | ||
|
|
366b1640d0 | ||
|
|
144ddd3b42 | ||
|
|
2909742326 | ||
|
|
fa72b039da | ||
|
|
3f2271a717 | ||
|
|
5d1fd66faf | ||
|
|
91cb9a6ad1 | ||
|
|
793a8bd886 | ||
|
|
000fe3aacc | ||
|
|
aa0a2e8c58 | ||
|
|
9b7f13cb1b | ||
|
|
242bdf7e8b | ||
|
|
464742bd2a | ||
|
|
0a27a5ba8c | ||
|
|
d6315c2fbb | ||
|
|
abf16c18c7 | ||
|
|
f69c108249 | ||
|
|
32c5b8efd6 | ||
|
|
bc3c9a06e0 | ||
|
|
618d97962a | ||
|
|
0959e6f422 | ||
|
|
7dc6b04f45 | ||
|
|
949de4e46f | ||
|
|
6a04a39d57 | ||
|
|
ce330ad8aa | ||
|
|
039ef0143b | ||
|
|
ca543ff01c | ||
|
|
5bd0baa891 | ||
|
|
9719621e07 | ||
|
|
2719b8e91c | ||
|
|
e433c23b96 | ||
|
|
62bec0e212 | ||
|
|
00c6ce0e00 | ||
|
|
0beccc51f1 | ||
|
|
6c2222796b | ||
|
|
2135b057ec | ||
|
|
d80df7a8bf | ||
|
|
2f22dffd1a | ||
|
|
3ffe2cd251 | ||
|
|
5d095f80c9 | ||
|
|
b760508adc | ||
|
|
35a28fac51 | ||
|
|
4ae69f986f | ||
|
|
bd32837acf | ||
|
|
f05d74feb8 | ||
|
|
f70328b847 | ||
|
|
7f6e553f68 | ||
|
|
da41afeb48 | ||
|
|
77e3fef64f | ||
|
|
bc4bb7882b | ||
|
|
c73bcb0c6c | ||
|
|
241cf47400 | ||
|
|
f4a41fe750 | ||
|
|
28ddfbb892 | ||
|
|
a334da8b17 | ||
|
|
8bba2df2eb | ||
|
|
8bbdbd063e | ||
|
|
b74b325aea | ||
|
|
d44eacab07 | ||
|
|
87e6e1982b | ||
|
|
eb03f16442 | ||
|
|
3dc9279188 | ||
|
|
dd17659b86 | ||
|
|
873c505ad9 | ||
|
|
76c9b58431 | ||
|
|
25c941807b | ||
|
|
7cdf520319 | ||
|
|
9493ebbab2 | ||
|
|
6e23f2bceb | ||
|
|
1df3099f2f | ||
|
|
6f950e83eb | ||
|
|
8c53c346d4 | ||
|
|
5c518f47e4 | ||
|
|
6a84762816 | ||
|
|
d9e2f80375 | ||
|
|
394c53889f | ||
|
|
3431132f18 | ||
|
|
42e576ace2 | ||
|
|
68b312db7d | ||
|
|
e642375764 | ||
|
|
c961beb5de | ||
|
|
60b68f19f0 | ||
|
|
9398f15efd | ||
|
|
65d77812fc | ||
|
|
4bebcb84ad | ||
|
|
d65459f4eb | ||
|
|
8277111eee | ||
|
|
66411ee62e | ||
|
|
d2923ec1e5 | ||
|
|
1b6f784dd6 | ||
|
|
a93832f414 | ||
|
|
9fe4d2d9cb | ||
|
|
d9a05807d2 | ||
|
|
775afd5e2d | ||
|
|
9c7cb2cdcd | ||
|
|
bb5535bd38 | ||
|
|
c32281d406 | ||
|
|
341ff7119f | ||
|
|
3144222c7b | ||
|
|
a87ee7c57b | ||
|
|
6db59ee0e0 | ||
|
|
67283007ec | ||
|
|
75b83ec2fd | ||
|
|
515e1e0cea | ||
|
|
744c4a5592 | ||
|
|
84ef6fa80d | ||
|
|
ba6561d3cc | ||
|
|
1ce355abb6 | ||
|
|
a813cebff0 | ||
|
|
948ad747d7 | ||
|
|
cdc33251d2 | ||
|
|
7a796d18ee | ||
|
|
d3198aa5a1 | ||
|
|
e656455eae | ||
|
|
39327b90e3 | ||
|
|
27120d4412 | ||
|
|
adc49b1d18 | ||
|
|
4ca3468e78 | ||
|
|
3438e62b30 | ||
|
|
feeb35e438 | ||
|
|
2ec54af8df | ||
|
|
fe46a7da78 | ||
|
|
c8034514ed | ||
|
|
32dcc1eef0 | ||
|
|
670041b60e | ||
|
|
46d286574b | ||
|
|
dfb4875850 | ||
|
|
e0102f81aa | ||
|
|
6373ce7c1b | ||
|
|
ef3140e544 | ||
|
|
22881e06e2 | ||
|
|
175b2d8910 | ||
|
|
cec720857a | ||
|
|
012dc336a6 | ||
|
|
d11211fb53 | ||
|
|
d896878ad5 | ||
|
|
d2bae4ecad | ||
|
|
d6f70f0ee3 | ||
|
|
e38310a151 | ||
|
|
2a5e631e31 | ||
|
|
279d1efbdb | ||
|
|
5c93a31804 | ||
|
|
ef8632c9dc | ||
|
|
888fd16411 | ||
|
|
ddad991c18 | ||
|
|
0c3dcabc69 | ||
|
|
6f2d33a239 | ||
|
|
5b12d08e1f | ||
|
|
6508320936 | ||
|
|
ee8b5de5a0 | ||
|
|
6da475367a | ||
|
|
e9e860a05b | ||
|
|
727b21c839 | ||
|
|
1f8fc0fb56 | ||
|
|
b8714a8b37 | ||
|
|
867c29caf0 | ||
|
|
f326cfc513 | ||
|
|
eb5d4bcd4f | ||
|
|
1f9e5cc2bc | ||
|
|
eb13003f6c | ||
|
|
fe5ef147b6 | ||
|
|
ee49d4b4be | ||
|
|
e3e3547627 | ||
|
|
d719b46222 | ||
|
|
f5951cc81b | ||
|
|
7835e2ebc5 | ||
|
|
0fb640c717 | ||
|
|
a0331127fe | ||
|
|
1517fdb36c | ||
|
|
78bacbadfb | ||
|
|
1dbef2e27a | ||
|
|
9e3672eaef | ||
|
|
bc2b500d3e | ||
|
|
2b7c3831cd | ||
|
|
7dd52cbcdd | ||
|
|
6d066dc421 | ||
|
|
f2c35fdda8 | ||
|
|
2e83082605 | ||
|
|
ebc75dab50 | ||
|
|
df135ffa7a | ||
|
|
b0ba8c68cd | ||
|
|
53e2c9158d | ||
|
|
893bf7ecdd | ||
|
|
183cd048f1 | ||
|
|
7ea261685f | ||
|
|
3becfb9be4 | ||
|
|
0c8ad36d92 | ||
|
|
ccc35d1903 | ||
|
|
052aa466e1 | ||
|
|
e60515f3b8 | ||
|
|
f1f68b60f5 | ||
|
|
6633e8492e | ||
|
|
63e59c75a5 | ||
|
|
98f4ce9363 | ||
|
|
9331be7d6a | ||
|
|
2bba4a0d7f | ||
|
|
f3ab4c1a08 | ||
|
|
7fba8bda4c | ||
|
|
3d4e954518 | ||
|
|
8be63ce0e2 | ||
|
|
b4f0174e5c | ||
|
|
b9d3dbc84e | ||
|
|
960e5cde02 | ||
|
|
ba70478a21 | ||
|
|
8e5d080d54 | ||
|
|
f0e67d1a56 | ||
|
|
411f4b1b6f | ||
|
|
760ff21bf3 | ||
|
|
53cc72ef86 | ||
|
|
17e9fc9bfe | ||
|
|
7018a0502f | ||
|
|
8e45583006 | ||
|
|
1ffb1b9597 | ||
|
|
fbf0e0587f | ||
|
|
280e8dafe4 | ||
|
|
29ee3e3c49 | ||
|
|
9f263c257a | ||
|
|
c398198c0a | ||
|
|
7cb3e90162 | ||
|
|
9b16d4c999 | ||
|
|
305f3c2b76 | ||
|
|
177f87cf05 | ||
|
|
314ef0ff69 | ||
|
|
247ce052cd | ||
|
|
6635639b75 | ||
|
|
b224e74267 | ||
|
|
8599ce4f18 | ||
|
|
8f799137d7 | ||
|
|
1a19b97ac3 | ||
|
|
bab0b99f37 | ||
|
|
b8f75e75f6 | ||
|
|
8a6281455e | ||
|
|
549a30d2cd | ||
|
|
d9231b1667 | ||
|
|
b273a8cbe4 | ||
|
|
6158b517c4 | ||
|
|
648b756f35 | ||
|
|
f844c0880d | ||
|
|
c082c92b7e | ||
|
|
1d4248af42 | ||
|
|
18f7e26257 | ||
|
|
494fc16184 | ||
|
|
c7b2c698d0 | ||
|
|
bf8c463f5b | ||
|
|
fab5ce347c | ||
|
|
a7ff583e7e | ||
|
|
cf60f26da6 | ||
|
|
61e9b7354f | ||
|
|
bc1807dbe2 | ||
|
|
29333550d2 | ||
|
|
9f09c810f5 | ||
|
|
06e5ec9e32 | ||
|
|
e80ea04c79 | ||
|
|
1b16fb594f | ||
|
|
dfcb11d7d1 | ||
|
|
36d8c1b182 | ||
|
|
2f955d5d0a | ||
|
|
53a08fd07d | ||
|
|
c5727a30cf | ||
|
|
868930e079 | ||
|
|
3006d1de5b | ||
|
|
55bcef1751 |
No files matched your search
+2
-2
@@ -24,7 +24,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.0beta1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.7
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
@@ -43,7 +43,7 @@ environment:
|
||||
services:
|
||||
# the setup scripts have to be touched, once some other db version is used
|
||||
- mysql
|
||||
- postgresql95
|
||||
- postgresql96
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
+1
-1
@@ -57,4 +57,4 @@ before_script:
|
||||
|
||||
# Run PHPs run-tests.php
|
||||
script:
|
||||
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 1 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
|
||||
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
|
||||
@@ -1,6 +1,301 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2017, PHP 7.1.3
|
||||
20 Jul 2017, PHP 7.1.8RC1
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74832 (Loading PHP extension with already registered function
|
||||
name leads to a crash). (jpauli)
|
||||
. Fixed bug #74780 (parse_url() broken when query string contains colon).
|
||||
(jhdxr)
|
||||
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
|
||||
. Fixed bug #73900 (Use After Free in unserialize() SplFixedArray). (nikic)
|
||||
. Fixed bug #74923 (Crash when crawling through network share). (Anatol)
|
||||
. Fixed bug #74913 (fixed incorrect poll.h include). (petk)
|
||||
. Fixed bug #74906 (fixed incorrect errno.h include). (petk)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74852 (property_exists returns true on unknown DateInterval
|
||||
property). (jhdxr)
|
||||
|
||||
- OCI8:
|
||||
. Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74623 (Infinite loop in type inference when using HTMLPurifier).
|
||||
(nikic)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #74798 (pkcs7_en/decrypt does not work if \x0a is used in content).
|
||||
(Anatol)
|
||||
. Added OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding and fix bug
|
||||
#71917 (openssl_open() returns junk on envelope < 16 bytes) and bug #72362
|
||||
(OpenSSL Blowfish encryption is incorrect for short keys). (Jakub Zelenka)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #69356 (PDOStatement::debugDumpParams() truncates query). (Adam
|
||||
Baratz)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #73471 (PHP freezes with AppendIterator). (jhdxr)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed bug #74883 (SQLite3::__construct() produces "out of memory" exception
|
||||
with invalid flags). (Anatol)
|
||||
|
||||
- Wddx:
|
||||
. Fixed bug #73173 (huge memleak when wddx_unserialize).
|
||||
(tloi at fortinet dot com)
|
||||
|
||||
- zlib:
|
||||
. Fixed bug #73944 (dictionary option of inflate_init() does not work).
|
||||
(wapmorgan)
|
||||
|
||||
06 Jul 2017, PHP 7.1.7
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74738 (Multiple [PATH=] and [HOST=] sections not properly
|
||||
parsed). (Manuel Mausz)
|
||||
. Fixed bug #74658 (Undefined constants in array properties result in broken
|
||||
properties). (Laruence)
|
||||
. Fixed misparsing of abstract unix domain socket names. (Sara)
|
||||
. Fixed bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
|
||||
(Stas)
|
||||
. Fixed bug #74101, bug #74614 (Unserialize Heap Use-After-Free (READ: 1) in
|
||||
zval_get_type). (Nikita)
|
||||
. Fixed bug #74111 (Heap buffer overread (READ: 1) finish_nested_data from
|
||||
unserialize). (Nikita)
|
||||
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
|
||||
php_parse_date()). (Derick)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74639 (implement clone for DatePeriod and DateInterval).
|
||||
(andrewnester)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #69373 (References to deleted XPath query results). (ttoohey)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #73473 (Stack Buffer Overflow in msgfmt_parse_message). (libnex)
|
||||
. Fixed bug #74705 (Wrong reflection on Collator::getSortKey and
|
||||
collator_get_sort_key). (Tyson Andre, Remi)
|
||||
|
||||
- Mbstring:
|
||||
. Add oniguruma upstream fix (CVE-2017-9224, CVE-2017-9226, CVE-2017-9227,
|
||||
CVE-2017-9228, CVE-2017-9229) (Remi, Mamoru TASAKA)
|
||||
|
||||
- OCI8:
|
||||
. Add TAF callback (PR #2459). (KoenigsKind)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74663 (Segfault with opcache.memory_protect and
|
||||
validate_timestamp). (Laruence)
|
||||
. Revert opcache.enable_cli to default disabled. (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #74720 (pkcs7_en/decrypt does not work if \x1a is used in
|
||||
content). (Anatol)
|
||||
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
|
||||
(Stas)
|
||||
|
||||
- PDO_OCI:
|
||||
. Support Instant Client 12.2 in --with-pdo-oci configure option.
|
||||
(Tianfang Yang)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #74673 (Segfault when cast Reflection object to string with
|
||||
undefined constant). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #74478 (null coalescing operator failing with SplFixedArray).
|
||||
(jhdxr)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #74598 (ftp:// wrapper ignores context arg). (Sara)
|
||||
|
||||
- PHAR:
|
||||
. Fixed bug #74386 (Phar::__construct reflection incorrect). (villfa)
|
||||
|
||||
- SOAP
|
||||
. Fixed bug #74679 (Incorrect conversion array with WSDL_CACHE_MEMORY).
|
||||
(Dmitry)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74556 (stream_socket_get_name() returns '\0'). (Sara)
|
||||
|
||||
8 Jun 2017, PHP 7.1.6
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i).
|
||||
(Laruence)
|
||||
. Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST).
|
||||
(Laruence)
|
||||
. Fixed bug #74589 (__DIR__ wrong for unicode character). (Anatol)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74468 (wrong reflection on Collator::sortWithSortKeys). (villfa)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74547 (mysqli::change_user() doesn't accept null as $database
|
||||
argument w/strict_types). (Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled). (Laruence)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #51918 (Phar::webPhar() does not handle requests sent through PUT
|
||||
and DELETE method). (Christian Weiske)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #74490 (readline() moves the cursor to the beginning of the line).
|
||||
(Anatol)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74510 (win32/sendmail.c anchors CC header but not BCC).
|
||||
(Damian Wadley, Anatol)
|
||||
|
||||
- xmlreader:
|
||||
. Fixed bug #74457 (Wrong reflection on XMLReader::expand). (villfa)
|
||||
|
||||
11 May 2017, PHP 7.1.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74408 (Endless loop bypassing execution time limit). (Laruence)
|
||||
. Fixed bug #74353 (Segfault when killing within bash script trap code).
|
||||
(Laruence)
|
||||
. Fixed bug #74340 (Magic function __get has different behavior in php 7.1.x).
|
||||
(Nikita)
|
||||
. Fixed bug #74188 (Null coalescing operator fails for undeclared static
|
||||
class properties). (tpunt)
|
||||
. Fixed bug #74444 (multiple catch freezes in some cases). (David Matějka)
|
||||
. Fixed bug #74410 (stream_select() is broken on Windows Nanoserver).
|
||||
(Matt Ficken)
|
||||
. Fixed bug #74337 (php-cgi.exe crash on facebook callback).
|
||||
(Anton Serbulov)
|
||||
. Patch for bug #74216 was reverted. (Anatol)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74404 (Wrong reflection on DateTimeZone::getTransitions).
|
||||
(krakjoe)
|
||||
. Fixed bug #74080 (add constant for RFC7231 format datetime). (duncan3dc)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #74416 (Wrong reflection on DOMNode::cloneNode).
|
||||
(Remi, Fabien Villepinte)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #74379 (syntax error compile error in libmagic/apprentice.c).
|
||||
(Laruence)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74343 (compile fails on solaris 11 with system gd2 library).
|
||||
(krakjoe)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74432 (mysqli_connect adding ":3306" to $host if $port parameter
|
||||
not given). (Anatol)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #74376 (Invalid free of persistent results on error/connection
|
||||
loss). (Yussuf Khalil)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #65683 (Intl does not support DateTimeImmutable). (Ben Scholzen)
|
||||
. Fixed bug #74298 (IntlDateFormatter->format() doesn't return
|
||||
microseconds/fractions). (Andrew Nester)
|
||||
. Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa)
|
||||
. Fixed bug #74439 (wrong reflection for Locale methods). (villfa)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74456 (Segmentation error while running a script in CLI mode).
|
||||
(Laruence)
|
||||
. Fixed bug #74431 (foreach infinite loop). (Nikita)
|
||||
. Fixed bug #74442 (Opcached version produces a nested array). (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #73833 (null character not allowed in openssl_pkey_get_private).
|
||||
(Jakub Zelenka)
|
||||
. Fixed bug #73711 (Segfault in openssl_pkey_new when generating DSA or DH
|
||||
key). (Jakub Zelenka)
|
||||
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
|
||||
seconds). (Moritz Fain)
|
||||
. Fixed bug #73808 (iv length warning too restrictive for aes-128-ccm).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
(mhagstrand)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #74489 (readline() immediately returns false in interactive
|
||||
console mode). (Anatol)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #72071 (setcookie allows max-age to be negative). (Craig Duncan)
|
||||
. Fixed bug #74361 (Compaction in array_rand() violates COW). (Nikita)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74429 (Remote socket URI with unique persistence identifier
|
||||
broken). (Sara)
|
||||
|
||||
13 Apr 2017, PHP 7.1.4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74149 (static embed SAPI linkage error). (krakjoe)
|
||||
. Fixed bug #73370 (falsely exits with "Out of Memory" when using
|
||||
USE_ZEND_ALLOC=0). (Nikita)
|
||||
. Fixed bug #73960 (Leak with instance method calling static method with
|
||||
referenced return). (Nikita)
|
||||
. Fixed bug #69676 (Resolution of self::FOO in class constants not correct).
|
||||
(Nikita)
|
||||
. Fixed bug #74265 (Build problems after 7.0.17 release: undefined reference
|
||||
to `isfinite'). (Nikita)
|
||||
. Fixed bug #74302 (yield fromLABEL is over-greedy). (Sara)
|
||||
|
||||
- Apache:
|
||||
. Reverted patch for bug #61471, fixes bug #74318. (Anatol)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #72096 (Swatch time value incorrect for dates before 1970). (mcq8)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #74004 (LIBXML_NOWARNING flag ingnored on loadHTML*).
|
||||
(somedaysummer)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #74230 (iconv fails to fail on surrogates). (Anatol)
|
||||
|
||||
- OCI8:
|
||||
. Fixed uninitialized data causing random crash. (Dmitry)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74250 (OPcache compilation performance regression in PHP 5.6/7
|
||||
with huge classes). (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #72333 (fwrite() on non-blocking SSL sockets doesn't work).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- PDO MySQL:
|
||||
. Fixed bug #71003 (Expose MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT to PDO
|
||||
interface). (Thomas Orozco)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #74058 (ArrayObject can not notice changes). (Andrew Nester)
|
||||
|
||||
- Sqlite:
|
||||
. Implemented FR #74217 (Allow creation of deterministic sqlite functions).
|
||||
(Andrew Nester)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74216 (Correctly fail on invalid IP address ports). (Sara)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #74240 (deflate_add can allocate too much memory). (Matt Bonneau)
|
||||
|
||||
16 Mar 2017, PHP 7.1.3
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74157 (Segfault with nested generators). (Laruence)
|
||||
@@ -44,6 +339,7 @@ PHP NEWS
|
||||
(Andrew Nester, Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74152 (if statement says true to a null variable). (Laruence)
|
||||
. Fixed bug #74019 (Segfault with list). (Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
@@ -53,6 +349,13 @@ PHP NEWS
|
||||
. Fixed bug #74159 (Writing a large buffer to a non-blocking encrypted stream
|
||||
fails with "bad write retry"). (trowski)
|
||||
|
||||
- PDO_OCI:
|
||||
. Fixed bug #54379 (PDO_OCI: UTF-8 output gets truncated). (gureedo / Oracle)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed bug #74413 (incorrect reflection for SQLite3::enableExceptions).
|
||||
(krakjoe)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74005 (mail.add_x_header causes RFC-breaking lone line feed).
|
||||
(Anatol)
|
||||
@@ -61,6 +364,8 @@ PHP NEWS
|
||||
anonymous classes). (Adam Saponara)
|
||||
. Fixed bug #74105 (PHP on Linux should use /dev/urandom when getrandom is
|
||||
not available). (Benjamin Robin)
|
||||
. Fixed bug #74708 (Invalid Reflection signatures for random_bytes and
|
||||
random_int). (Tyson Andre, Remi)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #73496 (Invalid memory access in zend_inline_hash_func).
|
||||
|
||||
+2
-3
@@ -721,7 +721,6 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
{
|
||||
shm_pair *shm = shm_get(key, NULL);
|
||||
int err;
|
||||
|
||||
if (!shm->segment) {
|
||||
return (void*)-1;
|
||||
@@ -729,8 +728,8 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
|
||||
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
|
||||
|
||||
err = GetLastError();
|
||||
if (err) {
|
||||
if (NULL == shm->addr) {
|
||||
int err = GetLastError();
|
||||
SET_ERRNO_FROM_WIN32_CODE(err);
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
+3
-3
@@ -70,7 +70,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#ifdef HAVE_DECL_ISNAN
|
||||
#if HAVE_DECL_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
@@ -79,7 +79,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DECL_ISINF
|
||||
#if HAVE_DECL_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
@@ -90,7 +90,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DECL_ISFINITE)
|
||||
#if HAVE_DECL_ISFINITE
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#define zend_finite(a) finite(a)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #69676: Resolution of self::FOO in class constants not correct (variation)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
const A = 'Foo::A';
|
||||
const B = self::A . ' and ' . self::C;
|
||||
const C = 'Foo::C';
|
||||
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
const A = 'Bar::A';
|
||||
const C = 'Bar::C';
|
||||
}
|
||||
|
||||
var_dump(Bar::B);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(17) "Foo::A and Foo::C"
|
||||
@@ -0,0 +1,69 @@
|
||||
--TEST--
|
||||
Bug #69676: Resolution of self::FOO in class constants not correct (variation)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class P {
|
||||
const N = 'P';
|
||||
}
|
||||
class A extends P {
|
||||
const selfN = self::N;
|
||||
const parentN = parent::N;
|
||||
const N = 'A';
|
||||
}
|
||||
class B extends A {
|
||||
const N = 'B';
|
||||
}
|
||||
|
||||
var_dump(B::selfN); // A
|
||||
var_dump(B::parentN); // P
|
||||
|
||||
class A2 {
|
||||
const selfN = self::N;
|
||||
const N = 'A2';
|
||||
}
|
||||
class B2 extends A2 {
|
||||
const indSelfN = self::selfN;
|
||||
const N = 'B2';
|
||||
}
|
||||
class C2 extends B2 {
|
||||
const N = 'C2';
|
||||
}
|
||||
|
||||
var_dump(C2::indSelfN); // A2
|
||||
|
||||
class A3 {
|
||||
const selfN = self::N;
|
||||
const N = 'A3';
|
||||
}
|
||||
class B3 extends A3 {
|
||||
const exprSelfN = "expr" . self::selfN;
|
||||
const N = 'B3';
|
||||
}
|
||||
class C3 extends B3 {
|
||||
const N = 'C3';
|
||||
}
|
||||
|
||||
var_dump(C3::exprSelfN); // exprA3
|
||||
|
||||
class A4 {
|
||||
const selfN = self::N;
|
||||
const N = 'A4';
|
||||
}
|
||||
class B4 extends A4 {
|
||||
const N = 'B4';
|
||||
public $prop = self::selfN;
|
||||
}
|
||||
class C4 extends B4 {
|
||||
const N = 'C4';
|
||||
}
|
||||
|
||||
var_dump((new C4)->prop); // A4
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "A"
|
||||
string(1) "P"
|
||||
string(2) "A2"
|
||||
string(6) "exprA3"
|
||||
string(2) "A4"
|
||||
@@ -53,27 +53,43 @@ string(3) "1st"
|
||||
string(3) "2nd"
|
||||
NULL
|
||||
string(3) "4th"
|
||||
array(3) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
&string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(2) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(2) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
&string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(1) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
NULL
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ Stack trace:
|
||||
#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array)
|
||||
#1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#3 %sbug72101.php(51): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#4 %sbug72101.php(72): Mock_MethodCallbackByReference_7b180d26->bar(0, 0, 0)
|
||||
#5 {main}
|
||||
thrown in %sbug72101.php on line 61
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #73900: Use After Free in unserialize() SplFixedArray
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = new stdClass;
|
||||
$b = new SplFixedArray(1);
|
||||
$b[0] = $a;
|
||||
$c = &$b[0];
|
||||
var_dump($c);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(stdClass)#1 (0) {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #73960: Leak with instance method calling static method with referenced return
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$value = 'one';
|
||||
$array = array($value);
|
||||
$array = $ref =& $array;
|
||||
var_dump($array);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(3) "one"
|
||||
}
|
||||
+20
-20
@@ -1,20 +1,20 @@
|
||||
--TEST--
|
||||
Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
||||
if (PHP_ZTS) die("skip only for no-zts build");
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip not for Windows");
|
||||
?>
|
||||
--INI--
|
||||
memory_limit=1G
|
||||
max_execution_time=1
|
||||
hard_timeout=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a1 = range(1, 1000000);
|
||||
$a2 = range(100000, 999999);
|
||||
array_intersect($a1, $a2);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Maximum execution time of 1+1 seconds exceeded %s
|
||||
--TEST--
|
||||
Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
||||
if (PHP_ZTS) die("skip only for no-zts build");
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip not for Windows");
|
||||
?>
|
||||
--INI--
|
||||
memory_limit=1G
|
||||
max_execution_time=1
|
||||
hard_timeout=1
|
||||
--FILE--
|
||||
<?php
|
||||
$a1 = range(1, 1000000);
|
||||
$a2 = range(100000, 1999999);
|
||||
array_intersect($a1, $a2);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Maximum execution time of 1+1 seconds exceeded %s
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Fixes bug 74188 (undeclared static variables emit a warning with ?? operator)
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class Test
|
||||
{
|
||||
public static function get()
|
||||
{
|
||||
static::$a ?? true;
|
||||
}
|
||||
}
|
||||
Test::get();
|
||||
?>
|
||||
--EXPECT--
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #74340: Magic function __get has different behavior in php 7.1.x
|
||||
--FILE--
|
||||
<?php
|
||||
class Test
|
||||
{
|
||||
public function __get($var)
|
||||
{
|
||||
static $first = true;
|
||||
echo '__get '.$var.PHP_EOL;
|
||||
if ($first) {
|
||||
$first = false;
|
||||
$this->$var;
|
||||
$this->{$var.'2'};
|
||||
$this->$var;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$test = new Test;
|
||||
$test->test;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
__get test
|
||||
|
||||
Notice: Undefined property: Test::$test in %s on line %d
|
||||
__get test2
|
||||
|
||||
Notice: Undefined property: Test::$test in %s on line %d
|
||||
@@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
Bug #74408 (Endless loop bypassing execution time limit)
|
||||
--INI--
|
||||
error_reporting = E_ALL | E_DEPRECATED | E_STRICT
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//php.ini: error_reporting = E_ALL | E_DEPRECATED | E_STRICT
|
||||
|
||||
class ErrorHandling {
|
||||
|
||||
public function error_handler($errno, $errstr, $errfile, $errline) {
|
||||
$bla = new NonExistingClass2();
|
||||
}
|
||||
|
||||
public function exception_handler(Error $e) {
|
||||
echo "Caught, exception: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
set_error_handler('ErrorHandling::error_handler');
|
||||
set_exception_handler('ErrorHandling::exception_handler');
|
||||
|
||||
$blubb = new NonExistingClass();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
||||
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
||||
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in Unknown on line 0
|
||||
|
||||
Fatal error: Uncaught Error: Class 'NonExistingClass2' not found in %sbug74408.php:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: ErrorHandling::error_handler(8192, 'Non-static meth...', '%s', %d, Array)
|
||||
#1 %sbug74408.php(%d): set_exception_handler('ErrorHandling::...')
|
||||
#2 {main}
|
||||
thrown in %sbug74408.php on line %d
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
|
||||
--FILE--
|
||||
<?php
|
||||
"000000"[0]::d;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Class '0' not found in %sbug74546.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74546.php on line %d
|
||||
@@ -0,0 +1 @@
|
||||
0=0&~2000000000
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 2147483647)
|
||||
die('skip for 32-bit only');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "0"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #74657 (Undefined constants in array properties result in broken properties)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface I {
|
||||
}
|
||||
|
||||
class C {
|
||||
const FOO = I::FOO;
|
||||
|
||||
public $options = [self::FOO => "bar"];
|
||||
}
|
||||
|
||||
try {
|
||||
var_dump((new C)->options);
|
||||
} catch (Throwable $e) {}
|
||||
|
||||
var_dump((new C)->options);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Undefined class constant 'I::FOO' in %sbug74657.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74657.php on line %d
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$g = (function($a) {
|
||||
try {
|
||||
return $a + 1;
|
||||
} finally {
|
||||
$b = $a + 2;
|
||||
var_dump($b);
|
||||
}
|
||||
yield; // Generator
|
||||
})(1);
|
||||
$g->next();
|
||||
var_dump($g->getReturn());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(3)
|
||||
int(2)
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Use of non-literals in declare ticks values crashes compiler
|
||||
--FILE--
|
||||
<?php
|
||||
declare(ticks = UNKNOWN_CONST) {
|
||||
echo 'Done';
|
||||
}
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: declare(ticks) value must be a literal in %sdeclare_006.php on line 2
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #74606 (Segfault within try/catch/finally nesting in Generators)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function gen() {
|
||||
$array = ["foo"];
|
||||
$array[] = "bar";
|
||||
|
||||
foreach ($array as $item) {
|
||||
try {
|
||||
try {
|
||||
yield;
|
||||
} finally {
|
||||
echo "fin $item\n";
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo "catch\n";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
gen()->throw(new Exception);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
fin foo
|
||||
catch
|
||||
fin bar
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
yield from parses too greedily
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function from1234($x) {
|
||||
return $x;
|
||||
}
|
||||
|
||||
function bar() {
|
||||
yield 24;
|
||||
}
|
||||
|
||||
function foo() {
|
||||
yield from1234(42);
|
||||
yield from(bar());
|
||||
}
|
||||
|
||||
foreach (foo() as $value) {
|
||||
var_dump($value);
|
||||
}
|
||||
--EXPECT--
|
||||
int(42)
|
||||
int(24)
|
||||
@@ -0,0 +1,77 @@
|
||||
--TEST--
|
||||
Bug #74444 (multiple catch freezes in some cases)
|
||||
--FILE--
|
||||
<?php
|
||||
function foo()
|
||||
{
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
try {
|
||||
throw new \RuntimeException();
|
||||
} catch (\FooEx | \RuntimeException $e) {
|
||||
echo 1;
|
||||
}
|
||||
echo 2;
|
||||
}
|
||||
|
||||
foo();
|
||||
|
||||
--EXPECT--
|
||||
12
|
||||
+6
-4
@@ -1088,8 +1088,6 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
|
||||
ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
{
|
||||
if (!(class_type->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
|
||||
class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
|
||||
|
||||
if (class_type->parent) {
|
||||
if (UNEXPECTED(zend_update_class_constants(class_type->parent) != SUCCESS)) {
|
||||
return FAILURE;
|
||||
@@ -1132,7 +1130,7 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
ZEND_HASH_FOREACH_PTR(&class_type->constants_table, c) {
|
||||
val = &c->value;
|
||||
if (Z_CONSTANT_P(val)) {
|
||||
if (UNEXPECTED(zval_update_constant_ex(val, class_type) != SUCCESS)) {
|
||||
if (UNEXPECTED(zval_update_constant_ex(val, c->ce) != SUCCESS)) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -1158,7 +1156,9 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
ce = ce->parent;
|
||||
}
|
||||
}
|
||||
class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2024,17 +2024,19 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
zend_string_release(lcname);
|
||||
return NULL;
|
||||
}
|
||||
zend_string_release(lcname);
|
||||
module = module_ptr;
|
||||
EG(current_module) = module;
|
||||
|
||||
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
|
||||
zend_hash_del(&module_registry, lcname);
|
||||
zend_string_release(lcname);
|
||||
EG(current_module) = NULL;
|
||||
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EG(current_module) = NULL;
|
||||
zend_string_release(lcname);
|
||||
return module;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+2
-2
@@ -2818,7 +2818,7 @@ static ZEND_COLD ZEND_NORETURN void zend_out_of_memory(void)
|
||||
ZEND_API void * __zend_malloc(size_t len)
|
||||
{
|
||||
void *tmp = malloc(len);
|
||||
if (EXPECTED(tmp)) {
|
||||
if (EXPECTED(tmp || !len)) {
|
||||
return tmp;
|
||||
}
|
||||
zend_out_of_memory();
|
||||
@@ -2834,7 +2834,7 @@ ZEND_API void * __zend_calloc(size_t nmemb, size_t len)
|
||||
ZEND_API void * __zend_realloc(void *p, size_t len)
|
||||
{
|
||||
p = realloc(p, len);
|
||||
if (EXPECTED(p)) {
|
||||
if (EXPECTED(p || !len)) {
|
||||
return p;
|
||||
}
|
||||
zend_out_of_memory();
|
||||
|
||||
+14
-3
@@ -57,17 +57,21 @@ ZEND_API zend_ast *zend_ast_create_znode(znode *node) {
|
||||
return (zend_ast *) ast;
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) {
|
||||
ZEND_API zend_ast *zend_ast_create_zval_with_lineno(zval *zv, zend_ast_attr attr, uint32_t lineno) {
|
||||
zend_ast_zval *ast;
|
||||
|
||||
ast = zend_ast_alloc(sizeof(zend_ast_zval));
|
||||
ast->kind = ZEND_AST_ZVAL;
|
||||
ast->attr = attr;
|
||||
ZVAL_COPY_VALUE(&ast->val, zv);
|
||||
ast->val.u2.lineno = CG(zend_lineno);
|
||||
ast->val.u2.lineno = lineno;
|
||||
return (zend_ast *) ast;
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) {
|
||||
return zend_ast_create_zval_with_lineno(zv, attr, CG(zend_lineno));
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_decl(
|
||||
zend_ast_kind kind, uint32_t flags, uint32_t start_lineno, zend_string *doc_comment,
|
||||
zend_string *name, zend_ast *child0, zend_ast *child1, zend_ast *child2, zend_ast *child3
|
||||
@@ -155,7 +159,14 @@ ZEND_API zend_ast *zend_ast_create_list(uint32_t init_children, zend_ast_kind ki
|
||||
uint32_t i;
|
||||
va_start(va, kind);
|
||||
for (i = 0; i < init_children; ++i) {
|
||||
ast = zend_ast_list_add(ast, va_arg(va, zend_ast *));
|
||||
zend_ast *child = va_arg(va, zend_ast *);
|
||||
ast = zend_ast_list_add(ast, child);
|
||||
if (child != NULL) {
|
||||
uint32_t lineno = zend_ast_get_lineno(child);
|
||||
if (lineno < ast->lineno) {
|
||||
ast->lineno = lineno;
|
||||
}
|
||||
}
|
||||
}
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ typedef struct _zend_ast_decl {
|
||||
typedef void (*zend_ast_process_t)(zend_ast *ast);
|
||||
extern ZEND_API zend_ast_process_t zend_ast_process;
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_zval_with_lineno(zval *zv, zend_ast_attr attr, uint32_t lineno);
|
||||
ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr);
|
||||
|
||||
ZEND_API zend_ast *zend_ast_create_ex(zend_ast_kind kind, zend_ast_attr attr, ...);
|
||||
|
||||
@@ -574,7 +574,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
{
|
||||
zval *p, *q;
|
||||
uint32_t arg_count, first_extra_arg;
|
||||
uint32_t i, n;
|
||||
uint32_t i;
|
||||
zend_execute_data *ex = EX(prev_execute_data);
|
||||
|
||||
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
|
||||
@@ -594,7 +594,6 @@ ZEND_FUNCTION(func_get_args)
|
||||
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
|
||||
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
|
||||
i = 0;
|
||||
n = 0;
|
||||
p = ZEND_CALL_ARG(ex, 1);
|
||||
if (arg_count > first_extra_arg) {
|
||||
while (i < first_extra_arg) {
|
||||
@@ -604,7 +603,8 @@ ZEND_FUNCTION(func_get_args)
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
n++;
|
||||
} else {
|
||||
q = &EG(uninitialized_zval);
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(q);
|
||||
p++;
|
||||
@@ -619,14 +619,15 @@ ZEND_FUNCTION(func_get_args)
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
n++;
|
||||
} else {
|
||||
q = &EG(uninitialized_zval);
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(q);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
} ZEND_HASH_FILL_END();
|
||||
Z_ARRVAL_P(return_value)->nNumOfElements = n;
|
||||
Z_ARRVAL_P(return_value)->nNumOfElements = arg_count;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2301,7 +2302,6 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
array_init_size(arg_array, num_args);
|
||||
if (num_args) {
|
||||
uint32_t i = 0;
|
||||
uint32_t n = 0;
|
||||
zval *p = ZEND_CALL_ARG(call, 1);
|
||||
|
||||
zend_hash_real_init(Z_ARRVAL_P(arg_array), 1);
|
||||
@@ -2324,12 +2324,9 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(arg)) {
|
||||
Z_ADDREF_P(arg);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(arg);
|
||||
} else {
|
||||
zval tmp;
|
||||
ZVAL_UNDEF(&tmp);
|
||||
ZEND_HASH_FILL_ADD(&tmp);
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -2339,9 +2336,10 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(p)) {
|
||||
Z_ADDREF_P(p);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
} else {
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
@@ -2354,14 +2352,15 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(p)) {
|
||||
Z_ADDREF_P(p);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
} else {
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
} ZEND_HASH_FILL_END();
|
||||
Z_ARRVAL_P(arg_array)->nNumOfElements = n;
|
||||
Z_ARRVAL_P(arg_array)->nNumOfElements = num_args;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+25
-6
@@ -1690,6 +1690,7 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
|
||||
{
|
||||
zval zv;
|
||||
int retval;
|
||||
uint32_t start_lineno;
|
||||
|
||||
if (CG(increment_lineno)) {
|
||||
CG(zend_lineno)++;
|
||||
@@ -1698,6 +1699,7 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
|
||||
|
||||
again:
|
||||
ZVAL_UNDEF(&zv);
|
||||
start_lineno = CG(zend_lineno);
|
||||
retval = lex_scan(&zv);
|
||||
if (EG(exception)) {
|
||||
return T_ERROR;
|
||||
@@ -1721,7 +1723,7 @@ again:
|
||||
break;
|
||||
}
|
||||
if (Z_TYPE(zv) != IS_UNDEF) {
|
||||
elem->ast = zend_ast_create_zval(&zv);
|
||||
elem->ast = zend_ast_create_zval_with_lineno(&zv, 0, start_lineno);
|
||||
}
|
||||
|
||||
return retval;
|
||||
@@ -4808,6 +4810,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
|
||||
|
||||
if (!is_last_class) {
|
||||
jmp_multicatch[j] = zend_emit_jump(0);
|
||||
opline = &CG(active_op_array)->opcodes[opnum_catch];
|
||||
opline->extended_value = get_next_op_number(CG(active_op_array));
|
||||
}
|
||||
}
|
||||
@@ -4965,8 +4968,12 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */
|
||||
zend_ast *declare_ast = declares->child[i];
|
||||
zend_ast *name_ast = declare_ast->child[0];
|
||||
zend_ast *value_ast = declare_ast->child[1];
|
||||
|
||||
zend_string *name = zend_ast_get_str(name_ast);
|
||||
|
||||
if (value_ast->kind != ZEND_AST_ZVAL) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "declare(%s) value must be a literal", ZSTR_VAL(name));
|
||||
}
|
||||
|
||||
if (zend_string_equals_literal_ci(name, "ticks")) {
|
||||
zval value_zv;
|
||||
zend_const_expr_to_zval(&value_zv, value_ast);
|
||||
@@ -6448,7 +6455,11 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
|
||||
{
|
||||
zend_string *filename = CG(compiled_filename);
|
||||
zend_string *dirname = zend_string_init(ZSTR_VAL(filename), ZSTR_LEN(filename), 0);
|
||||
#ifdef ZEND_WIN32
|
||||
php_win32_ioutil_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname));
|
||||
#else
|
||||
zend_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname));
|
||||
#endif
|
||||
|
||||
if (strcmp(ZSTR_VAL(dirname), ".") == 0) {
|
||||
dirname = zend_string_extend(dirname, MAXPATHLEN, 0);
|
||||
@@ -7363,8 +7374,11 @@ void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */
|
||||
return;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&const_ast);
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
const_ast = ast->child[1];
|
||||
|
||||
if (class_ast->kind == ZEND_AST_ZVAL) {
|
||||
zend_string *resolved_name;
|
||||
@@ -8004,6 +8018,8 @@ void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */
|
||||
|
||||
void zend_compile_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
|
||||
{
|
||||
CG(zend_lineno) = zend_ast_get_lineno(ast);
|
||||
|
||||
switch (ast->kind) {
|
||||
case ZEND_AST_VAR:
|
||||
zend_compile_simple_var(result, ast, type, 0);
|
||||
@@ -8300,8 +8316,11 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
|
||||
break;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&name_ast);
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
name_ast = ast->child[1];
|
||||
|
||||
if (name_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "class")) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
|
||||
@@ -327,6 +327,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
|
||||
size_t const_name_len = name_len - class_name_len - 2;
|
||||
zend_string *constant_name = zend_string_init(colon + 1, const_name_len, 0);
|
||||
zend_string *class_name = zend_string_init(name, class_name_len, 0);
|
||||
zend_class_constant *c = NULL;
|
||||
zval *ret_constant = NULL;
|
||||
|
||||
if (zend_string_equals_literal_ci(class_name, "self")) {
|
||||
@@ -355,7 +356,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
|
||||
ce = zend_fetch_class(class_name, flags);
|
||||
}
|
||||
if (ce) {
|
||||
zend_class_constant *c = zend_hash_find_ptr(&ce->constants_table, constant_name);
|
||||
c = zend_hash_find_ptr(&ce->constants_table, constant_name);
|
||||
if (c == NULL) {
|
||||
if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
|
||||
zend_throw_error(NULL, "Undefined class constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
|
||||
@@ -380,7 +381,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
|
||||
}
|
||||
MARK_CONSTANT_VISITED(ret_constant);
|
||||
}
|
||||
if (UNEXPECTED(zval_update_constant_ex(ret_constant, ce) != SUCCESS)) {
|
||||
if (UNEXPECTED(zval_update_constant_ex(ret_constant, c->ce) != SUCCESS)) {
|
||||
RESET_CONSTANT_VISITED(ret_constant);
|
||||
ret_constant = NULL;
|
||||
goto failure;
|
||||
|
||||
+3
-10
@@ -1720,16 +1720,9 @@ fetch_from_array:
|
||||
zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ZSTR_VAL(ce->name));
|
||||
} else if (EXPECTED(retval && Z_TYPE_P(retval) != IS_UNDEF)) {
|
||||
if (!Z_ISREF_P(retval)) {
|
||||
if (Z_REFCOUNTED_P(retval) &&
|
||||
Z_REFCOUNT_P(retval) > 1) {
|
||||
if (Z_TYPE_P(retval) != IS_OBJECT) {
|
||||
Z_DELREF_P(retval);
|
||||
ZVAL_DUP(result, retval);
|
||||
retval = result;
|
||||
} else {
|
||||
ZVAL_COPY_VALUE(result, retval);
|
||||
retval = result;
|
||||
}
|
||||
if (result != retval) {
|
||||
ZVAL_COPY(result, retval);
|
||||
retval = result;
|
||||
}
|
||||
if (Z_TYPE_P(retval) != IS_OBJECT) {
|
||||
zend_class_entry *ce = Z_OBJCE_P(container);
|
||||
|
||||
@@ -81,6 +81,10 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
|
||||
return variable_ptr;
|
||||
}
|
||||
if (ZEND_CONST_COND(value_type & (IS_VAR|IS_CV), 1) && variable_ptr == value) {
|
||||
if (value_type == IS_VAR && ref) {
|
||||
ZEND_ASSERT(GC_REFCOUNT(ref) > 1);
|
||||
--GC_REFCOUNT(ref);
|
||||
}
|
||||
return variable_ptr;
|
||||
}
|
||||
garbage = Z_COUNTED_P(variable_ptr);
|
||||
|
||||
@@ -748,6 +748,15 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
||||
}
|
||||
zend_error(E_DEPRECATED, "%s", error);
|
||||
efree(error);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (callable_name) {
|
||||
zend_string_release(callable_name);
|
||||
}
|
||||
if (EG(current_execute_data) == &dummy_execute_data) {
|
||||
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
zend_string_release(callable_name);
|
||||
}
|
||||
|
||||
+6
-3
@@ -325,9 +325,12 @@ static zend_always_inline gc_root_buffer* gc_find_additional_buffer(zend_refcoun
|
||||
|
||||
/* We have to check each additional_buffer to find which one holds the ref */
|
||||
while (additional_buffer) {
|
||||
gc_root_buffer *root = additional_buffer->buf + (GC_ADDRESS(GC_INFO(ref)) - GC_ROOT_BUFFER_MAX_ENTRIES);
|
||||
if (root->ref == ref) {
|
||||
return root;
|
||||
uint32_t idx = GC_ADDRESS(GC_INFO(ref)) - GC_ROOT_BUFFER_MAX_ENTRIES;
|
||||
if (idx < additional_buffer->used) {
|
||||
gc_root_buffer *root = additional_buffer->buf + idx;
|
||||
if (root->ref == ref) {
|
||||
return root;
|
||||
}
|
||||
}
|
||||
additional_buffer = additional_buffer->next;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ static void zend_generator_cleanup_unfinished_execution(
|
||||
if (UNEXPECTED(generator->frozen_call_stack)) {
|
||||
zend_generator_restore_call_stack(generator);
|
||||
}
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, 0);
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -279,7 +279,6 @@ static uint32_t zend_array_recalc_elements(HashTable *ht)
|
||||
uint32_t num = ht->nNumOfElements;
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(ht, val) {
|
||||
if (Z_TYPE_P(val) == IS_UNDEF) continue;
|
||||
if (Z_TYPE_P(val) == IS_INDIRECT) {
|
||||
if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) {
|
||||
num--;
|
||||
|
||||
@@ -55,7 +55,7 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
int i_result;
|
||||
int i_op1, i_op2;
|
||||
int str_len;
|
||||
char str_result[MAX_LENGTH_OF_LONG];
|
||||
char str_result[MAX_LENGTH_OF_LONG+1];
|
||||
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
zend_string_free(Z_STR_P(op1));
|
||||
|
||||
+5260
-5072
File diff suppressed because it is too large.
Load diff
@@ -1142,7 +1142,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
RETURN_TOKEN(T_RETURN);
|
||||
}
|
||||
|
||||
<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from" {
|
||||
<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from"[^a-zA-Z0-9_\x80-\xff] {
|
||||
yyless(yyleng - 1);
|
||||
HANDLE_NEWLINES(yytext, yyleng);
|
||||
RETURN_TOKEN(T_YIELD_FROM);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 */
|
||||
/* Generated by re2c 0.16 */
|
||||
#line 3 "Zend/zend_language_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
||||
@@ -122,11 +122,13 @@ struct _zend_module_dep {
|
||||
unsigned char type; /* dependency type */
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API HashTable module_registry;
|
||||
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_request_startup(zend_module_entry *module);
|
||||
int module_registry_unload_temp(const zend_module_entry *module);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe
|
||||
ALLOC_HASHTABLE(guards);
|
||||
zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
|
||||
/* mark pointer as "special" using low bit */
|
||||
zend_hash_add_new_ptr(guards, member,
|
||||
zend_hash_add_new_ptr(guards, str,
|
||||
(void*)(((zend_uintptr_t)&zv->u2.property_guard) | 1));
|
||||
zend_string_release(Z_STR_P(zv));
|
||||
ZVAL_ARR(zv, guards);
|
||||
|
||||
@@ -155,12 +155,12 @@ struct _zend_object_handlers {
|
||||
zend_object_compare_zvals_t compare;
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API zend_object_handlers std_object_handlers;
|
||||
|
||||
#define zend_get_function_root_class(fbc) \
|
||||
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
|
||||
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
|
||||
ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
|
||||
|
||||
+15
-3
@@ -86,12 +86,17 @@ void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context)
|
||||
{
|
||||
int errno_save = errno;
|
||||
zend_signal_queue_t *queue, *qtmp;
|
||||
zend_bool is_handling_safe = 1;
|
||||
|
||||
#ifdef ZTS
|
||||
ZEND_TSRMLS_CACHE_UPDATE();
|
||||
/* A signal could hit after TSRM shutdown, in this case globals are already freed. */
|
||||
if (NULL == TSRMLS_CACHE || NULL == TSRMG_BULK_STATIC(zend_signal_globals_id, zend_signal_globals_t *)) {
|
||||
is_handling_safe = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (EXPECTED(SIGG(active))) {
|
||||
if (EXPECTED(is_handling_safe && SIGG(active))) {
|
||||
if (UNEXPECTED(SIGG(depth) == 0)) { /* try to handle signal */
|
||||
if (UNEXPECTED(SIGG(blocked))) {
|
||||
SIGG(blocked) = 0;
|
||||
@@ -174,7 +179,14 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context)
|
||||
int errno_save = errno;
|
||||
struct sigaction sa;
|
||||
sigset_t sigset;
|
||||
zend_signal_entry_t p_sig = SIGG(handlers)[signo-1];
|
||||
zend_signal_entry_t p_sig;
|
||||
#ifdef ZTS
|
||||
if (NULL == TSRMLS_CACHE || NULL == TSRMG_BULK_STATIC(zend_signal_globals_id, zend_signal_globals_t *)) {
|
||||
p_sig.flags = 0;
|
||||
p_sig.handler = SIG_DFL;
|
||||
} else
|
||||
#endif
|
||||
p_sig = SIGG(handlers)[signo-1];
|
||||
|
||||
if (p_sig.handler == SIG_DFL) { /* raise default handler */
|
||||
if (sigaction(signo, NULL, &sa) == 0) {
|
||||
@@ -198,7 +210,7 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (p_sig.handler != SIG_IGN) {
|
||||
if (p_sig.flags & SA_SIGINFO) {
|
||||
if (p_sig.flags & SA_RESETHAND) {
|
||||
SIGG(handlers)[signo-1].flags = 0;
|
||||
|
||||
@@ -88,7 +88,9 @@ END_EXTERN_C()
|
||||
ZEND_API void zend_signal_handler_unblock(void);
|
||||
void zend_signal_activate(void);
|
||||
void zend_signal_deactivate(void);
|
||||
BEGIN_EXTERN_C()
|
||||
void zend_signal_startup(void);
|
||||
END_EXTERN_C()
|
||||
void zend_signal_init(void);
|
||||
|
||||
ZEND_API int zend_signal(int signo, void (*handler)(int));
|
||||
|
||||
@@ -380,7 +380,7 @@ CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat) /* {{
|
||||
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
size_t len = strlen(path);
|
||||
|
||||
if (path[len-4] == '.') {
|
||||
if (len >= 4 && path[len-4] == '.') {
|
||||
if (_memicmp(path+len-3, "exe", 3) == 0 ||
|
||||
_memicmp(path+len-3, "com", 3) == 0 ||
|
||||
_memicmp(path+len-3, "bat", 3) == 0 ||
|
||||
|
||||
+26
-15
@@ -1692,9 +1692,13 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR,
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_VM_C_GOTO(fetch_static_prop_return);
|
||||
@@ -1729,24 +1733,31 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR,
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_VM_C_GOTO(fetch_static_prop_return);
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (OP1_TYPE != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (OP1_TYPE != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (OP1_TYPE == IS_CONST && retval) {
|
||||
} else if (OP1_TYPE == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -5191,7 +5202,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO
|
||||
}
|
||||
value = &c->value;
|
||||
if (Z_CONSTANT_P(value)) {
|
||||
zval_update_constant_ex(value, ce);
|
||||
zval_update_constant_ex(value, c->ce);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
+216
-117
@@ -4869,9 +4869,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -4906,24 +4910,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else if (IS_CONST == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -5797,7 +5808,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS
|
||||
}
|
||||
value = &c->value;
|
||||
if (Z_CONSTANT_P(value)) {
|
||||
zval_update_constant_ex(value, ce);
|
||||
zval_update_constant_ex(value, c->ce);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
@@ -6722,9 +6733,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -6759,24 +6774,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else if (IS_CONST == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -7294,9 +7316,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -7331,24 +7357,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else if (IS_CONST == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -19985,7 +20018,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_
|
||||
}
|
||||
value = &c->value;
|
||||
if (Z_CONSTANT_P(value)) {
|
||||
zval_update_constant_ex(value, ce);
|
||||
zval_update_constant_ex(value, c->ce);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
@@ -29790,7 +29823,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS
|
||||
}
|
||||
value = &c->value;
|
||||
if (Z_CONSTANT_P(value)) {
|
||||
zval_update_constant_ex(value, ce);
|
||||
zval_update_constant_ex(value, c->ce);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
@@ -37942,9 +37975,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -37979,24 +38016,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else if (IS_CV == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -41005,9 +41049,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -41042,24 +41090,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else if (IS_CV == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -42053,9 +42108,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -42090,24 +42149,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else if (IS_CV == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -52412,9 +52478,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -52449,24 +52519,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
} else if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -53361,9 +53438,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -53398,24 +53479,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
} else if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -53849,9 +53937,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -53886,24 +53978,31 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
} else if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2687,7 +2687,7 @@ EOF
|
||||
done
|
||||
|
||||
echo "'[$]0' \\" >> $1
|
||||
if test `expr -- [$]0 : "'.*"` = 0; then
|
||||
if test `expr " [$]0" : " '.*"` = 0; then
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
|
||||
else
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
|
||||
|
||||
+4
-1
@@ -29,5 +29,8 @@ if not exist "%SDK_RUNNER%" (
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
|
||||
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
||||
+13
-7
@@ -12,26 +12,32 @@ if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
|
||||
set STABILITY=stable
|
||||
) else (
|
||||
set BRANCH=master
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%BRANCH%
|
||||
set STABILITY=staging
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
rem SDK is cached, deps info is cached as well
|
||||
echo Updating dependencies in %DEPS_DIR%
|
||||
call phpsdk_deps --update --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
call buildconf.bat --force
|
||||
rem Something went wrong, most likely when concurrent builds were to fetch deps
|
||||
rem updates. It might be, that some locking mechanism is needed.
|
||||
if not exist "%DEPS_DIR%" (
|
||||
cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
)
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
cmd /c buildconf.bat --force
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
if "%THREAD_SAFE%" equ "0" set ADD_CONF=--disable-zts
|
||||
|
||||
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_odbc,odbc,pdo_firebird,interbase,ldap,imap,dba
|
||||
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_odbc,odbc,pdo_firebird,interbase,ldap,imap,dba,ftp
|
||||
if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache
|
||||
|
||||
call configure.bat ^
|
||||
cmd /c configure.bat ^
|
||||
--enable-snapshot-build ^
|
||||
--disable-debug-pack ^
|
||||
--with-mcrypt=shared ^
|
||||
|
||||
+4
-1
@@ -6,5 +6,8 @@ if not exist "%SDK_RUNNER%" (
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
|
||||
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
||||
+15
-1
@@ -11,7 +11,11 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set BRANCH=master
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%BRANCH%
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
if not exist "%DEPS_DIR%" (
|
||||
echo "%DEPS_DIR%" doesn't exist
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
rem setup MySQL related exts
|
||||
set MYSQL_PWD=Password12!
|
||||
@@ -25,6 +29,7 @@ set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
|
||||
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
|
||||
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST% port=%PDO_MYSQL_TEST_PORT% dbname=test user=%PDO_MYSQL_TEST_USER% password=%MYSQL_PW%
|
||||
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem setup PostgreSQL related exts
|
||||
set PGUSER=postgres
|
||||
@@ -33,12 +38,15 @@ rem set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=postgres pa
|
||||
echo ^<?php $conn_str = "host=127.0.0.1 dbname=test port=5432 user=%PGUSER% password=%PGPASSWORD%"; ?^> >> "./ext/pgsql/tests/config.inc"
|
||||
set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=%PGUSER% password=%PGPASSWORD%
|
||||
"C:\Program Files\PostgreSQL\9.5\bin\createdb.exe" test
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem prepare for ext/openssl
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win64 >NUL 2>NUL
|
||||
mkdir c:\usr\local\ssl
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\template\ssl\openssl.cnf c:\usr\local\ssl
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
set OPENSSL_CONF=c:\usr\local\ssl\openssl.cnf
|
||||
rem set OPENSSL_CONF=
|
||||
rem set SSLEAY_CONF=
|
||||
@@ -48,9 +56,13 @@ if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enabled=1 -d opcache.enable_c
|
||||
|
||||
rem prepare for enchant
|
||||
mkdir c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\bin\libenchant_ispell.dll c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\bin\libenchant_myspell.dll c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
reg add HKEY_CURRENT_USER\SOFTWARE\Enchant\Config /v Module_Dir /t REG_SZ /d c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
set PHP_BUILD_CACHE_ENCHANT_DICT_DIR=%PHP_BUILD_CACHE_BASE_DIR%\enchant_dict
|
||||
if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%" (
|
||||
echo Creating %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
|
||||
@@ -73,3 +85,5 @@ mkdir c:\tests_tmp
|
||||
cd "%APPVEYOR_BUILD_FOLDER%"
|
||||
nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --set-timeout 120 -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP --temp-source c:\tests_tmp --temp-target c:\tests_tmp"
|
||||
|
||||
exit /b %errorlevel%
|
||||
|
||||
+6
-5
@@ -75,7 +75,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#ifdef HAVE_DECL_ISNAN
|
||||
#if HAVE_DECL_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
@@ -84,7 +84,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DECL_ISINF
|
||||
#if HAVE_DECL_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
@@ -95,7 +95,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DECL_ISFINITE)
|
||||
#if HAVE_DECL_ISFINITE
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#define zend_finite(a) finite(a)
|
||||
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=1
|
||||
PHP_RELEASE_VERSION=3
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=8
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
@@ -494,6 +494,7 @@ limits.h \
|
||||
locale.h \
|
||||
monetary.h \
|
||||
netdb.h \
|
||||
poll.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
signal.h \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if PHP_WIN32
|
||||
#ifdef PHP_WIN32
|
||||
#include "../../../../main/config.w32.h"
|
||||
#else
|
||||
#include <php_config.h>
|
||||
|
||||
@@ -40,7 +40,7 @@ SPNEGO => Yes
|
||||
SSL => Yes
|
||||
SSPI => Yes
|
||||
TLS-SRP => No
|
||||
HTTP2 => No
|
||||
HTTP2 => Yes
|
||||
GSSAPI => No
|
||||
KERBEROS5 => Yes
|
||||
UNIX_SOCKETS => No
|
||||
|
||||
+6181
-7085
File diff suppressed because it is too large.
Load diff
@@ -913,7 +913,7 @@ datefull = day ([ \t.-])* monthtext ([ \t.-])* year;
|
||||
datenoday = monthtext ([ .\t-])* year4;
|
||||
datenodayrev = year4 ([ .\t-])* monthtext;
|
||||
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]+ year;
|
||||
datenoyear = monthtext ([ .\t-])* day [,.stndrh\t ]*;
|
||||
datenoyear = monthtext ([ .\t-])* day ([,.stndrh\t ]+|[\000]);
|
||||
datenoyearrev = day ([ .\t-])* monthtext;
|
||||
datenocolon = year4 monthlz daylz;
|
||||
|
||||
|
||||
+3673
-3600
File diff suppressed because it is too large.
Load diff
+44
-17
@@ -345,7 +345,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_transitions_get, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, timestamp_end)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_timezone_method_transitions_get, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_method_transitions_get, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, timestamp_begin)
|
||||
ZEND_ARG_INFO(0, timestamp_end)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -775,6 +775,11 @@ PHP_RSHUTDOWN_FUNCTION(date)
|
||||
*/
|
||||
#define DATE_FORMAT_RFC1123 "D, d M Y H:i:s O"
|
||||
|
||||
/*
|
||||
* RFC7231, Section 7.1.1: http://tools.ietf.org/html/rfc7231
|
||||
*/
|
||||
#define DATE_FORMAT_RFC7231 "D, d M Y H:i:s \\G\\M\\T"
|
||||
|
||||
/*
|
||||
* RFC2822, Section 3.3: http://www.ietf.org/rfc/rfc2822.txt
|
||||
* FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
|
||||
@@ -868,6 +873,7 @@ PHP_MINIT_FUNCTION(date)
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC850", DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC1036", DATE_FORMAT_RFC1036, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC1123", DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC7231", DATE_FORMAT_RFC7231, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC2822", DATE_FORMAT_RFC2822, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC3339", DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC3339_EXTENDED", DATE_FORMAT_RFC3339_EXTENDED, CONST_CS | CONST_PERSISTENT);
|
||||
@@ -1153,11 +1159,12 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
|
||||
case 'a': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break;
|
||||
case 'A': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "PM" : "AM"); break;
|
||||
case 'B': {
|
||||
int retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
while (retval < 0) {
|
||||
retval += 1000;
|
||||
int retval = ((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10);
|
||||
if (retval < 0) {
|
||||
retval += 864000;
|
||||
}
|
||||
retval = retval % 1000;
|
||||
/* Make sure to do this on a positive int to avoid rounding errors */
|
||||
retval = (retval / 864) % 1000;
|
||||
length = slprintf(buffer, 32, "%03d", retval);
|
||||
break;
|
||||
}
|
||||
@@ -1348,11 +1355,12 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
|
||||
|
||||
/* Swatch Beat a.k.a. Internet Time */
|
||||
case 'B':
|
||||
retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
while (retval < 0) {
|
||||
retval += 1000;
|
||||
retval = ((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10);
|
||||
if (retval < 0) {
|
||||
retval += 864000;
|
||||
}
|
||||
retval = retval % 1000;
|
||||
/* Make sure to do this on a positive int to avoid rounding errors */
|
||||
retval = (retval / 864) % 1000;
|
||||
break;
|
||||
|
||||
/* time */
|
||||
@@ -1990,7 +1998,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
zval *prop;
|
||||
int retval = 0;
|
||||
|
||||
if (Z_TYPE_P(member) != IS_STRING) {
|
||||
if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
|
||||
ZVAL_COPY(&tmp_member, member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
@@ -2006,10 +2014,10 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
prop = date_interval_read_property(object, member, type, cache_slot, &rv);
|
||||
|
||||
if (prop != NULL) {
|
||||
|
||||
prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
|
||||
|
||||
if (prop != &EG(uninitialized_zval)) {
|
||||
if (type == 2) {
|
||||
retval = 1;
|
||||
} else if (type == 1) {
|
||||
@@ -2060,6 +2068,7 @@ static void date_register_classes(void) /* {{{ */
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC850", DATE_FORMAT_RFC850);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC1036", DATE_FORMAT_RFC1036);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC1123", DATE_FORMAT_RFC1123);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC7231", DATE_FORMAT_RFC7231);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC2822", DATE_FORMAT_RFC2822);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC3339", DATE_FORMAT_RFC3339);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC3339_EXTENDED", DATE_FORMAT_RFC3339_EXTENDED);
|
||||
@@ -2388,8 +2397,11 @@ static zend_object *date_object_clone_interval(zval *this_ptr) /* {{{ */
|
||||
php_interval_obj *new_obj = php_interval_obj_from_obj(date_object_new_interval_ex(old_obj->std.ce, 0));
|
||||
|
||||
zend_objects_clone_members(&new_obj->std, &old_obj->std);
|
||||
new_obj->initialized = old_obj->initialized;
|
||||
if (old_obj->diff) {
|
||||
new_obj->diff = timelib_rel_time_clone(old_obj->diff);
|
||||
}
|
||||
|
||||
/** FIX ME ADD CLONE STUFF **/
|
||||
return &new_obj->std;
|
||||
} /* }}} */
|
||||
|
||||
@@ -2472,8 +2484,23 @@ static zend_object *date_object_clone_period(zval *this_ptr) /* {{{ */
|
||||
php_period_obj *new_obj = php_period_obj_from_obj(date_object_new_period_ex(old_obj->std.ce, 0));
|
||||
|
||||
zend_objects_clone_members(&new_obj->std, &old_obj->std);
|
||||
new_obj->initialized = old_obj->initialized;
|
||||
new_obj->recurrences = old_obj->recurrences;
|
||||
new_obj->include_start_date = old_obj->include_start_date;
|
||||
new_obj->start_ce = old_obj->start_ce;
|
||||
|
||||
/** FIX ME ADD CLONE STUFF **/
|
||||
if (old_obj->start) {
|
||||
new_obj->start = timelib_time_clone(old_obj->start);
|
||||
}
|
||||
if (old_obj->current) {
|
||||
new_obj->current = timelib_time_clone(old_obj->current);
|
||||
}
|
||||
if (old_obj->end) {
|
||||
new_obj->end = timelib_time_clone(old_obj->end);
|
||||
}
|
||||
if (old_obj->interval) {
|
||||
new_obj->interval = timelib_rel_time_clone(old_obj->interval);
|
||||
}
|
||||
return &new_obj->std;
|
||||
} /* }}} */
|
||||
|
||||
@@ -2546,7 +2573,7 @@ static void update_errors_warnings(timelib_error_container *last_errors) /* {{{
|
||||
|
||||
static void php_date_set_time_fraction(timelib_time *time, int microseconds)
|
||||
{
|
||||
time->f = microseconds / 1000000;
|
||||
time->f = (double) microseconds / 1000000;
|
||||
}
|
||||
|
||||
static void php_date_get_current_time_with_fraction(time_t *sec, suseconds_t *usec)
|
||||
|
||||
@@ -156,7 +156,7 @@ array(18) {
|
||||
}
|
||||
}
|
||||
..and get names of all its class constants
|
||||
array(12) {
|
||||
array(13) {
|
||||
["ATOM"]=>
|
||||
string(13) "Y-m-d\TH:i:sP"
|
||||
["COOKIE"]=>
|
||||
@@ -171,6 +171,8 @@ array(12) {
|
||||
string(16) "D, d M y H:i:s O"
|
||||
["RFC1123"]=>
|
||||
string(16) "D, d M Y H:i:s O"
|
||||
["RFC7231"]=>
|
||||
string(21) "D, d M Y H:i:s \G\M\T"
|
||||
["RFC2822"]=>
|
||||
string(16) "D, d M Y H:i:s O"
|
||||
["RFC3339"]=>
|
||||
|
||||
@@ -43,20 +43,20 @@ foreach ($tests as $test) {
|
||||
print "wanted = Monday 00:00:00\n\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Europe/Andorra
|
||||
ts = Monday 2037-10-19 17:17:17 CEST
|
||||
result = Monday 2037-10-26 00:00:00 CET
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Asia/Dubai
|
||||
ts = Thursday 1970-01-01 17:17:17 GST
|
||||
result = Monday 1970-01-05 00:00:00 GST
|
||||
ts = Thursday 1970-01-01 17:17:17 %s
|
||||
result = Monday 1970-01-05 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Asia/Kabul
|
||||
ts = Thursday 1970-01-01 17:17:17 AFT
|
||||
result = Monday 1970-01-05 00:00:00 AFT
|
||||
ts = Thursday 1970-01-01 17:17:17 %s
|
||||
result = Monday 1970-01-05 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Antigua
|
||||
@@ -130,8 +130,8 @@ result = Monday 1971-01-04 00:00:00 AST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Asia/Dacca
|
||||
ts = Friday 1971-01-01 17:17:17 DACT
|
||||
result = Monday 1971-01-04 00:00:00 DACT
|
||||
ts = Friday 1971-01-01 17:17:17 %s
|
||||
result = Monday 1971-01-04 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Europe/Brussels
|
||||
@@ -150,13 +150,13 @@ result = Monday 1983-04-18 01:00:00 CEST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Buenos_Aires
|
||||
ts = Monday 1974-09-30 17:17:17 ART
|
||||
result = Monday 1974-10-07 00:00:00 ART
|
||||
ts = Monday 1974-09-30 17:17:17 %s
|
||||
result = Monday 1974-10-07 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Rosario
|
||||
ts = Monday 1974-09-30 17:17:17 ART
|
||||
result = Monday 1974-10-07 00:00:00 ART
|
||||
ts = Monday 1974-09-30 17:17:17 %s
|
||||
result = Monday 1974-10-07 00:00:00 %s
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Europe/Vienna
|
||||
|
||||
@@ -41,7 +41,7 @@ foreach ($timezones as $timezone) {
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
America/Chicago
|
||||
1076824799 [2004-02-14 23:59:59 CST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076824800 [2004-02-15 00:00:00 CST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
@@ -88,31 +88,31 @@ Asia/Jerusalem
|
||||
1083099600 [2004-04-28 00:00:00 IDT] [2004-04-07 00:00:00 +21 days]
|
||||
|
||||
Asia/Singapore
|
||||
1076774399 [2004-02-14 23:59:59 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076774400 [2004-02-15 00:00:00 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076774401 [2004-02-15 00:00:01 SGT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079452800 [2004-03-17 00:00:00 SGT] [2004-04-07 00:00:00 -21 days]
|
||||
1080316800 [2004-03-27 00:00:00 SGT] [2004-04-07 00:00:00 11 days ago]
|
||||
1080410400 [2004-03-28 02:00:00 SGT] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081180800 [2004-04-06 00:00:00 SGT] [2004-04-07 00:00:00 -1 day]
|
||||
1081267200 [2004-04-07 00:00:00 SGT] [2004-04-07 00:00:00]
|
||||
1081270800 [2004-04-07 01:00:00 SGT] [2004-04-07 00:00:00 +1 hour]
|
||||
1081274400 [2004-04-07 02:00:00 SGT] [2004-04-07 00:00:00 +2 hour]
|
||||
1081353600 [2004-04-08 00:00:00 SGT] [2004-04-07 00:00:00 +1 day]
|
||||
1081353600 [2004-04-08 00:00:00 SGT] [2004-04-07 00:00:00 1 day]
|
||||
1083081600 [2004-04-28 00:00:00 SGT] [2004-04-07 00:00:00 +21 days]
|
||||
1076774399 [2004-02-14 23:59:59 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076774400 [2004-02-15 00:00:00 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076774401 [2004-02-15 00:00:01 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079452800 [2004-03-17 00:00:00 %s] [2004-04-07 00:00:00 -21 days]
|
||||
1080316800 [2004-03-27 00:00:00 %s] [2004-04-07 00:00:00 11 days ago]
|
||||
1080410400 [2004-03-28 02:00:00 %s] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081180800 [2004-04-06 00:00:00 %s] [2004-04-07 00:00:00 -1 day]
|
||||
1081267200 [2004-04-07 00:00:00 %s] [2004-04-07 00:00:00]
|
||||
1081270800 [2004-04-07 01:00:00 %s] [2004-04-07 00:00:00 +1 hour]
|
||||
1081274400 [2004-04-07 02:00:00 %s] [2004-04-07 00:00:00 +2 hour]
|
||||
1081353600 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 +1 day]
|
||||
1081353600 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 1 day]
|
||||
1083081600 [2004-04-28 00:00:00 %s] [2004-04-07 00:00:00 +21 days]
|
||||
|
||||
America/Sao_Paulo
|
||||
1076810399 [2004-02-14 23:59:59 BRST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076814000 [2004-02-15 00:00:00 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076814001 [2004-02-15 00:00:01 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079492400 [2004-03-17 00:00:00 BRT] [2004-04-07 00:00:00 -21 days]
|
||||
1080356400 [2004-03-27 00:00:00 BRT] [2004-04-07 00:00:00 11 days ago]
|
||||
1080450000 [2004-03-28 02:00:00 BRT] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081220400 [2004-04-06 00:00:00 BRT] [2004-04-07 00:00:00 -1 day]
|
||||
1081306800 [2004-04-07 00:00:00 BRT] [2004-04-07 00:00:00]
|
||||
1081310400 [2004-04-07 01:00:00 BRT] [2004-04-07 00:00:00 +1 hour]
|
||||
1081314000 [2004-04-07 02:00:00 BRT] [2004-04-07 00:00:00 +2 hour]
|
||||
1081393200 [2004-04-08 00:00:00 BRT] [2004-04-07 00:00:00 +1 day]
|
||||
1081393200 [2004-04-08 00:00:00 BRT] [2004-04-07 00:00:00 1 day]
|
||||
1083121200 [2004-04-28 00:00:00 BRT] [2004-04-07 00:00:00 +21 days]
|
||||
1076810399 [2004-02-14 23:59:59 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds]
|
||||
1076814000 [2004-02-15 00:00:00 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds]
|
||||
1076814001 [2004-02-15 00:00:01 %s] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds]
|
||||
1079492400 [2004-03-17 00:00:00 %s] [2004-04-07 00:00:00 -21 days]
|
||||
1080356400 [2004-03-27 00:00:00 %s] [2004-04-07 00:00:00 11 days ago]
|
||||
1080450000 [2004-03-28 02:00:00 %s] [2004-04-07 00:00:00 -10 day +2 hours]
|
||||
1081220400 [2004-04-06 00:00:00 %s] [2004-04-07 00:00:00 -1 day]
|
||||
1081306800 [2004-04-07 00:00:00 %s] [2004-04-07 00:00:00]
|
||||
1081310400 [2004-04-07 01:00:00 %s] [2004-04-07 00:00:00 +1 hour]
|
||||
1081314000 [2004-04-07 02:00:00 %s] [2004-04-07 00:00:00 +2 hour]
|
||||
1081393200 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 +1 day]
|
||||
1081393200 [2004-04-08 00:00:00 %s] [2004-04-07 00:00:00 1 day]
|
||||
1083121200 [2004-04-28 00:00:00 %s] [2004-04-07 00:00:00 +21 days]
|
||||
@@ -34,18 +34,18 @@ echo date("Y-m-d H:i:s T\n", $l);
|
||||
1099364400
|
||||
1099364400
|
||||
1099447200
|
||||
2004-11-01 00:00:00 BRT
|
||||
2004-11-02 01:00:00 BRST
|
||||
2004-11-02 01:00:00 BRST
|
||||
2004-11-02 01:00:00 BRST
|
||||
2004-11-03 00:00:00 BRST
|
||||
2004-11-01 00:00:00 -03
|
||||
2004-11-02 01:00:00 -02
|
||||
2004-11-02 01:00:00 -02
|
||||
2004-11-02 01:00:00 -02
|
||||
2004-11-03 00:00:00 -02
|
||||
1108778400
|
||||
1108868400
|
||||
1108868400
|
||||
1108868400
|
||||
1108954800
|
||||
2005-02-19 00:00:00 BRST
|
||||
2005-02-20 00:00:00 BRT
|
||||
2005-02-20 00:00:00 BRT
|
||||
2005-02-20 00:00:00 BRT
|
||||
2005-02-21 00:00:00 BRT
|
||||
2005-02-19 00:00:00 -02
|
||||
2005-02-20 00:00:00 -03
|
||||
2005-02-20 00:00:00 -03
|
||||
2005-02-20 00:00:00 -03
|
||||
2005-02-21 00:00:00 -03
|
||||
@@ -200,23 +200,23 @@ print "wanted=Thursday 00:00:00\n\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
TZ=America/Mendoza - wrong day.
|
||||
tStamp=Sunday 1992-10-18 17:17:17 ARST 1
|
||||
result=Sunday 1992-10-25 00:00:00 ARST 1
|
||||
tStamp=Sunday 1992-10-18 17:17:17 -02 1
|
||||
result=Sunday 1992-10-25 00:00:00 -02 1
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Catamarca - wrong day.
|
||||
tStamp=Sunday 1990-10-21 17:17:17 ARST 1
|
||||
result=Sunday 1990-10-28 00:00:00 ARST 1
|
||||
tStamp=Sunday 1990-10-21 17:17:17 -02 1
|
||||
result=Sunday 1990-10-28 00:00:00 -02 1
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Cordoba - wrong day.
|
||||
tStamp=Sunday 1990-10-21 17:17:17 ARST 1
|
||||
result=Sunday 1990-10-28 00:00:00 ARST 1
|
||||
tStamp=Sunday 1990-10-21 17:17:17 -02 1
|
||||
result=Sunday 1990-10-28 00:00:00 -02 1
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Rosario - wrong day.
|
||||
tStamp=Tuesday 1991-10-15 17:17:17 WART 0
|
||||
result=Tuesday 1991-10-22 00:00:00 ARST 1
|
||||
tStamp=Tuesday 1991-10-15 17:17:17 -04 0
|
||||
result=Tuesday 1991-10-22 00:00:00 -02 1
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Europe/Vienna - wrong day - giving unexpected results, at
|
||||
@@ -231,8 +231,8 @@ result=Monday 1992-09-28 00:00:00 +04 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Noronha - wrong day.
|
||||
tStamp=Friday 1999-10-01 17:17:17 FNT 0
|
||||
result=Friday 1999-10-08 00:00:00 FNST 1
|
||||
tStamp=Friday 1999-10-01 17:17:17 -02 0
|
||||
result=Friday 1999-10-08 00:00:00 -01 1
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=America/Havana - wrong day.
|
||||
@@ -256,13 +256,13 @@ result=Friday 2003-04-04 00:00:00 EEST 1
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=Pacific/Kwajalein - wrong day.
|
||||
tStamp=Friday 1993-08-13 17:17:17 KWAT 0
|
||||
result=Saturday 1993-08-21 00:00:00 MHT 0
|
||||
tStamp=Friday 1993-08-13 17:17:17 -12 0
|
||||
result=Saturday 1993-08-21 00:00:00 +12 0
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=Asia/Ulan_Bator - wrong day.
|
||||
tStamp=Saturday 2001-09-22 17:17:17 ULAST 1
|
||||
result=Saturday 2001-09-29 00:00:00 ULAST 1
|
||||
tStamp=Saturday 2001-09-22 17:17:17 +09 1
|
||||
result=Saturday 2001-09-29 00:00:00 +09 1
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=America/Cancun - wrong day.
|
||||
@@ -286,18 +286,18 @@ result=Thursday 2002-04-11 00:00:00 MDT 1
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=Asia/Kuala_Lumpur - wrong day.
|
||||
tStamp=Monday 1981-12-28 17:17:17 MALT 0
|
||||
result=Monday 1982-01-04 00:00:00 MYT 0
|
||||
tStamp=Monday 1981-12-28 17:17:17 +0730 0
|
||||
result=Monday 1982-01-04 00:00:00 +08 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Chatham - wrong day.
|
||||
tStamp=Monday 1974-10-28 17:17:17 CHAST 0
|
||||
result=Monday 1974-11-04 00:00:00 CHADT 1
|
||||
tStamp=Monday 1974-10-28 17:17:17 +1245 0
|
||||
result=Monday 1974-11-04 00:00:00 +1345 1
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Lima - wrong day.
|
||||
tStamp=Thursday 1985-12-26 17:17:17 PET 0
|
||||
result=Thursday 1986-01-02 00:00:00 PEST 1
|
||||
tStamp=Thursday 1985-12-26 17:17:17 -05 0
|
||||
result=Thursday 1986-01-02 00:00:00 -04 1
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=Asia/Karachi - wrong day.
|
||||
@@ -306,16 +306,16 @@ result=Friday 2002-04-12 00:00:00 PKST 1
|
||||
wanted=Friday 00:00:00
|
||||
|
||||
TZ=America/Asuncion - wrong day.
|
||||
tStamp=Wednesday 2002-02-27 17:17:17 PYST 1
|
||||
result=Wednesday 2002-03-06 00:00:00 PYST 1
|
||||
tStamp=Wednesday 2002-02-27 17:17:17 -03 1
|
||||
result=Wednesday 2002-03-06 00:00:00 -03 1
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Asia/Singapore - wrong day.
|
||||
tStamp=Thursday 1981-12-31 17:17:17 SGT 0
|
||||
result=Thursday 1982-01-07 00:00:00 SGT 0
|
||||
tStamp=Thursday 1981-12-31 17:17:17 +0730 0
|
||||
result=Thursday 1982-01-07 00:00:00 +08 0
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=America/Montevideo - wrong day.
|
||||
tStamp=Thursday 2004-09-16 17:17:17 UYT 0
|
||||
result=Thursday 2004-09-23 00:00:00 UYST 1
|
||||
tStamp=Thursday 2004-09-16 17:17:17 -03 0
|
||||
result=Thursday 2004-09-23 00:00:00 -02 1
|
||||
wanted=Thursday 00:00:00
|
||||
@@ -76,13 +76,13 @@ print "wanted=Friday 00:00:00\n\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
TZ=Pacific/Rarotonga - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CKT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 CKT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -1030 0
|
||||
result=Tuesday 1970-01-06 00:00:00 -1030 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Atlantic/South_Georgia - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 GST 0
|
||||
result=Tuesday 1970-01-06 00:00:00 GST 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -02 0
|
||||
result=Tuesday 1970-01-06 00:00:00 -02 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=America/Port-au-Prince - wrong day.
|
||||
@@ -91,13 +91,13 @@ result=Monday 2005-04-04 00:00:00 EDT 1
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Enderbury - wrong day, off by 2 days.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PHOT 0
|
||||
result=Monday 1970-01-05 00:00:00 PHOT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -12 0
|
||||
result=Monday 1970-01-05 00:00:00 -12 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Pacific/Kiritimati - wrong day, off by 2 days.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 LINT 0
|
||||
result=Monday 1970-01-05 00:00:00 LINT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -1040 0
|
||||
result=Monday 1970-01-05 00:00:00 -1040 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Managua - wrong day.
|
||||
@@ -106,13 +106,13 @@ result=Tuesday 2005-04-12 00:00:00 CDT 1
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Pitcairn - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PNT 0
|
||||
result=Wednesday 1970-01-07 00:00:00 PNT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -0830 0
|
||||
result=Wednesday 1970-01-07 00:00:00 -0830 0
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Pacific/Fakaofo - wrong day.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 TKT 0
|
||||
result=Saturday 1970-01-03 00:00:00 TKT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 -11 0
|
||||
result=Saturday 1970-01-03 00:00:00 -11 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Pacific/Johnston - wrong day.
|
||||
|
||||
@@ -23,8 +23,8 @@ print "wanted=Sunday 00:00:00\n\n";
|
||||
--EXPECT--
|
||||
TZ=America/Jujuy - Is it OK for this to be 2 AM, rather than 1
|
||||
AM as per most DST transitions?
|
||||
tStamp=Monday 1990-10-15 17:17:17 WART 0
|
||||
result=Monday 1990-10-22 00:00:00 WART 0
|
||||
tStamp=Monday 1990-10-15 17:17:17 -04 0
|
||||
result=Monday 1990-10-22 00:00:00 -04 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Asia/Tbilisi - Is it OK for this to be 2 AM?
|
||||
|
||||
@@ -116,11 +116,11 @@ print "wanted=Monday 00:00:00\n\n";
|
||||
|
||||
print "TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes\n";
|
||||
date_default_timezone_set('Africa/Monrovia');
|
||||
$tStamp = mktime (17, 17, 17, 1, 845, 1970);
|
||||
$tStamp = mktime (17, 17, 17, 1, 730, 1970);
|
||||
print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n";
|
||||
$strtotime_tstamp = strtotime("next Monday", $tStamp);
|
||||
$strtotime_tstamp = strtotime("next Friday", $tStamp);
|
||||
print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
|
||||
print "wanted=Monday 00:44:30\n\n";
|
||||
print "wanted=Friday 00:44:30\n\n";
|
||||
|
||||
print "TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes\n";
|
||||
date_default_timezone_set('Asia/Katmandu');
|
||||
@@ -208,7 +208,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n";
|
||||
print "wanted=Monday 00:30:00\n\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear to
|
||||
have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CAT 0
|
||||
@@ -216,14 +216,14 @@ result=Wednesday 1970-01-07 00:00:00 CAT 0
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Thursday 1987-09-24 17:17:17 IST 0
|
||||
result=Thursday 1987-10-01 00:30:00 BTT 0
|
||||
tStamp=Thursday 1987-09-24 17:17:17 +0530 0
|
||||
result=Thursday 1987-10-01 00:30:00 +06 0
|
||||
wanted=Thursday 00:30:00
|
||||
|
||||
TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does not
|
||||
appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CCT 0
|
||||
result=Thursday 1970-01-08 00:00:00 CCT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +0630 0
|
||||
result=Thursday 1970-01-08 00:00:00 +0630 0
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: does
|
||||
@@ -233,110 +233,110 @@ result=Saturday 1970-01-03 00:00:00 CAT 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes
|
||||
tStamp=Thursday 1980-04-24 17:17:17 XJT 0
|
||||
result=Thursday 1980-05-01 00:00:00 XJT 0
|
||||
tStamp=Thursday 1980-04-24 17:17:17 +06 0
|
||||
result=Thursday 1980-05-01 00:00:00 +06 0
|
||||
wanted=Thursday 03:00:00
|
||||
|
||||
TZ=Indian/Christmas - Is it OK for this to be 7 AM? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CXT 0
|
||||
result=Sunday 1970-01-04 00:00:00 CXT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +07 0
|
||||
result=Sunday 1970-01-04 00:00:00 +07 0
|
||||
wanted=Sunday 00:00:00
|
||||
|
||||
TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Sunday 1970-10-18 17:17:17 EST 0
|
||||
result=Sunday 1970-10-25 00:30:00 EHDT 1
|
||||
result=Sunday 1970-10-25 00:30:00 -0430 1
|
||||
wanted=Sunday 00:30:00
|
||||
|
||||
TZ=Pacific/Truk - Is it OK for this to be 10 AM? Note: does not
|
||||
appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 CHUT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 CHUT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +10 0
|
||||
result=Tuesday 1970-01-06 00:00:00 +10 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Ponape - Is it OK for this to be 11 AM? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PONT 0
|
||||
result=Monday 1970-01-05 00:00:00 PONT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +11 0
|
||||
result=Monday 1970-01-05 00:00:00 +11 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=America/Scoresbysund - Is it OK for this to be 2 AM? yes
|
||||
tStamp=Sunday 1981-03-22 17:17:17 CGT 0
|
||||
result=Sunday 1981-03-29 02:00:00 EGST 1
|
||||
tStamp=Sunday 1981-03-22 17:17:17 -02 0
|
||||
result=Sunday 1981-03-29 02:00:00 +00 1
|
||||
wanted=Sunday 02:00:00
|
||||
|
||||
TZ=America/Guyana - Is it OK for this to be 0:45 AM? yes
|
||||
tStamp=Thursday 1975-07-24 17:17:17 GYT 0
|
||||
result=Thursday 1975-07-31 00:45:00 GYT 0
|
||||
tStamp=Thursday 1975-07-24 17:17:17 -0345 0
|
||||
result=Thursday 1975-07-31 00:45:00 -03 0
|
||||
wanted=Thursday 00:45:00
|
||||
|
||||
TZ=Asia/Tehran - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Tuesday 1977-10-25 17:17:17 IRST 0
|
||||
result=Tuesday 1977-11-01 00:30:00 IRST 0
|
||||
tStamp=Tuesday 1977-10-25 17:17:17 +0330 0
|
||||
result=Tuesday 1977-11-01 00:30:00 +04 0
|
||||
wanted=Tuesday 00:30:00
|
||||
|
||||
TZ=Pacific/Tarawa - Is it OK for this to be Midday? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 GILT 0
|
||||
result=Monday 1970-01-05 00:00:00 GILT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Monday 1970-01-05 00:00:00 +12 0
|
||||
wanted=Monday 00:00:00
|
||||
|
||||
TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes
|
||||
tStamp=Monday 1972-04-24 17:17:17 LRT 0
|
||||
result=Monday 1972-05-01 00:44:30 GMT 0
|
||||
wanted=Monday 00:44:30
|
||||
tStamp=Friday 1971-12-31 17:17:17 MMT 0
|
||||
result=Friday 1972-01-07 00:44:30 GMT 0
|
||||
wanted=Friday 00:44:30
|
||||
|
||||
TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes
|
||||
tStamp=Wednesday 1985-12-25 17:17:17 IST 0
|
||||
result=Wednesday 1986-01-01 00:15:00 NPT 0
|
||||
tStamp=Wednesday 1985-12-25 17:17:17 +0530 0
|
||||
result=Wednesday 1986-01-01 00:15:00 +0545 0
|
||||
wanted=Wednesday 00:15:00
|
||||
|
||||
TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes
|
||||
tStamp=Tuesday 1979-04-24 17:17:17 NRT 0
|
||||
result=Tuesday 1979-05-01 00:30:00 NRT 0
|
||||
tStamp=Tuesday 1979-04-24 17:17:17 +1130 0
|
||||
result=Tuesday 1979-05-01 00:30:00 +12 0
|
||||
wanted=Tuesday 00:30:00
|
||||
|
||||
TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Sunday 1978-09-24 17:17:17 NUT 0
|
||||
result=Sunday 1978-10-01 00:30:00 NUT 0
|
||||
tStamp=Sunday 1978-09-24 17:17:17 -1130 0
|
||||
result=Sunday 1978-10-01 00:30:00 -11 0
|
||||
wanted=Sunday 00:30:00
|
||||
|
||||
TZ=Pacific/Port_Moresby - Is it OK for this to be 10 AM? No DST
|
||||
or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PGT 0
|
||||
result=Thursday 1970-01-08 00:00:00 PGT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +10 0
|
||||
result=Thursday 1970-01-08 00:00:00 +10 0
|
||||
wanted=Thursday 00:00:00
|
||||
|
||||
TZ=America/Miquelon - Is it OK for this to be 1 AM ? yes
|
||||
tStamp=Thursday 1980-04-24 17:17:17 AST 0
|
||||
result=Thursday 1980-05-01 01:00:00 PMST 0
|
||||
result=Thursday 1980-05-01 01:00:00 -03 0
|
||||
wanted=Thursday 01:00:00
|
||||
|
||||
TZ=Pacific/Palau - Is it OK for this to be 9 AM? No DST or
|
||||
timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 PWT 0
|
||||
result=Saturday 1970-01-03 00:00:00 PWT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +09 0
|
||||
result=Saturday 1970-01-03 00:00:00 +09 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Pacific/Funafuti - Is it OK for this to be midday? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 TVT 0
|
||||
result=Wednesday 1970-01-07 00:00:00 TVT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Wednesday 1970-01-07 00:00:00 +12 0
|
||||
wanted=Wednesday 00:00:00
|
||||
|
||||
TZ=Pacific/Wake - Is it OK for this to be midday? Note: does not
|
||||
appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 WAKT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 WAKT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Tuesday 1970-01-06 00:00:00 +12 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=Pacific/Wallis - Is it OK for this to be midday? Note: does
|
||||
not appear to have a DST or timezone transition.
|
||||
tStamp=Thursday 1970-01-01 17:17:17 WFT 0
|
||||
result=Tuesday 1970-01-06 00:00:00 WFT 0
|
||||
tStamp=Thursday 1970-01-01 17:17:17 +12 0
|
||||
result=Tuesday 1970-01-06 00:00:00 +12 0
|
||||
wanted=Tuesday 00:00:00
|
||||
|
||||
TZ=America/Paramaribo - Is it OK for this to be 0:30 AM? yes
|
||||
tStamp=Monday 1984-09-24 17:17:17 SRT 0
|
||||
result=Monday 1984-10-01 00:30:00 SRT 0
|
||||
tStamp=Monday 1984-09-24 17:17:17 -0330 0
|
||||
result=Monday 1984-10-01 00:30:00 -03 0
|
||||
wanted=Monday 00:30:00
|
||||
@@ -0,0 +1,34 @@
|
||||
--TEST--
|
||||
Bug #72096: Swatch time value incorrect for dates before 1970
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
for ($unix = 1461283200; $unix <= 1461369600; $unix += 8000) {
|
||||
echo "Time:", gmdate('Y-m-d H:i:s = B', $unix), PHP_EOL;
|
||||
echo "Time:", gmdate('Y-m-d H:i:s = B', $unix - 82 * 365 * 24 * 3600), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Time:2016-04-22 00:00:00 = 041
|
||||
Time:1934-05-13 00:00:00 = 041
|
||||
Time:2016-04-22 02:13:20 = 134
|
||||
Time:1934-05-13 02:13:20 = 134
|
||||
Time:2016-04-22 04:26:40 = 226
|
||||
Time:1934-05-13 04:26:40 = 226
|
||||
Time:2016-04-22 06:40:00 = 319
|
||||
Time:1934-05-13 06:40:00 = 319
|
||||
Time:2016-04-22 08:53:20 = 412
|
||||
Time:1934-05-13 08:53:20 = 412
|
||||
Time:2016-04-22 11:06:40 = 504
|
||||
Time:1934-05-13 11:06:40 = 504
|
||||
Time:2016-04-22 13:20:00 = 597
|
||||
Time:1934-05-13 13:20:00 = 597
|
||||
Time:2016-04-22 15:33:20 = 689
|
||||
Time:1934-05-13 15:33:20 = 689
|
||||
Time:2016-04-22 17:46:40 = 782
|
||||
Time:1934-05-13 17:46:40 = 782
|
||||
Time:2016-04-22 20:00:00 = 875
|
||||
Time:1934-05-13 20:00:00 = 875
|
||||
Time:2016-04-22 22:13:20 = 967
|
||||
Time:1934-05-13 22:13:20 = 967
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #73837: Milliseconds in DateTime()
|
||||
--FILE--
|
||||
<?php
|
||||
$collect = [];
|
||||
|
||||
for ( $i = 0; $i < 1000; $i++ )
|
||||
{
|
||||
$a = new DateTime();
|
||||
$key = "s" . $a->format( "u" );
|
||||
$collect[$key] = true;
|
||||
}
|
||||
|
||||
var_dump($n = count( $collect ));
|
||||
echo ( $n > 700 ) ? "microseconds differ\n" : "microseconds do not differ enough ($n)\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(%d)
|
||||
microseconds differ
|
||||
@@ -7,8 +7,8 @@ In the "verbose setup method" I'm trying setup the DateTime object myself
|
||||
to see if it's the format string which is parsed in correctly or if it's the DateTime
|
||||
object which is breaking stuff. From the testing it appears DateTime is broken somehow.
|
||||
*/
|
||||
$ss = 'first day of last month midnight';
|
||||
$es = 'first day of this month midnight - 1 second';
|
||||
$ss = 'february first day of last month midnight';
|
||||
$es = 'february first day of this month midnight - 1 second';
|
||||
|
||||
$s = new DateTime($ss);
|
||||
$e = new DateTime($es);
|
||||
@@ -50,7 +50,7 @@ effect on the results of the diff. By modifying the datetime with ->modify every
|
||||
it just means you have to be careful of how we work with DateTimes .
|
||||
*/
|
||||
$s = new DateTime($ss);
|
||||
$e = new DateTime('first day of this month midnight');
|
||||
$e = new DateTime('february first day of this month midnight');
|
||||
$e->modify('- 1 second');
|
||||
var_dump($e->diff($s)->days); // 30 ... and should be 30
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #74080 Provide an RFC7231 date time format
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$date = mktime(17, 52, 13, 4, 30, 2016);
|
||||
var_dump(date(\DateTime::RFC7231, $date));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(29) "Sat, 30 Apr 2016 17:52:13 GMT"
|
||||
@@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
Bug #74639 Cloning DatePeriod leads to segfault
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$start = new DateTime('2017-05-22 09:00:00');
|
||||
$end = new DateTime('2017-08-24 18:00:00');
|
||||
$interval = $start->diff($end);
|
||||
|
||||
$period = new DatePeriod($start, $interval, $end);
|
||||
$clonedPeriod = clone $period;
|
||||
$clonedInterval = clone $interval;
|
||||
|
||||
if ($period->getStartDate() != $clonedPeriod->getStartDate()) {
|
||||
echo "failure\n";
|
||||
}
|
||||
|
||||
if ($period->getEndDate() != $clonedPeriod->getEndDate()) {
|
||||
echo "failure\n";
|
||||
}
|
||||
|
||||
if ($period->getDateInterval() != $clonedPeriod->getDateInterval()) {
|
||||
echo "failure\n";
|
||||
}
|
||||
|
||||
if ($interval->format('Y-m-d H:i:s') != $clonedInterval->format('Y-m-d H:i:s')) {
|
||||
echo "failure\n";
|
||||
}
|
||||
|
||||
echo 'success';
|
||||
?>
|
||||
--EXPECT--
|
||||
success
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Test for bug #74652: Incomplete dates
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
$formats = [
|
||||
'2017-03-25 10:52:09',
|
||||
'2017-03-25 10:52',
|
||||
'2017-03-25 10am',
|
||||
'2017-03-25',
|
||||
'2017-03',
|
||||
'2017.042',
|
||||
'2017043',
|
||||
];
|
||||
|
||||
foreach ( $formats as $format )
|
||||
{
|
||||
$dt = new DateTimeImmutable( $format );
|
||||
echo $dt->format( 'Y-m-d H:i:s' ), "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
2017-03-25 10:52:09
|
||||
2017-03-25 10:52:00
|
||||
2017-03-25 10:00:00
|
||||
2017-03-25 00:00:00
|
||||
2017-03-01 00:00:00
|
||||
2017-02-11 00:00:00
|
||||
2017-02-12 00:00:00
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #74852 property_exists returns true on unknown DateInterval property
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$interval = new DateInterval('P2D');
|
||||
var_dump(property_exists($interval,'abcde'));
|
||||
var_dump(isset($interval->abcde));
|
||||
var_dump($interval->abcde);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Notice: Undefined property: DateInterval::$abcde in %s on line %d
|
||||
NULL
|
||||
@@ -34,14 +34,14 @@ foreach ( $tests as $start => $data )
|
||||
echo "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Sat, 23 Oct 2010 00:00:00 +0000
|
||||
Fri, 15 Oct 2010 23:00:00 +0000
|
||||
Wed, 15 Dec 2010 16:15:00 +0000
|
||||
Mon, 20 Dec 2010 00:00:00 +0000
|
||||
Mon, 20 Dec 2010 10:00:00 +0000
|
||||
Tue, 21 Dec 2010 12:00:00 +0000
|
||||
Mon, 03 Jan 2011 00:00:00 +0000
|
||||
Mon, 03 Jan 2011 09:00:00 +0000
|
||||
Sat, 23 Oct 2010 00:00:00 +0100
|
||||
Fri, 15 Oct 2010 23:00:00 +0100
|
||||
Sun, 28 Mar 2010 00:15:00 +0000
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
@@ -22,8 +22,8 @@ $ts->modify("+ 1 hour 1 second");
|
||||
echo date_format($ts, 'D, d M Y H:i:s T'), "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Thu, 19 Aug 1993 23:59:59 KWAT
|
||||
Sat, 21 Aug 1993 00:00:00 MHT
|
||||
Thu, 19 Aug 1993 23:59:59 -12
|
||||
Sat, 21 Aug 1993 00:00:00 +12
|
||||
Sun, 27 Mar 2005 01:59:59 CET
|
||||
Sun, 27 Mar 2005 03:00:00 CEST
|
||||
Sun, 30 Oct 2005 01:59:59 CEST
|
||||
|
||||
@@ -10,12 +10,12 @@ date.timezone=UTC
|
||||
$location = timezone_location_get(new DateTimeZone("Europe/Oslo"));
|
||||
var_dump($location);
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
array(4) {
|
||||
["country_code"]=>
|
||||
string(2) "NO"
|
||||
["latitude"]=>
|
||||
float(59.91666)
|
||||
float(59.9166%d)
|
||||
["longitude"]=>
|
||||
float(10.75)
|
||||
["comments"]=>
|
||||
|
||||
+4
-4
@@ -2038,16 +2038,16 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (options) {
|
||||
htmlCtxtUseOptions(ctxt, (int)options);
|
||||
}
|
||||
|
||||
|
||||
ctxt->vctxt.error = php_libxml_ctx_error;
|
||||
ctxt->vctxt.warning = php_libxml_ctx_warning;
|
||||
if (ctxt->sax != NULL) {
|
||||
ctxt->sax->error = php_libxml_ctx_error;
|
||||
ctxt->sax->warning = php_libxml_ctx_warning;
|
||||
}
|
||||
if (options) {
|
||||
htmlCtxtUseOptions(ctxt, (int)options);
|
||||
}
|
||||
htmlParseDocument(ctxt);
|
||||
newdoc = ctxt->myDoc;
|
||||
htmlFreeParserCtxt(ctxt);
|
||||
|
||||
+11
-1
@@ -49,7 +49,7 @@ ZEND_END_ARG_INFO();
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_child_nodes, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 1)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, deep)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
@@ -337,6 +337,8 @@ int dom_node_node_value_write(dom_object *obj, zval *newval)
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
if (nodep->children) {
|
||||
node_list_unlink(nodep->children);
|
||||
php_libxml_node_free_list((xmlNodePtr) nodep->children);
|
||||
nodep->children = NULL;
|
||||
}
|
||||
case XML_TEXT_NODE:
|
||||
case XML_COMMENT_NODE:
|
||||
@@ -854,6 +856,14 @@ int dom_node_text_content_write(dom_object *obj, zval *newval)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE) {
|
||||
if (nodep->children) {
|
||||
node_list_unlink(nodep->children);
|
||||
php_libxml_node_free_list((xmlNodePtr) nodep->children);
|
||||
nodep->children = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
str = zval_get_string(newval);
|
||||
/* we have to use xmlNodeAddContent() to get the same behavior as with xmlNewText() */
|
||||
xmlNodeSetContent(nodep, (xmlChar *) "");
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #69373 References to deleted XPath query results
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
for( $i=0; $i<20; $i++ ) {
|
||||
$doc->loadXML("<parent><child /><child /></parent>");
|
||||
$xpath = new DOMXpath($doc);
|
||||
$all = $xpath->query('//*');
|
||||
$doc->firstChild->nodeValue = '';
|
||||
}
|
||||
echo 'DONE', PHP_EOL;
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #74004 (DOMDocument->loadHTML and ->loadHTMLFile do not heed LIBXML_NOWARNING and LIBXML_NOERROR options)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$doc=new DOMDocument();
|
||||
$doc->loadHTML("<tag-throw></tag-throw>",LIBXML_NOERROR);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #74416 Wrong reflection on DOMNode::cloneNode
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
if (!extension_loaded('reflection')) die('skip reflection extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(DOMNode::class, "cloneNode");
|
||||
printf("%d\n%d\n", $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters());
|
||||
foreach ($rm->getParameters() as $param) {
|
||||
printf("Parameter #%d %s OPTIONAL\n", $param->getPosition(), $param->isOptional() ? "IS" : "IS NOT");
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
1
|
||||
0
|
||||
Parameter #0 IS OPTIONAL
|
||||
===DONE===
|
||||
+93
-81
@@ -1,6 +1,6 @@
|
||||
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
--- libmagic.orig/apprentice.c 2016-01-25 11:31:21.473017702 +0800
|
||||
+++ libmagic/apprentice.c 2016-01-25 11:41:58.210723599 +0800
|
||||
--- libmagic.orig/apprentice.c 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/apprentice.c 2017-04-10 11:43:17.272811417 +0800
|
||||
@@ -29,6 +29,8 @@
|
||||
* apprentice - make one pass through /etc/magic, learning its secrets.
|
||||
*/
|
||||
@@ -49,7 +49,18 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
#ifndef SSIZE_MAX
|
||||
#define MAXMAGIC_SIZE ((ssize_t)0x7fffffff)
|
||||
@@ -168,38 +173,7 @@
|
||||
@@ -75,6 +80,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifndef offsetof
|
||||
+#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
|
||||
+#endif
|
||||
+
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED (void *) -1
|
||||
#endif
|
||||
@@ -168,38 +177,7 @@
|
||||
{ NULL, 0, NULL }
|
||||
};
|
||||
|
||||
@@ -89,7 +100,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
struct type_tbl_s {
|
||||
const char name[16];
|
||||
@@ -281,6 +255,10 @@
|
||||
@@ -281,6 +259,10 @@
|
||||
# undef XX
|
||||
# undef XX_NULL
|
||||
|
||||
@@ -100,7 +111,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
private int
|
||||
get_type(const struct type_tbl_s *tbl, const char *l, const char **t)
|
||||
{
|
||||
@@ -405,7 +383,7 @@
|
||||
@@ -405,7 +387,7 @@
|
||||
struct mlist *ml;
|
||||
|
||||
mlp->map = idx == 0 ? map : NULL;
|
||||
@@ -109,7 +120,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return -1;
|
||||
|
||||
ml->map = NULL;
|
||||
@@ -426,10 +404,8 @@
|
||||
@@ -426,10 +408,8 @@
|
||||
apprentice_1(struct magic_set *ms, const char *fn, int action)
|
||||
{
|
||||
struct magic_map *map;
|
||||
@@ -120,7 +131,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
if (magicsize != FILE_MAGICSIZE) {
|
||||
file_error(ms, 0, "magic element size %lu != %lu",
|
||||
@@ -445,12 +421,13 @@
|
||||
@@ -445,12 +425,13 @@
|
||||
return apprentice_compile(ms, map, fn);
|
||||
}
|
||||
|
||||
@@ -138,7 +149,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
if (map == NULL)
|
||||
return -1;
|
||||
}
|
||||
@@ -458,7 +435,8 @@
|
||||
@@ -458,7 +439,8 @@
|
||||
for (i = 0; i < MAGIC_SETS; i++) {
|
||||
if (add_mlist(ms->mlist[i], map, i) == -1) {
|
||||
file_oomem(ms, sizeof(*ml));
|
||||
@@ -148,7 +159,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,15 +450,6 @@
|
||||
@@ -472,15 +454,6 @@
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -164,7 +175,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
protected void
|
||||
@@ -491,10 +460,16 @@
|
||||
@@ -491,10 +464,16 @@
|
||||
return;
|
||||
for (i = 0; i < MAGIC_SETS; i++)
|
||||
mlist_free(ms->mlist[i]);
|
||||
@@ -185,7 +196,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
protected struct magic_set *
|
||||
@@ -503,7 +478,7 @@
|
||||
@@ -503,7 +482,7 @@
|
||||
struct magic_set *ms;
|
||||
size_t i, len;
|
||||
|
||||
@@ -194,7 +205,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
sizeof(struct magic_set)))) == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -515,7 +490,7 @@
|
||||
@@ -515,7 +494,7 @@
|
||||
ms->o.buf = ms->o.pbuf = NULL;
|
||||
len = (ms->c.len = 10) * sizeof(*ms->c.li);
|
||||
|
||||
@@ -203,7 +214,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
goto free;
|
||||
|
||||
ms->event_flags = 0;
|
||||
@@ -531,7 +506,7 @@
|
||||
@@ -531,7 +510,7 @@
|
||||
ms->elf_notes_max = FILE_ELF_NOTES_MAX;
|
||||
return ms;
|
||||
free:
|
||||
@@ -212,7 +223,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -540,30 +515,26 @@
|
||||
@@ -540,30 +519,26 @@
|
||||
{
|
||||
if (map == NULL)
|
||||
return;
|
||||
@@ -256,7 +267,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return NULL;
|
||||
}
|
||||
mlist->next = mlist->prev = mlist;
|
||||
@@ -582,61 +553,12 @@
|
||||
@@ -582,61 +557,12 @@
|
||||
for (ml = mlist->next; (next = ml->next) != NULL; ml = next) {
|
||||
if (ml->map)
|
||||
apprentice_unmap(ml->map);
|
||||
@@ -319,7 +330,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
/* const char *fn: list of magic files and directories */
|
||||
protected int
|
||||
file_apprentice(struct magic_set *ms, const char *fn, int action)
|
||||
@@ -648,12 +570,28 @@
|
||||
@@ -648,12 +574,28 @@
|
||||
if (ms->mlist[0] != NULL)
|
||||
file_reset(ms);
|
||||
|
||||
@@ -349,7 +360,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_oomem(ms, strlen(fn));
|
||||
return -1;
|
||||
}
|
||||
@@ -666,7 +604,7 @@
|
||||
@@ -666,7 +608,7 @@
|
||||
mlist_free(ms->mlist[i]);
|
||||
ms->mlist[i] = NULL;
|
||||
}
|
||||
@@ -358,7 +369,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -683,7 +621,7 @@
|
||||
@@ -683,7 +625,7 @@
|
||||
fn = p;
|
||||
}
|
||||
|
||||
@@ -367,7 +378,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
if (errs == -1) {
|
||||
for (i = 0; i < MAGIC_SETS; i++) {
|
||||
@@ -1062,7 +1000,7 @@
|
||||
@@ -1062,7 +1004,7 @@
|
||||
|
||||
mset[i].max += ALLOC_INCR;
|
||||
if ((mp = CAST(struct magic_entry *,
|
||||
@@ -376,7 +387,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
NULL) {
|
||||
file_oomem(ms, sizeof(*mp) * mset[i].max);
|
||||
return -1;
|
||||
@@ -1083,13 +1021,19 @@
|
||||
@@ -1083,13 +1025,19 @@
|
||||
load_1(struct magic_set *ms, int action, const char *fn, int *errs,
|
||||
struct magic_entry_set *mset)
|
||||
{
|
||||
@@ -400,7 +411,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
if (errno != ENOENT)
|
||||
file_error(ms, errno, "cannot read magic file `%s'",
|
||||
fn);
|
||||
@@ -1099,8 +1043,7 @@
|
||||
@@ -1099,8 +1047,7 @@
|
||||
|
||||
memset(&me, 0, sizeof(me));
|
||||
/* read and parse this file */
|
||||
@@ -410,7 +421,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
if (len == 0) /* null line, garbage, etc */
|
||||
continue;
|
||||
if (line[len - 1] == '\n') {
|
||||
@@ -1158,8 +1101,8 @@
|
||||
@@ -1158,8 +1105,8 @@
|
||||
}
|
||||
if (me.mp)
|
||||
(void)addentry(ms, &me, mset);
|
||||
@@ -421,7 +432,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1238,7 +1181,7 @@
|
||||
@@ -1238,7 +1185,7 @@
|
||||
mentrycount += me[i].cont_count;
|
||||
|
||||
slen = sizeof(**ma) * mentrycount;
|
||||
@@ -430,7 +441,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_oomem(ms, slen);
|
||||
return -1;
|
||||
}
|
||||
@@ -1260,8 +1203,8 @@
|
||||
@@ -1260,8 +1207,8 @@
|
||||
if (me == NULL)
|
||||
return;
|
||||
for (i = 0; i < nme; i++)
|
||||
@@ -441,7 +452,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
private struct magic_map *
|
||||
@@ -1270,18 +1213,19 @@
|
||||
@@ -1270,18 +1217,19 @@
|
||||
int errs = 0;
|
||||
uint32_t i, j;
|
||||
size_t files = 0, maxfiles = 0;
|
||||
@@ -466,7 +477,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
{
|
||||
file_oomem(ms, sizeof(*map));
|
||||
return NULL;
|
||||
@@ -1292,22 +1236,26 @@
|
||||
@@ -1292,22 +1240,26 @@
|
||||
(void)fprintf(stderr, "%s\n", usg_hdr);
|
||||
|
||||
/* load directory or file */
|
||||
@@ -501,7 +512,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
continue;
|
||||
}
|
||||
if (files >= maxfiles) {
|
||||
@@ -1315,23 +1263,22 @@
|
||||
@@ -1315,23 +1267,22 @@
|
||||
maxfiles = (maxfiles + 1) * 2;
|
||||
mlen = maxfiles * sizeof(*filearr);
|
||||
if ((filearr = CAST(char **,
|
||||
@@ -531,7 +542,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
} else
|
||||
load_1(ms, action, fn, &errs, mset);
|
||||
if (errs)
|
||||
@@ -1796,7 +1743,7 @@
|
||||
@@ -1796,7 +1747,7 @@
|
||||
if (me->cont_count == me->max_count) {
|
||||
struct magic *nm;
|
||||
size_t cnt = me->max_count + ALLOC_CHUNK;
|
||||
@@ -540,7 +551,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
sizeof(*nm) * cnt))) == NULL) {
|
||||
file_oomem(ms, sizeof(*nm) * cnt);
|
||||
return -1;
|
||||
@@ -1811,7 +1758,7 @@
|
||||
@@ -1811,7 +1762,7 @@
|
||||
static const size_t len = sizeof(*m) * ALLOC_CHUNK;
|
||||
if (me->mp != NULL)
|
||||
return 1;
|
||||
@@ -549,7 +560,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_oomem(ms, len);
|
||||
return -1;
|
||||
}
|
||||
@@ -1984,7 +1931,7 @@
|
||||
@@ -1984,7 +1935,7 @@
|
||||
m->type = get_standard_integer_type(l, &l);
|
||||
else if (*l == 's' && !isalpha((unsigned char)l[1])) {
|
||||
m->type = FILE_STRING;
|
||||
@@ -558,7 +569,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2005,7 +1952,7 @@
|
||||
@@ -2005,7 +1956,7 @@
|
||||
|
||||
m->mask_op = 0;
|
||||
if (*l == '~') {
|
||||
@@ -567,7 +578,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->mask_op |= FILE_OPINVERSE;
|
||||
else if (ms->flags & MAGIC_CHECK)
|
||||
file_magwarn(ms, "'~' invalid for string types");
|
||||
@@ -2014,7 +1961,7 @@
|
||||
@@ -2014,7 +1965,7 @@
|
||||
m->str_range = 0;
|
||||
m->str_flags = m->type == FILE_PSTRING ? PSTRING_1_LE : 0;
|
||||
if ((op = get_op(*l)) != -1) {
|
||||
@@ -576,7 +587,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
int r;
|
||||
|
||||
if (op != FILE_OPDIVIDE) {
|
||||
@@ -2119,11 +2066,6 @@
|
||||
@@ -2119,11 +2070,6 @@
|
||||
if (check_format(ms, m) == -1)
|
||||
return -1;
|
||||
}
|
||||
@@ -588,7 +599,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->mimetype[0] = '\0'; /* initialise MIME type to none */
|
||||
return 0;
|
||||
}
|
||||
@@ -2195,7 +2137,7 @@
|
||||
@@ -2195,7 +2141,7 @@
|
||||
|
||||
private int
|
||||
parse_extra(struct magic_set *ms, struct magic_entry *me, const char *line,
|
||||
@@ -597,7 +608,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
{
|
||||
size_t i;
|
||||
const char *l = line;
|
||||
@@ -2264,7 +2206,7 @@
|
||||
@@ -2264,7 +2210,7 @@
|
||||
struct magic *m = &me->mp[0];
|
||||
|
||||
return parse_extra(ms, me, line,
|
||||
@@ -606,7 +617,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
sizeof(m->mimetype), "MIME", "+-/.", 1);
|
||||
}
|
||||
|
||||
@@ -2517,14 +2459,18 @@
|
||||
@@ -2517,14 +2463,18 @@
|
||||
return -1;
|
||||
}
|
||||
if (m->type == FILE_REGEX) {
|
||||
@@ -632,7 +643,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
return 0;
|
||||
case FILE_FLOAT:
|
||||
@@ -2854,68 +2800,144 @@
|
||||
@@ -2854,68 +2804,144 @@
|
||||
private struct magic_map *
|
||||
apprentice_map(struct magic_set *ms, const char *fn)
|
||||
{
|
||||
@@ -745,9 +756,10 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+ file_error(ms, 0, "File %d.%d supports only version %d magic "
|
||||
+ "files. `%s' is version %d", FILE_VERSION_MAJOR, patchlevel,
|
||||
+ VERSIONNO, dbname, version);
|
||||
+ goto error;
|
||||
goto error;
|
||||
+ }
|
||||
+
|
||||
|
||||
- free(dbname);
|
||||
+ /* php_magic_database is a const, performing writes will segfault. This is for big-endian
|
||||
+ machines only, PPC and Sparc specifically. Consider static variable or MINIT in
|
||||
+ future. */
|
||||
@@ -780,13 +792,12 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+ if (NULL != fn && entries != nentries + 1) {
|
||||
+ file_error(ms, 0, "Inconsistent entries in `%s' %u != %u",
|
||||
+ dbname, entries, nentries + 1);
|
||||
goto error;
|
||||
+ goto error;
|
||||
+ }
|
||||
+ if (needsbyteswap)
|
||||
+ for (i = 0; i < MAGIC_SETS; i++)
|
||||
+ byteswap(map->magic[i], map->nmagic[i]);
|
||||
|
||||
- free(dbname);
|
||||
+
|
||||
+ if (dbname) {
|
||||
+ efree(dbname);
|
||||
+ }
|
||||
@@ -806,7 +817,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2942,7 +2964,7 @@
|
||||
@@ -2942,7 +2968,7 @@
|
||||
version = ptr[1];
|
||||
if (version != VERSIONNO) {
|
||||
file_error(ms, 0, "File %s supports only version %d magic "
|
||||
@@ -815,7 +826,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
VERSIONNO, dbname, version);
|
||||
return -1;
|
||||
}
|
||||
@@ -2983,7 +3005,6 @@
|
||||
@@ -2983,7 +3009,6 @@
|
||||
{
|
||||
static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
|
||||
static const size_t m = sizeof(**map->magic);
|
||||
@@ -823,7 +834,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
size_t len;
|
||||
char *dbname;
|
||||
int rv = -1;
|
||||
@@ -2992,14 +3013,18 @@
|
||||
@@ -2992,14 +3017,18 @@
|
||||
struct magic m;
|
||||
uint32_t h[2 + MAGIC_SETS];
|
||||
} hdr;
|
||||
@@ -846,7 +857,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_error(ms, errno, "cannot open `%s'", dbname);
|
||||
goto out;
|
||||
}
|
||||
@@ -3008,24 +3033,25 @@
|
||||
@@ -3008,24 +3037,25 @@
|
||||
hdr.h[1] = VERSIONNO;
|
||||
memcpy(hdr.h + 2, map->nmagic, nm);
|
||||
|
||||
@@ -877,7 +888,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -3059,16 +3085,18 @@
|
||||
@@ -3059,16 +3089,18 @@
|
||||
q++;
|
||||
/* Compatibility with old code that looked in .mime */
|
||||
if (ms->flags & MAGIC_MIME) {
|
||||
@@ -902,7 +913,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
/* Compatibility with old code that looked in .mime */
|
||||
if (strstr(p, ".mime") != NULL)
|
||||
@@ -3158,7 +3186,7 @@
|
||||
@@ -3158,7 +3190,7 @@
|
||||
m->offset = swap4((uint32_t)m->offset);
|
||||
m->in_offset = swap4((uint32_t)m->in_offset);
|
||||
m->lineno = swap4((uint32_t)m->lineno);
|
||||
@@ -912,8 +923,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->str_flags = swap4(m->str_flags);
|
||||
}
|
||||
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
|
||||
--- libmagic.orig/ascmagic.c 2016-01-25 11:31:21.495017704 +0800
|
||||
+++ libmagic/ascmagic.c 2016-01-25 11:31:32.676017695 +0800
|
||||
--- libmagic.orig/ascmagic.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/ascmagic.c 2017-04-10 11:41:14.411268021 +0800
|
||||
@@ -139,7 +139,7 @@
|
||||
/* malloc size is a conservative overestimate; could be
|
||||
improved, or at least realloced after conversion. */
|
||||
@@ -934,8 +945,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
|
||||
return rv;
|
||||
}
|
||||
diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
--- libmagic.orig/cdf.c 2016-01-25 11:31:21.472017703 +0800
|
||||
+++ libmagic/cdf.c 2016-01-25 11:31:32.676017695 +0800
|
||||
--- libmagic.orig/cdf.c 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/cdf.c 2017-04-10 11:41:14.411268021 +0800
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "file.h"
|
||||
|
||||
@@ -1101,8 +1112,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
#ifdef CDF_DEBUG
|
||||
else
|
||||
diff -u libmagic.orig/cdf.h libmagic/cdf.h
|
||||
--- libmagic.orig/cdf.h 2016-01-25 11:31:21.493017704 +0800
|
||||
+++ libmagic/cdf.h 2016-01-25 11:31:32.676017695 +0800
|
||||
--- libmagic.orig/cdf.h 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/cdf.h 2017-04-10 11:41:14.412268021 +0800
|
||||
@@ -35,10 +35,12 @@
|
||||
#ifndef _H_CDF_
|
||||
#define _H_CDF_
|
||||
@@ -1131,8 +1142,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
|
||||
void cdf_swap_header(cdf_header_t *);
|
||||
void cdf_unpack_header(cdf_header_t *, char *);
|
||||
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
|
||||
--- libmagic.orig/cdf_time.c 2016-01-25 11:31:21.494017704 +0800
|
||||
+++ libmagic/cdf_time.c 2016-01-25 11:31:32.676017695 +0800
|
||||
--- libmagic.orig/cdf_time.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/cdf_time.c 2017-04-10 11:41:14.412268021 +0800
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
@@ -1182,8 +1193,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
|
||||
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
|
||||
static const char *ref = "Sat Apr 23 01:30:00 1977";
|
||||
diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
--- libmagic.orig/compress.c 2016-01-25 11:31:21.483017704 +0800
|
||||
+++ libmagic/compress.c 2016-01-25 11:31:32.676017695 +0800
|
||||
--- libmagic.orig/compress.c 2017-04-10 11:41:09.732268025 +0800
|
||||
+++ libmagic/compress.c 2017-04-10 11:41:14.412268021 +0800
|
||||
@@ -32,10 +32,11 @@
|
||||
* uncompress(method, old, n, newch) - uncompress old into new,
|
||||
* using method, return sizeof new
|
||||
@@ -1382,8 +1393,8 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
-#endif
|
||||
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
|
||||
diff -u libmagic.orig/elfclass.h libmagic/elfclass.h
|
||||
--- libmagic.orig/elfclass.h 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/elfclass.h 2016-01-25 11:31:32.677017695 +0800
|
||||
--- libmagic.orig/elfclass.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/elfclass.h 2017-04-10 11:41:14.412268021 +0800
|
||||
@@ -41,7 +41,7 @@
|
||||
return toomany(ms, "program headers", phnum);
|
||||
flags |= FLAGS_IS_CORE;
|
||||
@@ -1412,8 +1423,8 @@ diff -u libmagic.orig/elfclass.h libmagic/elfclass.h
|
||||
fsize, elf_getu16(swap, elfhdr.e_machine),
|
||||
(int)elf_getu16(swap, elfhdr.e_shstrndx),
|
||||
diff -u libmagic.orig/file.h libmagic/file.h
|
||||
--- libmagic.orig/file.h 2016-01-25 11:31:21.472017703 +0800
|
||||
+++ libmagic/file.h 2016-01-25 11:31:32.677017695 +0800
|
||||
--- libmagic.orig/file.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/file.h 2017-04-10 11:41:14.412268021 +0800
|
||||
@@ -33,11 +33,9 @@
|
||||
#ifndef __file_h__
|
||||
#define __file_h__
|
||||
@@ -1633,8 +1644,8 @@ diff -u libmagic.orig/file.h libmagic/file.h
|
||||
#define __RCSID(a)
|
||||
#endif
|
||||
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
--- libmagic.orig/fsmagic.c 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/fsmagic.c 2016-01-25 11:31:32.677017695 +0800
|
||||
--- libmagic.orig/fsmagic.c 2017-04-10 11:41:09.730268025 +0800
|
||||
+++ libmagic/fsmagic.c 2017-04-10 11:41:14.413268021 +0800
|
||||
@@ -63,27 +63,21 @@
|
||||
# define minor(dev) ((dev) & 0xff)
|
||||
#endif
|
||||
@@ -1985,8 +1996,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
return ret;
|
||||
}
|
||||
diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
--- libmagic.orig/funcs.c 2016-01-25 11:31:21.483017704 +0800
|
||||
+++ libmagic/funcs.c 2016-01-25 11:41:34.164723619 +0800
|
||||
--- libmagic.orig/funcs.c 2017-04-10 11:41:09.732268025 +0800
|
||||
+++ libmagic/funcs.c 2017-04-10 11:41:14.413268021 +0800
|
||||
@@ -31,7 +31,6 @@
|
||||
#endif /* lint */
|
||||
|
||||
@@ -2217,7 +2228,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
{
|
||||
@@ -403,8 +405,8 @@
|
||||
if (level >= ms->c.len) {
|
||||
len = (ms->c.len += 20) * sizeof(*ms->c.li);
|
||||
len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
|
||||
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
|
||||
- malloc(len) :
|
||||
- realloc(ms->c.li, len));
|
||||
@@ -2370,9 +2381,10 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
return buf;
|
||||
}
|
||||
+
|
||||
Common subdirectories: libmagic.orig/.libs and libmagic/.libs
|
||||
diff -u libmagic.orig/magic.c libmagic/magic.c
|
||||
--- libmagic.orig/magic.c 2016-01-25 11:31:21.495017704 +0800
|
||||
+++ libmagic/magic.c 2016-01-25 11:31:32.677017695 +0800
|
||||
--- libmagic.orig/magic.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/magic.c 2017-04-10 11:41:14.413268021 +0800
|
||||
@@ -25,11 +25,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
@@ -2761,8 +2773,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
|
||||
public const char *
|
||||
magic_error(struct magic_set *ms)
|
||||
diff -u libmagic.orig/magic.h libmagic/magic.h
|
||||
--- libmagic.orig/magic.h 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/magic.h 2016-01-25 11:31:32.677017695 +0800
|
||||
--- libmagic.orig/magic.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/magic.h 2017-04-10 11:41:14.413268021 +0800
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
const char *magic_getpath(const char *, int);
|
||||
@@ -2780,8 +2792,8 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
|
||||
int magic_errno(magic_t);
|
||||
|
||||
diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h
|
||||
--- libmagic.orig/patchlevel.h 2016-01-25 11:31:21.473017702 +0800
|
||||
+++ libmagic/patchlevel.h 2016-01-25 11:31:32.678017695 +0800
|
||||
--- libmagic.orig/patchlevel.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/patchlevel.h 2017-04-10 11:41:14.414268021 +0800
|
||||
@@ -1,34 +1,43 @@
|
||||
#define FILE_VERSION_MAJOR 5
|
||||
-#define patchlevel 6
|
||||
@@ -2846,8 +2858,8 @@ diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h
|
||||
* Revision 1.69 2008/07/02 15:27:05 christos
|
||||
* welcome to 4.25
|
||||
diff -u libmagic.orig/print.c libmagic/print.c
|
||||
--- libmagic.orig/print.c 2016-01-25 11:31:21.495017704 +0800
|
||||
+++ libmagic/print.c 2016-01-25 11:31:32.678017695 +0800
|
||||
--- libmagic.orig/print.c 2017-04-10 11:41:09.738268025 +0800
|
||||
+++ libmagic/print.c 2017-04-10 11:41:14.414268021 +0800
|
||||
@@ -28,13 +28,17 @@
|
||||
/*
|
||||
* print.c - debugging printout routines
|
||||
@@ -3119,8 +3131,8 @@ diff -u libmagic.orig/print.c libmagic/print.c
|
||||
if (tm == NULL)
|
||||
goto out;
|
||||
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
|
||||
--- libmagic.orig/readcdf.c 2016-01-25 11:31:21.493017704 +0800
|
||||
+++ libmagic/readcdf.c 2016-01-25 11:31:32.678017695 +0800
|
||||
--- libmagic.orig/readcdf.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/readcdf.c 2017-04-10 11:41:14.414268021 +0800
|
||||
@@ -26,15 +26,21 @@
|
||||
#include "file.h"
|
||||
|
||||
@@ -3245,8 +3257,8 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
|
||||
#ifdef CDF_DEBUG
|
||||
cdf_dump_catalog(&h, &scn);
|
||||
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
--- libmagic.orig/softmagic.c 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/softmagic.c 2016-01-25 11:44:35.541684679 +0800
|
||||
--- libmagic.orig/softmagic.c 2017-04-10 11:41:09.730268025 +0800
|
||||
+++ libmagic/softmagic.c 2017-04-10 11:41:14.414268021 +0800
|
||||
@@ -36,11 +36,19 @@
|
||||
#endif /* lint */
|
||||
|
||||
@@ -3669,8 +3681,8 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
}
|
||||
case FILE_INDIRECT:
|
||||
diff -u libmagic.orig/strcasestr.c libmagic/strcasestr.c
|
||||
--- libmagic.orig/strcasestr.c 2016-01-25 11:31:21.494017704 +0800
|
||||
+++ libmagic/strcasestr.c 2016-01-25 11:31:32.678017695 +0800
|
||||
--- libmagic.orig/strcasestr.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/strcasestr.c 2017-04-10 11:41:14.415268021 +0800
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
#include "file.h"
|
||||
|
||||
@@ -80,6 +80,10 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.230 2015/01/02 21:29:39 christos Exp $")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef offsetof
|
||||
#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
|
||||
#endif
|
||||
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED (void *) -1
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -325,7 +325,7 @@ dnl Various checks for GD features
|
||||
PHP_GD_FREETYPE2
|
||||
|
||||
dnl Header path
|
||||
for i in include/gd include gd ""; do
|
||||
for i in include/gd include/gd2 include gd ""; do
|
||||
test -f "$PHP_GD/$i/gd.h" && GD_INCLUDE="$PHP_GD/$i"
|
||||
done
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
#include "php.h"
|
||||
|
||||
/* This just seems unessacary */
|
||||
#if PHP_WIN32
|
||||
#ifdef PHP_WIN32
|
||||
#define ENABLE_GD_TTF
|
||||
#else
|
||||
#include <php_config.h>
|
||||
|
||||
@@ -147,6 +147,9 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */
|
||||
int haveGlobalColormap;
|
||||
gdImagePtr im = 0;
|
||||
|
||||
memset(ColorMap, 0, 3 * MAXCOLORMAPSIZE);
|
||||
memset(localColorMap, 0, 3 * MAXCOLORMAPSIZE);
|
||||
|
||||
/*1.4//imageNumber = 1; */
|
||||
if (! ReadOK(fd,buf,6)) {
|
||||
return 0;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #74435 (Buffer over-read into uninitialized memory)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreatefromgif(__DIR__ . DIRECTORY_SEPARATOR . 'bug74435.gif');
|
||||
var_dump($im);
|
||||
$width = imagesx($im);
|
||||
$height = imagesy($im);
|
||||
for ($i = 0; $i < $width; $i += 16) {
|
||||
for ($j = 0; $j < $height; $j += 16) {
|
||||
if (($index = imagecolorat($im, $i, $j)) >= 2) {
|
||||
list($red, $green, $blue, $alpha) = array_values(imagecolorsforindex($im, $index));
|
||||
if ($red !== 0 || $green !== 0 || $blue !== 0 || $alpha !== 0) {
|
||||
echo "unexpected color at ($i, $j)\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
resource(%d) of type (gd)
|
||||
===DONE===
|
||||
@@ -30,7 +30,6 @@ if test "$PHP_GETTEXT" != "no"; then
|
||||
AC_MSG_ERROR(Unable to find required gettext library)
|
||||
])
|
||||
)
|
||||
LDFLAGS=$O_LDFLAGS
|
||||
|
||||
AC_DEFINE(HAVE_LIBINTL,1,[ ])
|
||||
PHP_NEW_EXTENSION(gettext, gettext.c, $ext_shared)
|
||||
@@ -46,5 +45,6 @@ if test "$PHP_GETTEXT" != "no"; then
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext, [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])])
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext, [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])])
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset, [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
|
||||
LDFLAGS=$O_LDFLAGS
|
||||
|
||||
fi
|
||||
@@ -88,6 +88,10 @@ ZEND_BEGIN_ARG_INFO_EX( collator_sort_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, flags )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( collator_sort_with_sort_keys_args, 0, 0, 1 )
|
||||
ZEND_ARG_ARRAY_INFO( 1, arr, 0 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Collator_class_functions
|
||||
@@ -99,7 +103,7 @@ zend_function_entry Collator_class_functions[] = {
|
||||
ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args )
|
||||
PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), collator_sort_args )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), collator_sort_args )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), collator_sort_with_sort_keys_args )
|
||||
PHP_NAMED_FE( asort, ZEND_FN( collator_asort ), collator_sort_args )
|
||||
PHP_NAMED_FE( getAttribute, ZEND_FN( collator_get_attribute ), collator_1_arg )
|
||||
PHP_NAMED_FE( setAttribute, ZEND_FN( collator_set_attribute ), collator_2_args )
|
||||
@@ -108,7 +112,7 @@ zend_function_entry Collator_class_functions[] = {
|
||||
PHP_NAMED_FE( getLocale, ZEND_FN( collator_get_locale ), collator_1_arg )
|
||||
PHP_NAMED_FE( getErrorCode, ZEND_FN( collator_get_error_code ), collator_0_args )
|
||||
PHP_NAMED_FE( getErrorMessage, ZEND_FN( collator_get_error_message ), collator_0_args )
|
||||
PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), collator_2_args )
|
||||
PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), collator_1_arg )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -125,6 +125,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
}
|
||||
|
||||
if (millis) {
|
||||
php_date_obj *datetime;
|
||||
|
||||
ZVAL_STRING(&zfuncname, "getTimestamp");
|
||||
if (call_user_function(NULL, z, &zfuncname, &retval, 0, NULL)
|
||||
!= SUCCESS || Z_TYPE(retval) != IS_LONG) {
|
||||
@@ -137,7 +139,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
*millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval);
|
||||
datetime = Z_PHPDATE_P(z);
|
||||
*millis = U_MILLIS_PER_SECOND * ((double)Z_LVAL(retval) + datetime->time->f);
|
||||
zval_ptr_dtor(&zfuncname);
|
||||
}
|
||||
|
||||
@@ -145,8 +148,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
php_date_obj *datetime;
|
||||
datetime = Z_PHPDATE_P(z);
|
||||
if (!datetime->time) {
|
||||
spprintf(&message, 0, "%s: the DateTime object is not properly "
|
||||
"initialized", func);
|
||||
spprintf(&message, 0, "%s: the %s object is not properly "
|
||||
"initialized", func, ZSTR_VAL(Z_OBJCE_P(z)->name));
|
||||
intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
message, 1);
|
||||
efree(message);
|
||||
@@ -205,7 +208,7 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
|
||||
rv = U_MILLIS_PER_SECOND * Z_DVAL_P(z);
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (instanceof_function(Z_OBJCE_P(z), php_date_get_date_ce())) {
|
||||
if (instanceof_function(Z_OBJCE_P(z), php_date_get_interface_ce())) {
|
||||
intl_datetime_decompose(z, &rv, NULL, err, func);
|
||||
} else if (instanceof_function(Z_OBJCE_P(z), Calendar_ce_ptr)) {
|
||||
Calendar_object *co = Z_INTL_CALENDAR_P(z);
|
||||
@@ -228,7 +231,7 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
|
||||
} else {
|
||||
/* TODO: try with cast(), get() to obtain a number */
|
||||
spprintf(&message, 0, "%s: invalid object type for date/time "
|
||||
"(only IntlCalendar and DateTime permitted)", func);
|
||||
"(only IntlCalendar and DateTimeInterface permitted)", func);
|
||||
intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
message, 1);
|
||||
efree(message);
|
||||
|
||||
@@ -38,26 +38,34 @@ zend_class_entry *Locale_ce_ptr = NULL;
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_0_args, 0, 0, 0 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_1_arg, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_arg_locale, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_2_args, 0, 0, 2 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_accept_from_http_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, header )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_3_args, 0, 0, 3 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_ARG_INFO( 0, arg3 )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_compose_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, subtags )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_4_args, 0, 0, 4 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_ARG_INFO( 0, arg3 )
|
||||
ZEND_ARG_INFO( 0, arg4 )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_2_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_ARG_INFO( 0, in_locale )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_filter_matches_args, 0, 0, 2 )
|
||||
ZEND_ARG_INFO( 0, langtag )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_ARG_INFO( 0, canonicalize )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_lookup_args, 0, 0, 2 )
|
||||
ZEND_ARG_INFO( 0, langtag )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_ARG_INFO( 0, canonicalize )
|
||||
ZEND_ARG_INFO( 0, default )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
@@ -68,23 +76,23 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
zend_function_entry Locale_class_functions[] = {
|
||||
ZEND_FENTRY( getDefault, zif_locale_get_default , locale_0_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( setDefault, zif_locale_set_default , locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getScript, ZEND_FN( locale_get_script ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getRegion, ZEND_FN( locale_get_region ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getKeywords, ZEND_FN( locale_get_keywords ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( setDefault, zif_locale_set_default , locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getScript, ZEND_FN( locale_get_script ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getRegion, ZEND_FN( locale_get_region ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getKeywords, ZEND_FN( locale_get_keywords ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayScript, ZEND_FN( locale_get_display_script ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayRegion, ZEND_FN( locale_get_display_region ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayName, ZEND_FN( locale_get_display_name ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayLanguage, ZEND_FN( locale_get_display_language ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayVariant, ZEND_FN( locale_get_display_variant ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( composeLocale, ZEND_FN( locale_compose ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( parseLocale, ZEND_FN( locale_parse ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getAllVariants, ZEND_FN( locale_get_all_variants ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( filterMatches, ZEND_FN( locale_filter_matches ), locale_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( lookup, ZEND_FN( locale_lookup ), locale_4_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( canonicalize, ZEND_FN( locale_canonicalize ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( acceptFromHttp, ZEND_FN( locale_accept_from_http ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( composeLocale, ZEND_FN( locale_compose ), locale_compose_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( parseLocale, ZEND_FN( locale_parse ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getAllVariants, ZEND_FN( locale_get_all_variants ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( filterMatches, ZEND_FN( locale_filter_matches ), locale_filter_matches_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( lookup, ZEND_FN( locale_lookup ), locale_lookup_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( canonicalize, ZEND_FN( locale_canonicalize ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( acceptFromHttp, ZEND_FN( locale_accept_from_http ), locale_accept_from_http_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -110,6 +110,7 @@ PHP_FUNCTION( msgfmt_parse_message )
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN(slocale_len);
|
||||
memset(mfo, 0, sizeof(*mfo));
|
||||
msgformat_data_init(&mfo->mf_data);
|
||||
|
||||
|
||||
@@ -29,10 +29,9 @@ zend_class_entry *Normalizer_ce_ptr = NULL;
|
||||
|
||||
/* {{{ Normalizer methods arguments info */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_ARG_INFO( 0, arg3 )
|
||||
ZEND_BEGIN_ARG_INFO_EX( normalizer_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, input )
|
||||
ZEND_ARG_INFO( 0, form )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
@@ -42,8 +41,8 @@ ZEND_END_ARG_INFO()
|
||||
*/
|
||||
|
||||
zend_function_entry Normalizer_class_functions[] = {
|
||||
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
+7
-2
@@ -154,6 +154,11 @@ ZEND_BEGIN_ARG_INFO_EX(collator_sort_args, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, sort_flags)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(collator_sort_with_sort_keys_args, 0, 0, 2)
|
||||
ZEND_ARG_OBJ_INFO(0, coll, Collator, 0)
|
||||
ZEND_ARG_ARRAY_INFO(1, arr, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_arginfo, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, formatter)
|
||||
ZEND_ARG_INFO(0, string)
|
||||
@@ -629,12 +634,12 @@ zend_function_entry intl_functions[] = {
|
||||
PHP_FE( collator_get_strength, collator_0_args )
|
||||
PHP_FE( collator_set_strength, collator_1_arg )
|
||||
PHP_FE( collator_sort, collator_sort_args )
|
||||
PHP_FE( collator_sort_with_sort_keys, collator_sort_args )
|
||||
PHP_FE( collator_sort_with_sort_keys, collator_sort_with_sort_keys_args )
|
||||
PHP_FE( collator_asort, collator_sort_args )
|
||||
PHP_FE( collator_get_locale, collator_1_arg )
|
||||
PHP_FE( collator_get_error_code, collator_0_args )
|
||||
PHP_FE( collator_get_error_message, collator_0_args )
|
||||
PHP_FE( collator_get_sort_key, collator_2_args )
|
||||
PHP_FE( collator_get_sort_key, collator_1_arg )
|
||||
|
||||
/* formatter functions */
|
||||
PHP_FE( numfmt_create, arginfo_numfmt_create )
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #74230 iconv fails to fail on surrogates
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded('iconv')) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$high = "\xED\xa1\x92"; // codepoint D852
|
||||
$low = "\xED\xBD\xA2"; // codepoint DF62
|
||||
$pair = $high.$low;
|
||||
var_dump(
|
||||
@\iconv('UTF-8', 'UTF-8', $high) === false,
|
||||
@\iconv('UTF-8', 'UTF-8', $low) === false,
|
||||
@\iconv('UTF-8', 'UTF-8', $pair) === false
|
||||
);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #74298 (IntlDateFormatter->format() doesn't return microseconds/fractions)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump((new \DateTime('2017-01-01 01:02:03.123456'))->format('Y-m-d\TH:i:s.u'));
|
||||
|
||||
var_dump((new \IntlDateFormatter(
|
||||
'en-US',
|
||||
\IntlDateFormatter::FULL,
|
||||
\IntlDateFormatter::FULL,
|
||||
'UTC',
|
||||
\IntlDateFormatter::GREGORIAN,
|
||||
'yyyy-MM-dd HH:mm:ss.SSSSSS'
|
||||
))->format(new \DateTime('2017-01-01 01:02:03.123456', new \DateTimeZone('UTC'))));
|
||||
|
||||
var_dump(datefmt_create(
|
||||
'en-US',
|
||||
\IntlDateFormatter::FULL,
|
||||
\IntlDateFormatter::FULL,
|
||||
'UTC',
|
||||
\IntlDateFormatter::GREGORIAN,
|
||||
'yyyy-MM-dd HH:mm:ss.SSSSSS'
|
||||
)->format(new \DateTime('2017-01-01 01:02:03.123456', new \DateTimeZone('UTC'))));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(26) "2017-01-01T01:02:03.123456"
|
||||
string(26) "2017-01-01 01:02:03.123000"
|
||||
string(26) "2017-01-01 01:02:03.123000"
|
||||
Loaded 100 of 375 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user