mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 11:10:49 +00:00
Compare commits
608
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1749f34d99 | ||
|
|
1ff15e8260 | ||
|
|
0ff050f076 | ||
|
|
2689a74cee | ||
|
|
b11ad90dfc | ||
|
|
bc7d3a9484 | ||
|
|
03eb1fd623 | ||
|
|
24a764e086 | ||
|
|
7c53e81273 | ||
|
|
173069cead | ||
|
|
0902cc8651 | ||
|
|
1b3ea47dbc | ||
|
|
fb11097b06 | ||
|
|
0722818374 | ||
|
|
72e8a2ec60 | ||
|
|
e073d72618 | ||
|
|
21f74ba99e | ||
|
|
279c926f8b | ||
|
|
26eeef7599 | ||
|
|
07fde460a3 | ||
|
|
d70eefbaa0 | ||
|
|
3d1a87fb88 | ||
|
|
df9603aae0 | ||
|
|
4560601437 | ||
|
|
77972bc68a | ||
|
|
877cdf6862 | ||
|
|
75b081d0d1 | ||
|
|
f9a2648d61 | ||
|
|
8a0fc77582 | ||
|
|
7a67e94f17 | ||
|
|
2826401afe | ||
|
|
b51bb4132f | ||
|
|
281fb1f2ed | ||
|
|
fbdf0ba4e5 | ||
|
|
311e37c4b1 | ||
|
|
e0beb2850f | ||
|
|
c66894df94 | ||
|
|
460b6552cd | ||
|
|
e12dba474e | ||
|
|
39de96fa50 | ||
|
|
ac0fc54ec4 | ||
|
|
7446484181 | ||
|
|
bc80465549 | ||
|
|
84ce97f43d | ||
|
|
9ed3965300 | ||
|
|
fbde968865 | ||
|
|
5673f9f2c1 | ||
|
|
22f994ad4e | ||
|
|
701c5a64a4 | ||
|
|
3e82b3d3ae | ||
|
|
40607b254a | ||
|
|
0d56cd2dfc | ||
|
|
90f9f11fbe | ||
|
|
6686c41e3d | ||
|
|
d9204dbce2 | ||
|
|
d6b86e9d4d | ||
|
|
d2bb47958f | ||
|
|
d8b835620c | ||
|
|
3d8b5526af | ||
|
|
c22036851a | ||
|
|
958fcd4c65 | ||
|
|
572b3f83a3 | ||
|
|
f358f96deb | ||
|
|
d5e2d221cd | ||
|
|
bec4b5a45e | ||
|
|
42066c72d1 | ||
|
|
574d2c8987 | ||
|
|
c9f76fb96f | ||
|
|
22851007ca | ||
|
|
2b251dc603 | ||
|
|
dddacf337a | ||
|
|
f4cc20d972 | ||
|
|
c139ff0ae1 | ||
|
|
d65d363741 | ||
|
|
6f24d39212 | ||
|
|
fa0e88725c | ||
|
|
50e05895c0 | ||
|
|
dfd31ff703 | ||
|
|
0d3534ac1d | ||
|
|
0f50210635 | ||
|
|
a46b6655a4 | ||
|
|
bb592b40ab | ||
|
|
29023692ce | ||
|
|
bb80704332 | ||
|
|
f38c96e85f | ||
|
|
aea970fbc2 | ||
|
|
8c6eedb868 | ||
|
|
682f0c5343 | ||
|
|
d3376cb591 | ||
|
|
8c5fafcdb9 | ||
|
|
88dbe358e0 | ||
|
|
83308cedf9 | ||
|
|
614d00ca89 | ||
|
|
9bb9f270fa | ||
|
|
1bedb57dd4 | ||
|
|
c18fd01775 | ||
|
|
7e2f15eb3a | ||
|
|
36b9272e3c | ||
|
|
cac8a72989 | ||
|
|
d7a80059bb | ||
|
|
a3de4d224a | ||
|
|
ea70058067 | ||
|
|
c7411c2c96 | ||
|
|
3c01491e89 | ||
|
|
edd46ec6f7 | ||
|
|
13c8beed63 | ||
|
|
ffef452b62 | ||
|
|
63130eadc0 | ||
|
|
b0419a1ef1 | ||
|
|
058a282133 | ||
|
|
ab5e85b27d | ||
|
|
6d6138d9d9 | ||
|
|
839b81668c | ||
|
|
ea1453a741 | ||
|
|
00772abea5 | ||
|
|
b42da54e51 | ||
|
|
ef15af78dd | ||
|
|
c5b45f2281 | ||
|
|
df7f836d31 | ||
|
|
9d052f239f | ||
|
|
482d6ad927 | ||
|
|
f2445bd57a | ||
|
|
a054d74c4a | ||
|
|
779adcc113 | ||
|
|
347fa0eb1b | ||
|
|
ac10dfa0ce | ||
|
|
def82c26f2 | ||
|
|
9ecba09de6 | ||
|
|
be8c7c0988 | ||
|
|
695b43a535 | ||
|
|
1ba7b093a6 | ||
|
|
930a8feb66 | ||
|
|
c6aca784f9 | ||
|
|
7c76add7fe | ||
|
|
736f29a9a9 | ||
|
|
c644ba688b | ||
|
|
07fe6986cc | ||
|
|
8290469bd6 | ||
|
|
fc53f0b6ea | ||
|
|
3591f8b356 | ||
|
|
5e5e4293c3 | ||
|
|
2d36d06f35 | ||
|
|
77f82b1401 | ||
|
|
378bd3060e | ||
|
|
f4d34bb28e | ||
|
|
2f29a1240e | ||
|
|
ea8aea176a | ||
|
|
29b9bddb0c | ||
|
|
f848fb0fa1 | ||
|
|
1d608d09f2 | ||
|
|
07c3dbdc8c | ||
|
|
7fc67ed4a9 | ||
|
|
98e3ad366a | ||
|
|
f7ced2b8af | ||
|
|
416679fae5 | ||
|
|
192e130e52 | ||
|
|
cc6e678224 | ||
|
|
94e5be1bdc | ||
|
|
930fad7381 | ||
|
|
3e32e77243 | ||
|
|
756ab17389 | ||
|
|
4c3bc2ab43 | ||
|
|
e173d61581 | ||
|
|
250fec018a | ||
|
|
dcba47f8dc | ||
|
|
a27ca9810a | ||
|
|
b0ab190e62 | ||
|
|
3f9d6e9d7c | ||
|
|
acecc06940 | ||
|
|
a04ec69406 | ||
|
|
3b7b54ac68 | ||
|
|
7922a83ac0 | ||
|
|
617a8855b8 | ||
|
|
dc710ce12f | ||
|
|
77bce434a0 | ||
|
|
e486197f1e | ||
|
|
a5e30d595f | ||
|
|
d1eb03eec7 | ||
|
|
21490362dd | ||
|
|
93d952884d | ||
|
|
e18c762764 | ||
|
|
48d1b3a51a | ||
|
|
334e8973db | ||
|
|
d3bf8e3016 | ||
|
|
340bd30aa6 | ||
|
|
9fca0051a6 | ||
|
|
44c184862b | ||
|
|
51466116c0 | ||
|
|
705f67c884 | ||
|
|
6928982fb3 | ||
|
|
8b969f44d7 | ||
|
|
a29aef485a | ||
|
|
8d88e230fc | ||
|
|
baccc9b2e9 | ||
|
|
c49953a8f6 | ||
|
|
08a1795767 | ||
|
|
4fc1246d11 | ||
|
|
047bda3cb8 | ||
|
|
8d916b2ec6 | ||
|
|
bb9e8e6924 | ||
|
|
f432258b02 | ||
|
|
1b0d1d6bcb | ||
|
|
c9e4d5b668 | ||
|
|
8767f16ff3 | ||
|
|
f31c8fb4aa | ||
|
|
68a04f616b | ||
|
|
6a2fe2ad1a | ||
|
|
0e91f80a4d | ||
|
|
0e306ec3bc | ||
|
|
c31e0c803e | ||
|
|
8d7590996d | ||
|
|
4768b28fb1 | ||
|
|
a82df14bef | ||
|
|
7d46d0480e | ||
|
|
867546efca | ||
|
|
739c75b050 | ||
|
|
0621602408 | ||
|
|
f87643038f | ||
|
|
e0f657a729 | ||
|
|
9973dfd839 | ||
|
|
35f7c44a7d | ||
|
|
d896ea0b9a | ||
|
|
0f6f3c4771 | ||
|
|
2976c867a1 | ||
|
|
208d8e75f1 | ||
|
|
eff30bdfcb | ||
|
|
4045a51376 | ||
|
|
043c66806a | ||
|
|
78253b53e3 | ||
|
|
09b63f25d8 | ||
|
|
338d7dbca0 | ||
|
|
736efdcfc1 | ||
|
|
7429cd2181 | ||
|
|
5adf804213 | ||
|
|
9c16e1d9d2 | ||
|
|
fcec48fcc2 | ||
|
|
5feb5e5a89 | ||
|
|
8e87cdf7ac | ||
|
|
661569eba6 | ||
|
|
c073b42ba2 | ||
|
|
64fcd3b4e1 | ||
|
|
6843a38b2c | ||
|
|
7b952b33c6 | ||
|
|
177c1f128b | ||
|
|
a1a1249753 | ||
|
|
27fbfa3d08 | ||
|
|
16021cb6e3 | ||
|
|
f6221397ac | ||
|
|
d4523d6678 | ||
|
|
3e92d040f6 | ||
|
|
b66673da7d | ||
|
|
4237bea6fe | ||
|
|
afc82532cc | ||
|
|
bef0a451e3 | ||
|
|
73042afe10 | ||
|
|
2f2a0d8259 | ||
|
|
8b603dfa07 | ||
|
|
32f7c6a42d | ||
|
|
5bade4dcab | ||
|
|
af17616e0e | ||
|
|
47d935664a | ||
|
|
487e14d89c | ||
|
|
e5a7ea3293 | ||
|
|
5e95dc593a | ||
|
|
619b8bb5ea | ||
|
|
4273a9b4dc | ||
|
|
df9dc12b1e | ||
|
|
3a4b2c8437 | ||
|
|
9cd9d67790 | ||
|
|
33addf0ac5 | ||
|
|
f289abf4d7 | ||
|
|
9370d047ef | ||
|
|
87ddfb9fbd | ||
|
|
763eda2f57 | ||
|
|
eff8a93ded | ||
|
|
842b350891 | ||
|
|
d7064d84cb | ||
|
|
c1b5abf605 | ||
|
|
e6f7b32deb | ||
|
|
fe49acfcb9 | ||
|
|
10b69e0f0f | ||
|
|
31458c1a0d | ||
|
|
64125d247f | ||
|
|
0f6e281034 | ||
|
|
03f74b711e | ||
|
|
8f037b3fe4 | ||
|
|
11900b10a3 | ||
|
|
929a21247c | ||
|
|
772cf98e95 | ||
|
|
6a4057d932 | ||
|
|
a86756745c | ||
|
|
0caab530d5 | ||
|
|
1d7f071044 | ||
|
|
2dd8e6ec27 | ||
|
|
071deec12a | ||
|
|
114982b068 | ||
|
|
9b04ebc3c8 | ||
|
|
914437fd97 | ||
|
|
7d5fe7701b | ||
|
|
88bce658af | ||
|
|
6a2daa2673 | ||
|
|
01d4ee611e | ||
|
|
972a2192f4 | ||
|
|
77494520a4 | ||
|
|
56ed148d64 | ||
|
|
098c1b5397 | ||
|
|
c5ff10fdc9 | ||
|
|
6dc4be7100 | ||
|
|
667a563da0 | ||
|
|
e4c744789d | ||
|
|
da2f2ab130 | ||
|
|
fe30db5faf | ||
|
|
b1b7471f73 | ||
|
|
d4979adb80 | ||
|
|
b886771f69 | ||
|
|
7b668c6a7d | ||
|
|
21482dd1e6 | ||
|
|
3062692e49 | ||
|
|
2450cf4c0f | ||
|
|
f45b732abf | ||
|
|
bc053b7628 | ||
|
|
42eaadd128 | ||
|
|
331c423dbe | ||
|
|
e624492e40 | ||
|
|
70063c1195 | ||
|
|
69378b449c | ||
|
|
6e1fad3505 | ||
|
|
a1ee496a50 | ||
|
|
8555d34ba5 | ||
|
|
77e07a631a | ||
|
|
e83e18b8f8 | ||
|
|
9a4918af76 | ||
|
|
72daf80c47 | ||
|
|
500d715ed3 | ||
|
|
20cc5b498f | ||
|
|
ebdf8d3637 | ||
|
|
55612e2b06 | ||
|
|
279f79570d | ||
|
|
a1672ca3e2 | ||
|
|
d0c05b2643 | ||
|
|
b94207ccb8 | ||
|
|
3a6cac2e6c | ||
|
|
244b57f272 | ||
|
|
81d5bba936 | ||
|
|
5b9e18dd61 | ||
|
|
79b6a241ab | ||
|
|
1fd9b3f536 | ||
|
|
2781ddf65e | ||
|
|
42a2c5308e | ||
|
|
6f44413558 | ||
|
|
6d8afbca87 | ||
|
|
16e6e2f04a | ||
|
|
345ae37686 | ||
|
|
0e8700167a | ||
|
|
2712eb9b31 | ||
|
|
c901678ab1 | ||
|
|
cb2b9fcf8b | ||
|
|
26d7d2519d | ||
|
|
1cd7ce6cf8 | ||
|
|
8b0cd10768 | ||
|
|
84c5066dec | ||
|
|
7489a81e38 | ||
|
|
f26f786362 | ||
|
|
9915046344 | ||
|
|
85b00d1dd4 | ||
|
|
02f8e3770d | ||
|
|
fbb885cd6c | ||
|
|
26f13b4b70 | ||
|
|
e08c90c68d | ||
|
|
43709499f9 | ||
|
|
6057b04dd0 | ||
|
|
a1311b8bc2 | ||
|
|
b9ab70c0d2 | ||
|
|
b28b6977bf | ||
|
|
cf273715fb | ||
|
|
e249e02481 | ||
|
|
e0e1648359 | ||
|
|
02fc0f0255 | ||
|
|
969e64ad33 | ||
|
|
8df7dc9693 | ||
|
|
476aa6b90d | ||
|
|
1dd367b62d | ||
|
|
23cea0a4df | ||
|
|
5dd6078c14 | ||
|
|
ec9c01b2b2 | ||
|
|
78acd746d4 | ||
|
|
718da04673 | ||
|
|
b6c6759799 | ||
|
|
d9535fbf69 | ||
|
|
dda8d74cb5 | ||
|
|
1ce390f2c2 | ||
|
|
adf6be4bfb | ||
|
|
ddcb5042f5 | ||
|
|
c078127291 | ||
|
|
fecf5bc681 | ||
|
|
108d9dd8e7 | ||
|
|
09eebe78d8 | ||
|
|
59b98545e8 | ||
|
|
843d6eecc3 | ||
|
|
cf4e80bd50 | ||
|
|
2184c092d4 | ||
|
|
70143b88a2 | ||
|
|
840e508dc6 | ||
|
|
c530921598 | ||
|
|
22a0734469 | ||
|
|
ecc135ae21 | ||
|
|
17d4ecdbb1 | ||
|
|
7305654b69 | ||
|
|
51a01a9a6d | ||
|
|
874a609723 | ||
|
|
461e12bb47 | ||
|
|
d235cfb948 | ||
|
|
fbca704073 | ||
|
|
a948a2605d | ||
|
|
9ce5ea020f | ||
|
|
635ce992a6 | ||
|
|
7d8a27b3d1 | ||
|
|
4331f57597 | ||
|
|
e36ce120ae | ||
|
|
68fb7a1252 | ||
|
|
d3aa5682b1 | ||
|
|
96fe692335 | ||
|
|
9c51f3c841 | ||
|
|
d2f478af6a | ||
|
|
ec1e964f5c | ||
|
|
2b667e86f2 | ||
|
|
4fafb9bddc | ||
|
|
99487f9ce3 | ||
|
|
990de890fa | ||
|
|
41e64a728c | ||
|
|
8673660619 | ||
|
|
c7b3bc0d99 | ||
|
|
b54305bc7d | ||
|
|
cffe7a2d3c | ||
|
|
20de4ba98f | ||
|
|
4ca3f3b99a | ||
|
|
fbc897f4bb | ||
|
|
16fb63384c | ||
|
|
69bbae848e | ||
|
|
71a5d27676 | ||
|
|
e6087a0548 | ||
|
|
157856f0d0 | ||
|
|
f3549c2276 | ||
|
|
721be7f87c | ||
|
|
8a1172fe8f | ||
|
|
9df7af2326 | ||
|
|
e1fdf15fee | ||
|
|
00fb7be378 | ||
|
|
273b3b8ac0 | ||
|
|
65c908dcfe | ||
|
|
5b603fb1b7 | ||
|
|
2975bbb347 | ||
|
|
56f7e28f5d | ||
|
|
f4617349f8 | ||
|
|
8fc55787d5 | ||
|
|
51619fa391 | ||
|
|
0bccc60ec2 | ||
|
|
9f0c8398d6 | ||
|
|
02c937c251 | ||
|
|
9609669572 | ||
|
|
b56b2d3013 | ||
|
|
0a0f24f8bf | ||
|
|
a256d977ff | ||
|
|
198a9af479 | ||
|
|
6074163f74 | ||
|
|
9a58cb0b3c | ||
|
|
596f8bf885 | ||
|
|
fc2cf6e19f | ||
|
|
b2f1de8924 | ||
|
|
a8c4bc3257 | ||
|
|
26da69af35 | ||
|
|
72c5f9c02d | ||
|
|
6732d3f170 | ||
|
|
5a70cfb8d7 | ||
|
|
1cd238a5df | ||
|
|
9132607dc7 | ||
|
|
c1bb953c71 | ||
|
|
79301a3677 | ||
|
|
764f6144d3 | ||
|
|
c55fc5cfa4 | ||
|
|
cf6ae88c42 | ||
|
|
c4bc06b480 | ||
|
|
4c65f7b0a2 | ||
|
|
b3a2fffb83 | ||
|
|
d2f21677d5 | ||
|
|
a640702789 | ||
|
|
6cd3a97ce2 | ||
|
|
32b6c60dea | ||
|
|
d3d8886e3e | ||
|
|
4b898c5e57 | ||
|
|
26e2d61588 | ||
|
|
a583cad157 | ||
|
|
c4fa4d5361 | ||
|
|
50db74684d | ||
|
|
8c9e028a76 | ||
|
|
44e82f5789 | ||
|
|
fba1e9d0c5 | ||
|
|
b3abcd8a34 | ||
|
|
76a95184ef | ||
|
|
8063c11142 | ||
|
|
70c5d7fcb5 | ||
|
|
6e79f8f999 | ||
|
|
8df7662306 | ||
|
|
c29dac2f32 | ||
|
|
fa6c5d5429 | ||
|
|
e9b91783c2 | ||
|
|
92512da2b0 | ||
|
|
a806380376 | ||
|
|
a0e34ecfee | ||
|
|
0f3bde23fd | ||
|
|
9d3385ff08 | ||
|
|
bb1840dcf9 | ||
|
|
e3fbf25a02 | ||
|
|
4b7d16ec33 | ||
|
|
c7d2788311 | ||
|
|
d01d7450a7 | ||
|
|
908b6e7808 | ||
|
|
20eb83c3fe | ||
|
|
d89a570ad0 | ||
|
|
cafbf45c13 | ||
|
|
670ed18df4 | ||
|
|
86cf005ca2 | ||
|
|
1d30a554a4 | ||
|
|
e4f6cab2c3 | ||
|
|
3bf703845f | ||
|
|
032d0355e7 | ||
|
|
e8d5d67ff2 | ||
|
|
fcef7403cf | ||
|
|
daf04269f5 | ||
|
|
f73f5c1aa5 | ||
|
|
6c7ae8825d | ||
|
|
4d478c9b67 | ||
|
|
c6822cd936 | ||
|
|
f6b00dcf5b | ||
|
|
c36ea5eb07 | ||
|
|
9af8ebe9c7 | ||
|
|
88d4da5097 | ||
|
|
58be64ce2b | ||
|
|
fa6ab4ca82 | ||
|
|
fc4cfc3c83 | ||
|
|
fbbbd2b334 | ||
|
|
845e9001b3 | ||
|
|
e5f281acf1 | ||
|
|
3a37e3f5eb | ||
|
|
8a346e1257 | ||
|
|
fe5e6c081e | ||
|
|
3ffd3e8b8c | ||
|
|
8fde9d7701 | ||
|
|
05b2a03297 | ||
|
|
c54c42dcf3 | ||
|
|
029a4c8213 | ||
|
|
f5bf8c94f7 | ||
|
|
8e23d68942 | ||
|
|
b6e7b8e09a | ||
|
|
0685a79356 | ||
|
|
6bec04b0a3 | ||
|
|
18da1a2ff4 | ||
|
|
ba307b2aff | ||
|
|
6a7f02001d | ||
|
|
ab211d72a3 | ||
|
|
3946b4727b | ||
|
|
3a30d703c0 | ||
|
|
ad86c485cd | ||
|
|
597adbfef1 | ||
|
|
2d2ad8e8d3 | ||
|
|
f2c9167ebb | ||
|
|
0ccb772f10 | ||
|
|
138a1160ab | ||
|
|
e9da49eaf5 | ||
|
|
64de2d2d45 | ||
|
|
1f4fa0ba1f | ||
|
|
1d943ee85e | ||
|
|
5c605854b8 | ||
|
|
11d09ac646 | ||
|
|
269aac9ee9 | ||
|
|
7204e7ba5a | ||
|
|
59dde7cbeb | ||
|
|
11a13337ff | ||
|
|
8649483a69 | ||
|
|
d9b443095f | ||
|
|
9db0be61ad | ||
|
|
29c12bd254 | ||
|
|
ef1f2c1b7b | ||
|
|
1e20b1ed7d | ||
|
|
9d700f942f | ||
|
|
35ca4a5cb4 | ||
|
|
fdb9b9d8c8 | ||
|
|
a1f0e80436 | ||
|
|
1e29c1716d | ||
|
|
7788b67557 | ||
|
|
5baa766b21 | ||
|
|
60d622bdb0 | ||
|
|
63ca897356 | ||
|
|
b584600e1d | ||
|
|
52127174e2 | ||
|
|
a548d2f19b | ||
|
|
edf54b5468 | ||
|
|
8611785073 | ||
|
|
8f6f281866 | ||
|
|
a9f2587716 | ||
|
|
5f7df8099a | ||
|
|
b615180021 | ||
|
|
7a4f2f9a00 | ||
|
|
339414deea | ||
|
|
98f4d8c5f6 | ||
|
|
e8795126ea | ||
|
|
d80a51181a | ||
|
|
cb9be83c31 |
No files matched your search
+15
-37
@@ -11,7 +11,7 @@ all: $(all_targets)
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@echo
|
||||
|
||||
build-modules: $(PHP_MODULES)
|
||||
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
|
||||
|
||||
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||
@@ -73,6 +73,11 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
for i in $(PHP_MODULES)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
|
||||
done; \
|
||||
fi; \
|
||||
if test "x$(PHP_ZEND_EX)" != "x"; then \
|
||||
for i in $(PHP_ZEND_EX)""; do \
|
||||
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
|
||||
done; \
|
||||
fi`
|
||||
|
||||
test: all
|
||||
@@ -80,50 +85,23 @@ test: all
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -U -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
|
||||
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
|
||||
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
|
||||
if test "$$INI_SCANNED_PATH"; then \
|
||||
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
|
||||
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -U -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
utest: all
|
||||
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
ntest: all
|
||||
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
@@ -1,50 +1,323 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
03 Apr 2008, PHP 5.2.6RC4
|
||||
- Fixed possible stack buffer overflow in FastCGI SAPI. (Andrei Nigmatulin)
|
||||
- Fixed sending of uninitialized paddings which may contain some information.
|
||||
(Andrei Nigmatulin)
|
||||
- Fixed bug #44613 (Crash inside imap_headerinfo()). (Ilia, jmessa)
|
||||
- Fixed bug #44594 (imap_open() does not validate # of retries parameter).
|
||||
(Ilia)
|
||||
- Fixed bug #44557 (Crash in imap_setacl when supplied integer as username)
|
||||
(Thomas Jarosch)
|
||||
08 Dec 2008, PHP 5.2.8
|
||||
- Reverted bug fix #42718 that broke magic_quotes_gpc (Scott)
|
||||
|
||||
27 Mar 2008, PHP 5.2.6RC3
|
||||
- Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia,
|
||||
Stefan Esser)
|
||||
- Fix integer overflow in printf(). (Stas, Maksymilian Aciemowicz)
|
||||
- Fixed bug #44487 (call_user_method_array issues a warning when throwing
|
||||
an exception). (David Soria Parra)
|
||||
- Fixed bug #44478 (Inconsistent behaviour when assigning new nodes).
|
||||
(Rob, Felipe)
|
||||
- Fixed bug #44445 (email validator does not handle domains starting/ending
|
||||
with a -). (Ilia)
|
||||
- Fixed bug #44440 (st_blocks undefined under BeOS). (Felipe)
|
||||
- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
|
||||
- Fixed bug #44388 (Crash inside exif_read_data() on invalid images) (Ilia)
|
||||
- Fixed bug #44373 (PDO_OCI extension compile failed). (Felipe)
|
||||
- Fixed bug #43677 (Inconsistent behaviour of include_path set with
|
||||
php_value). (manuel at mausz dot at)
|
||||
- Fixed bug #43614 (incorrect processing of numerical string keys of array in
|
||||
arbitrary serialized data). (Dmitriy Buldakov, Felipe)
|
||||
- Fixed bug #42177 (Warning "array_merge_recursive(): recursion detected" comes
|
||||
again...). (Felipe)
|
||||
- Fixed bug #41828 (Failing to call RecursiveIteratorIterator::__construct()
|
||||
causes a sefault). (Etienne)
|
||||
04 Dec 2008, PHP 5.2.7
|
||||
- Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371) (Ilia)
|
||||
- Updated timezone database to version 2008.9. (Derick)
|
||||
- Upgraded bundled libzip to 0.9.0. (Pierre)
|
||||
|
||||
06 Mar 2008, PHP 5.2.6RC2
|
||||
- Fixed bug #44333 (SEGFAULT when using mysql_pconnect() with client_flags).
|
||||
- Added logging option for error_log to send directly to SAPI. (Stas)
|
||||
- Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
|
||||
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. (Pierre)
|
||||
- Added "PHP_INI_SCAN_DIR" environment variable which can be used to
|
||||
either disable or change the compile time ini scan directory (FR #45114).
|
||||
(Jani)
|
||||
|
||||
- Fixed missing initialization of BG(page_uid) and BG(page_gid),
|
||||
reported by Maksymilian Arciemowicz. (Stas)
|
||||
- Fixed memory leak inside sqlite_create_aggregate(). (Felipe)
|
||||
- Fixed memory leak inside PDO sqlite's sqliteCreateAggregate() method.
|
||||
(Felipe)
|
||||
- Fixed a crash inside gd with invalid fonts (Fixes CVE-2008-3658). (Pierre)
|
||||
- Fixed a possible overflow inside memnstr (Fixes CVE-2008-3659).
|
||||
(LaurentGaffie)
|
||||
- Fixed incorrect php_value order for Apache configuration, reported by
|
||||
Maksymilian Arciemowicz. (Stas)
|
||||
- Fixed memory leak inside readline_callback_handler_remove() function.
|
||||
(Felipe)
|
||||
- Fixed sybase_fetch_*() to continue reading after CS_ROW_FAIL status (Timm)
|
||||
- Fixed a bug inside dba_replace() that could cause file truncation
|
||||
withinvalid keys. (Ilia)
|
||||
- Fixed memory leak inside readline_callback_handler_install() function.(Ilia)
|
||||
- Fixed memory leak inside readline_completion_function() function. (Felipe)
|
||||
- Fixed stream_get_contents() when using $maxlength and socket is notclosed.
|
||||
indeyets [at] php [dot] net on #46049. (Arnaud)
|
||||
- Fixed stream_get_line() to behave as documented on non-blocking streams.
|
||||
(Arnaud)
|
||||
- Fixed endless loop in PDOStatement::debugDumpParams().
|
||||
(jonah.harris at gmail dot com)
|
||||
- Fixed ability to use "internal" heaps in extensions. (Arnaud, Dmitry)
|
||||
- Fixed weekdays adding/subtracting algorithm. (Derick)
|
||||
- Fixed some ambiguities in the date parser. (Derick)
|
||||
- Fixed a bug with the YYYY-MM format not resetting the day correctly.
|
||||
(Derick)
|
||||
- Fixed a bug in the DateTime->modify() methods, it would not use the advanced
|
||||
relative time strings. (Derick)
|
||||
- Fixed extraction of zip files or directories when the entry name is a
|
||||
relative path. (Pierre)
|
||||
- Fixed read or write errors for large zip archives. (Pierre)
|
||||
- Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666.
|
||||
(Christian Hoffmann)
|
||||
- Fixed simplexml asXML() not to lose encoding when dumping entire
|
||||
document to file. (Ilia)
|
||||
- Fixed a crash inside PDO when trying instantiate PDORow manually.
|
||||
(Felipe)
|
||||
- Fixed build failure of ext/mysqli with libmysql 6.0 - missing
|
||||
rplfunctions. (Andrey)
|
||||
- Fixed a regression when using strip_tags() and < is within an
|
||||
attribute.(Scott)
|
||||
- Fixed a crash on invalid method in ReflectionParameter constructor.
|
||||
(Christian Seiler)
|
||||
- Reverted fix for bug #44197 due to behaviour change in minor version.
|
||||
(Felipe)
|
||||
- Fixed bug #44306 (Better detection of MIPS processors on Windows). (Ilia)
|
||||
- Fixed bug #44166 (Parameter handling flaw in PDO::getAvailableDrivers()).
|
||||
(Ilia)
|
||||
- Fixed bug #42505 (new sendmail default breaks on Netware platform)
|
||||
(Guenter Knauf)
|
||||
- Fixed bug #40013 (php_uname() does not return nodename on Netware
|
||||
(Guenter Knauf)
|
||||
|
||||
27 Feb 2008, PHP 5.2.6RC1
|
||||
- Fixed bug #46732 (mktime.year description is wrong). (Derick)
|
||||
- Fixed bug #46696 (cURL fails in upload files with specified content-type).
|
||||
(Ilia)
|
||||
- Fixed bug #46673 (stream_lock call with wrong parameter). (Arnaud)
|
||||
- Fixed bug #46649 (Setting array element with that same array produces
|
||||
inconsistent results). (Arnaud)
|
||||
- Fixed bug #46626 (mb_convert_case does not handle apostrophe correctly).
|
||||
(Ilia)
|
||||
- Fixed bug #46543 (ibase_trans() memory leaks when using wrong parameters).
|
||||
(Felipe)
|
||||
- Fixed bug #46521 (Curl ZTS OpenSSL, error in config.m4 fragment).
|
||||
(jd at cpanel dot net)
|
||||
- Fixed bug #46496 (wddx_serialize treats input as ISO-8859-1). (Mark Karpeles)
|
||||
- Fixed bug #46427 (SoapClient() stumbles over its "stream_context" parameter).
|
||||
(Dmitry, Herman Radtke)
|
||||
- Fixed bug #46426 (offset parameter of stream_get_contents() does not
|
||||
workfor "0"). (Felipe)
|
||||
- Fixed bug #46406 (Unregistering nodeclass throws E_FATAL). (Rob)
|
||||
- Fixed bug #46389 (NetWare needs small patch for _timezone).
|
||||
(patch by guenter@php.net)
|
||||
- Fixed bug #46388 (stream_notification_callback inside of object destroys
|
||||
object variables). (Felipe)
|
||||
- Fixed bug #46381 (wrong $this passed to internal methods causes segfault).
|
||||
(Tony)
|
||||
- Fixed bug #46379 (Infinite loop when parsing '#' in one line file). (Arnaud)
|
||||
- Fixed bug #46366 (bad cwd with / as pathinfo). (Dmitry)
|
||||
- Fixed bug #46360 (TCP_NODELAY constant for socket_{get,set}_option).
|
||||
(bugs at trick dot vanstaveren dot us)
|
||||
- Fixed bug #46343 (IPv6 address filter accepts invalid address). (Ilia)
|
||||
- Fixed bug #46335 (DOMText::splitText doesn't handle multibyte characters).
|
||||
(Rob)
|
||||
- Fixed bug #46323 (compilation of simplexml for NetWare breaks).
|
||||
(Patch by guenter [at] php [dot] net)
|
||||
- Fixed bug #46319 (PHP sets default Content-Type header for HTTP 304
|
||||
response code, in cgi sapi). (Ilia)
|
||||
- Fixed bug #46313 (Magic quotes broke $_FILES). (Arnaud)
|
||||
- Fixed bug #46308 (Invalid write when changing property from inside getter).
|
||||
(Dmitry)
|
||||
- Fixed bug #46292 (PDO::setFetchMode() shouldn't requires the 2nd arg when
|
||||
using FETCH_CLASSTYPE). (Felipe)
|
||||
- Fixed bug #46274, #46249 (pdo_pgsql always fill in NULL for empty BLOB and
|
||||
segfaults when returned by SELECT). (Felipe)
|
||||
- Fixed bug #46271 (local_cert option is not resolved to full path). (Ilia)
|
||||
- Fixed bug #46247 (ibase_set_event_handler() is allowing to pass callback
|
||||
without event). (Felipe)
|
||||
- Fixed bug #46246 (difference between call_user_func(array($this, $method))
|
||||
and $this->$method()). (Dmitry)
|
||||
- Fixed bug #46222 (ArrayObject EG(uninitialized_var_ptr) overwrite).
|
||||
(Etienne)
|
||||
- Fixed bug #46215 (json_encode mutates its parameter and has some
|
||||
class-specific state). (Felipe)
|
||||
- Fixed bug #46206 (pg_query_params/pg_execute convert passed values to
|
||||
strings). (Ilia)
|
||||
- Fixed bug #46191 (BC break: DOMDocument saveXML() doesn't accept null).
|
||||
(Rob)
|
||||
- Fixed bug #46164 (stream_filter_remove() closes the stream). (Arnaud)
|
||||
- Fixed bug #46157 (PDOStatement::fetchObject prototype error). (Felipe)
|
||||
- Fixed bug #46147 (after stream seek, appending stream filter reads
|
||||
incorrect data). (Greg)
|
||||
- Fixed bug #46139 (PDOStatement->setFetchMode() forgets FETCH_PROPS_LATE).
|
||||
(chsc at peytz dot dk, Felipe)
|
||||
- Fixed bug #46127 (php_openssl_tcp_sockop_accept forgets to set context
|
||||
on accepted stream) (Mark Karpeles, Pierre)
|
||||
- Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on
|
||||
multiple calls). (Ilia)
|
||||
- Fixed bug #46088 (RegexIterator::accept - segfault). (Felipe)
|
||||
- Fixed bug #46082 (stream_set_blocking() can cause a crash in some
|
||||
circumstances). (Felipe)
|
||||
- Fixed bug #46064 (Exception when creating ReflectionProperty object
|
||||
on dynamicly created property). (Felipe)
|
||||
- Fixed bug #46059 (Compile failure under IRIX 6.5.30 building posix.c).
|
||||
(Arnaud)
|
||||
- Fixed bug #46053 (SplFileObject::seek - Endless loop). (Arnaud)
|
||||
- Fixed bug #46051 (SplFileInfo::openFile - memory overlap). (Arnaud)
|
||||
- Fixed bug #46047 (SimpleXML converts empty nodes into object with
|
||||
nested array). (Rob)
|
||||
- Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud)
|
||||
- Fixed bug #46029 (Segfault in DOMText when using with Reflection). (Rob)
|
||||
- Fixed bug #46026 (bzip2.decompress/zlib.inflate filter tries to decompress
|
||||
after end of stream). (Keisial at gmail dot com, Greg)
|
||||
- Fixed bug #46024 (stream_select() doesn't return the correct number).
|
||||
(Arnaud)
|
||||
- Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode).
|
||||
(Felipe)
|
||||
- Fixed bug #46003 (isset on nonexisting node return unexpected results). (Rob)
|
||||
- Fixed bug #45956 (parse_ini_file() does not return false with syntax errors
|
||||
in parsed file). (Jani)
|
||||
- Fixed bug #45901 (wddx_serialize_value crash with SimpleXMLElement object).
|
||||
(Rob)
|
||||
- Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and
|
||||
'private' variables). (ilewis at uk dot ibm dot com, Felipe)
|
||||
- Fixed bug #45860 (header() function fails to correctly replace all Status
|
||||
lines). (Dmitry)
|
||||
- Fixed bug #45805 (Crash on throwing exception from error handler). (Dmitry)
|
||||
- Fixed bug #45765 (ReflectionObject with default parameters of self::xxx cause
|
||||
an error). (Felipe)
|
||||
- Fixed bug #45751 (Using auto_prepend_file crashes (out of scope stack address
|
||||
use)). (basant dot kukreja at sun dot com)
|
||||
- Fixed bug #45722 (mb_check_encoding() crashes). (Moriyoshi)
|
||||
- Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter).
|
||||
(Jani)
|
||||
- Fixed bug #45691 (Some per-dir or runtime settings may leak into other
|
||||
requests). (Moriyoshi)
|
||||
- Fixed bug #45581 (htmlspecialchars() double encoding &#x hex items). (Arnaud)
|
||||
- Fixed bug #45580 (levenshtein() crashes with invalid argument). (Ilia)
|
||||
- Fixed bug #45575 (Segfault with invalid non-string as event handler callback).
|
||||
(Christian Seiler)
|
||||
- Fixed bug #45568 (ISAPI doesn't properly clear auth_digest in header).
|
||||
(Patch by: navara at emclient dot com)
|
||||
- Fixed bug #45556 (Return value from callback isn't freed). (Felipe)
|
||||
- Fixed bug #45555 (Segfault with invalid non-string as
|
||||
register_introspection_callback). (Christian Seiler)
|
||||
- Fixed bug #45553 (Using XPath to return values for attributes with a
|
||||
namespace does not work). (Rob)
|
||||
- Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave
|
||||
different). (Derick)
|
||||
- Fixed bug #45522 (FCGI_GET_VALUES request does not return supplied values).
|
||||
(Arnaud)
|
||||
- Fixed bug #45486 (mb_send_mail(); header 'Content-Type: text/plain; charset='
|
||||
parsing incorrect). (Felipe)
|
||||
- Fixed bug #45485 (strip_tags and <?XML tag). (Felipe)
|
||||
- Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't
|
||||
accept lengths of 1024). (Felipe, andrew at lifescale dot com)
|
||||
- Fixed bug #45449 (filesize() regression using ftp wrapper).
|
||||
(crrodriguez at suse dot de)
|
||||
- Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown
|
||||
before shutdown) (basant dot kukreja at sun dot com)
|
||||
- Fixed bug #45406 (session.serialize_handler declared by shared extension fails).
|
||||
(Kalle, oleg dot grenrus at dynamoid dot com)
|
||||
- Fixed bug #45405 (snmp extension memory leak).
|
||||
(Federico Cuello, Rodrigo Campos)
|
||||
- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Arnaud)
|
||||
- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). (Ilia)
|
||||
- Fixed bug #45373 (php crash on query with errors in params). (Felipe)
|
||||
- Fixed bug #45352 (Segmentation fault because of tick function on second
|
||||
request). (Dmitry)
|
||||
- Fixed bug #45312 (Segmentation fault on second request for array functions).
|
||||
(Dmitry)
|
||||
- Fixed bug #45303 (Opening php:// wrapper in append mode results in a warning).
|
||||
(Arnaud)
|
||||
- Fixed bug #45251 (double free or corruption with setAttributeNode()). (Rob)
|
||||
- Fixed bug #45226 and #18916 (xmlrpc_set_type() segfaults and wrong behavior
|
||||
with valid ISO8601 date string). (Jeff Lawsons)
|
||||
- Fixed bug #45220 (curl_read callback returns -1 when needs to return
|
||||
size_t (unsigned)). (Felipe)
|
||||
- Fixed bug #45181 (chdir() should clear relative entries in stat cache).
|
||||
(Arnaud)
|
||||
- Fixed bug #45178 (memory corruption on assignment result of "new" by
|
||||
reference). (Dmitry)
|
||||
- Fixed bug #45166 (substr() overflow changes). (Felipe)
|
||||
- Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots)).
|
||||
(Fixes CVE-2008-3660) (Dmitry)
|
||||
- Fixed bug #45139 (ReflectionProperty returns incorrect declaring class).
|
||||
(Felipe)
|
||||
- Fixed bug #45124 ($_FILES['upload']['size'] sometimes return zero and some
|
||||
times the filesize). (Arnaud)
|
||||
- Fixed bug #45028 (CRC32 output endianness is different between crc32() and
|
||||
hash()). (Tony)
|
||||
- Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
|
||||
(Ilia)
|
||||
- Fixed bug #44991 (Compile Failure With freetds0.82).
|
||||
(jklowden at freetds dot org, matthias at dsx dot at)
|
||||
- Fixed bug #44938 (gettext functions crash with overly long domain).
|
||||
(Christian Schneider, Ilia)
|
||||
- Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
|
||||
- Fixed bug #44900 (OpenSSL extension fails to link with OpenSSL 0.9.6).
|
||||
(jd at cpanel dot net, Pierre)
|
||||
- Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable
|
||||
as function parameter. (Rob)
|
||||
- Fixed bug #44882 (SOAP extension object decoding bug). (Dmitry)
|
||||
- Fixed bug #44830 (Very minor issue with backslash in heredoc). (Matt)
|
||||
- Fixed bug #44818 (php://memory writeable when opened read only). (Arnaud)
|
||||
- Fixed bug #44811 (Improve error message when creating a new SoapClient
|
||||
that contains invalid data). (Markus Fischer, David C)
|
||||
- Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia)
|
||||
- Fixed bug #44716 (Progress notifications incorrect). (Hannes)
|
||||
- Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments).
|
||||
(Hannes)
|
||||
- Fixed bug #44617 (wrong HTML entity output when substitute_character=entity).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #44607 (stream_get_line unable to correctly identify the "ending"
|
||||
in the stream content). (Arnaud)
|
||||
- Fixed bug #44425 (Extending PDO/MySQL class with a __call() function doesn't
|
||||
work). (Johannes)
|
||||
- Fixed bug #44327 (PDORow::queryString property & numeric offsets / Crash).
|
||||
(Felipe)
|
||||
- Fixed bug #44251, #41125 (PDO + quote() + prepare() can result in segfault).
|
||||
(tsteiner at nerdclub dot net)
|
||||
- Fixed bug #44246 (closedir() accepts a file resource opened by fopen()).
|
||||
(Dmitry, Tony)
|
||||
- Fixed bug #44182 (extract($a, EXTR_REFS) can fail to split copy-on-write
|
||||
references). (robin_fernandes at uk dot ibm dot com)
|
||||
- Fixed bug #44181 (extract($a, EXTR_OVERWRITE|EXTR_REFS) can fail to create
|
||||
references to $a). (robin_fernandes at uk dot ibm dot com)
|
||||
- Fixed bug #44127 (UNIX abstract namespace socket connect does not work).
|
||||
(Jani)
|
||||
- Fixed bug #43993 (mb_substr_count() behaves differently to substr_count()
|
||||
with overlapping needles). (Moriyoshi)
|
||||
- Fixed Bug #43958 (class name added into the error message). (Dmitry)
|
||||
- Fixed bug #43941 (json_encode silently cuts non-UTF8 strings). (Stas)
|
||||
- Fixed bug #43925 (Incorrect argument counter in prepared statements with
|
||||
pgsql). (Felipe)
|
||||
- Fixed bug #43731 (socket_getpeername: cannot use on stdin with inetd).
|
||||
(Arnaud)
|
||||
- Fixed bug #43723 (SOAP not sent properly from client for <choice>). (Dmitry)
|
||||
- Fixed bug #43668 (Added odbc.default_cursortype to control the ODBCcursor
|
||||
model). (Patrick)
|
||||
- Fixed bug #43666 (Fixed code to use ODBC 3.52 datatypes for 64bit
|
||||
systems). (Patrick)
|
||||
- Fixed bug #43540 (rfc1867 handler newlength problem). (Arnaud)
|
||||
- Fixed bug #43452 (strings containing a weekday, or a number plus weekday
|
||||
behaved incorrect of the current day-of-week was the same as the one in the
|
||||
phrase). (Derick)
|
||||
- Fixed bug #43353 (wrong detection of 'data' wrapper causes notice).
|
||||
(gk at gknw dot de, Arnaud)
|
||||
- Fixed bug #43053 (Regression: some numbers shown in scientific notation).
|
||||
(int-e at gmx dot de)
|
||||
- Fixed bug #43045 (SOAP encoding violation on "INF" for type double/float).
|
||||
(Dmitry)
|
||||
- Fixed bug #42862 (IMAP toolkit crash: rfc822.c legacy routine buffer
|
||||
overflow). (Fixes CVE-2008-2829) (Dmitry)
|
||||
- Fixed bug #42855 (dns_get_record() doesn't return all text from TXT record).
|
||||
(a dot u dot savchuk at gmail dot com)
|
||||
- Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines).
|
||||
(Nuno)
|
||||
- Fixed bug #42718 (FILTER_UNSAFE_RAW not applied when configured as default
|
||||
filter). (Arnaud)
|
||||
- Fixed bug #42604 ("make test" fails with --with-config-file-scan-dir=path).
|
||||
(Jani)
|
||||
- Fixed bug #42473 (ob_start php://output and headers). (Arnaud)
|
||||
- Fixed bug #42318 (problem with nm on AIX, not finding object files).
|
||||
(Dmitry)
|
||||
- Fixed bug #42294 (Unified solution for round() based on C99 round). (Ilia)
|
||||
- Fixed bug #42078 (pg_meta_data mix tables metadata from different schemas).
|
||||
(Felipe)
|
||||
- Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones)
|
||||
- Fixed bug #41033 (enable signing with DSA keys.
|
||||
(gordyf at google dot com, Pierre)
|
||||
- Fixed bug #37100 (data is returned truncated with BINARY CURSOR). (Tony)
|
||||
- Fixed bug #30312 (crash in sybase_unbuffered_query() function). (Timm)
|
||||
- Fixed bug #24679 (pg_* functions doesn't work using schema). (Felipe)
|
||||
- Fixed bug #14962 (PECL) (::extractTo 2nd argument is not really optional)
|
||||
(Mark van Der Velden)
|
||||
- Fixed bug #14032 (Mail() always returns false but mail is sent). (Mikko)
|
||||
|
||||
|
||||
01 May 2008, PHP 5.2.6
|
||||
- Fixed two possible crashes inside posix extension (Tony)
|
||||
- Fixed incorrect heredoc handling when label is used within the block.
|
||||
(Matt)
|
||||
- Fixed possible stack buffer overflow in FastCGI SAPI. (Andrei Nigmatulin)
|
||||
- Fixed sending of uninitialized paddings which may contain some information. (Andrei Nigmatulin)
|
||||
- Fixed a bug in formatting timestamps when DST is active in the default timezone (Derick)
|
||||
- Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia, Stefan Esser)
|
||||
- Fix integer overflow in printf(). (Stas, Maksymilian Aciemowicz)
|
||||
- Fixed security issue detailed in CVE-2008-0599. (Rasmus)
|
||||
- Fixed potential memleak in stream filter parameter for zlib filter. (Greg)
|
||||
- Added Reflection API metadata for the methods of the DOM classes. (Sebastian)
|
||||
@@ -55,155 +328,128 @@ PHP NEWS
|
||||
which to group by data is specified. (Ilia)
|
||||
- Fixed segfault in filter extension when using callbacks. (Arnar Mar Sig,
|
||||
Felipe)
|
||||
- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter). (Greg)
|
||||
- Upgraded PCRE to version 7.6 (Nuno)
|
||||
|
||||
|
||||
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
|
||||
- Fixed bug #44720 (Prevent crash within session_register()). (Scott)
|
||||
- Fixed bug #44703 (htmlspecialchars() does not detect bad character set argument). (Andy Wharmby)
|
||||
- Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script) (Dmitry)
|
||||
- Fixed bug #44667 (proc_open() does not handle pipes with the mode 'wb' correctly). (Jani)
|
||||
- Fixed bug #44663 (Crash in imap_mail_compose if "body" parameter invalid). (Ilia)
|
||||
- Fixed bug #44650 (escaepshellscmd() does not check arg count). (Ilia)
|
||||
- Fixed bug #44613 (Crash inside imap_headerinfo()). (Ilia, jmessa)
|
||||
- Fixed bug #44603 (Order issues with Content-Type/Length headers on POST). (Ilia)
|
||||
- Fixed bug #44594 (imap_open() does not validate # of retries parameter). (Ilia)
|
||||
- Fixed bug #44591 (imagegif's filename parameter). (Felipe)
|
||||
- Fixed bug #44557 (Crash in imap_setacl when supplied integer as username) (Thomas Jarosch)
|
||||
- Fixed bug #44487 (call_user_method_array issues a warning when throwing an exception). (David Soria Parra)
|
||||
- Fixed bug #44478 (Inconsistent behaviour when assigning new nodes). (Rob, Felipe)
|
||||
- Fixed bug #44445 (email validator does not handle domains starting/ending with a -). (Ilia)
|
||||
- Fixed bug #44440 (st_blocks undefined under BeOS). (Felipe)
|
||||
- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
|
||||
- Fixed bug #44388 (Crash inside exif_read_data() on invalid images) (Ilia)
|
||||
- Fixed bug #44373 (PDO_OCI extension compile failed). (Felipe)
|
||||
- Fixed bug #44333 (SEGFAULT when using mysql_pconnect() with client_flags). (Felipe)
|
||||
- Fixed bug #44306 (Better detection of MIPS processors on Windows). (Ilia)
|
||||
- Fixed bug #44242 (metaphone('CMXFXM') crashes PHP). (Felipe)
|
||||
- Fixed bug #44233 (MSG_PEEK undefined under BeOS R5). (jonathonfreeman at
|
||||
gmail dot com, Ilia)
|
||||
- Fixed bug #44233 (MSG_PEEK undefined under BeOS R5). (jonathonfreeman at gmail dot com, Ilia)
|
||||
- Fixed bug #44216 (strftime segfaults on large negative value). (Derick)
|
||||
- Fixed bug #44200 (A crash in PDO when no bound targets exists and yet
|
||||
bound parameters are present). (Ilia)
|
||||
- Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit
|
||||
platforms). (Derick)
|
||||
- Fixed bug #44206 (OCI8 selecting ref cursors leads to ORA-1000 maximum
|
||||
open cursors reached). (Oracle Corp.)
|
||||
- Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit platforms). (Derick)
|
||||
- Fixed bug #44206 (OCI8 selecting ref cursors leads to ORA-1000 maximum open cursors reached). (Oracle Corp.)
|
||||
- Fixed bug #44200 (A crash in PDO when no bound targets exists and yet bound parameters are present). (Ilia)
|
||||
- Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
|
||||
- Fixed bug #44191 (preg_grep messes up array index). (Felipe)
|
||||
- Fixed bug #44189 (PDO setAttribute() does not properly validate values for
|
||||
native numeric options). (Ilia)
|
||||
- Fixed bug #44189 (PDO setAttribute() does not properly validate values for native numeric options). (Ilia)
|
||||
- Fixed bug #44184 (Double free of loop-variable on exception). (Dmitry)
|
||||
- Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia)
|
||||
- Fixed bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)).
|
||||
(Felipe)
|
||||
- Fixed bug #44166 (Parameter handling flaw in PDO::getAvailableDrivers()). (Ilia)
|
||||
- Fixed bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)). (Felipe)
|
||||
- Fixed bug #44152 (Possible crash with syslog logging on ZTS builds). (Ilia)
|
||||
- Fixed bug #44141 (private parent constructor callable through static
|
||||
function). (Dmitry)
|
||||
- Fixed bug #44113 (OCI8 new collection creation can fail with OCI-22303).
|
||||
(Oracle Corp.)
|
||||
- Fixed bug #44069 (Huge memory usage with concatenation using . instead of
|
||||
.=). (Dmitry)
|
||||
- Fixed bug #44046 (crash inside array_slice() function with an invalid
|
||||
by-ref offset). (Ilia)
|
||||
- Fixed bug #44028 (crash inside stream_socket_enable_crypto() when enabling
|
||||
encryption without crypto type). (Ilia)
|
||||
- Fixed bug #44141 (private parent constructor callable through static function). (Dmitry)
|
||||
- Fixed bug #44113 (OCI8 new collection creation can fail with OCI-22303). (Oracle Corp.)
|
||||
- Fixed bug #44069 (Huge memory usage with concatenation using . instead of .=). (Dmitry)
|
||||
- Fixed bug #44046 (crash inside array_slice() function with an invalid by-ref offset). (Ilia)
|
||||
- Fixed bug #44028 (crash inside stream_socket_enable_crypto() when enabling encryption without crypto type). (Ilia)
|
||||
- Fixed bug #44018 (RecursiveDirectoryIterator options inconsistancy). (Marcus)
|
||||
- Fixed bug #44008 (OCI8 incorrect usage of OCI-Lob->close crashes PHP).
|
||||
(Oracle Corp.)
|
||||
- Fixed bug #43998 (Two error messages returned for incorrect encoding for
|
||||
mb_strto[upper|lower]). (Rui)
|
||||
- Fixed bug #44008 (OCI8 incorrect usage of OCI-Lob->close crashes PHP). (Oracle Corp.)
|
||||
- Fixed bug #43998 (Two error messages returned for incorrect encoding for mb_strto[upper|lower]). (Rui)
|
||||
- Fixed bug #43994 (mb_ereg 'successfully' matching incorrect). (Rui)
|
||||
- Fixed bug #43954 (Memory leak when sending the same HTTP status code
|
||||
multiple times). (Scott)
|
||||
- Fixed bug #43927 (koi8r is missing from html_entity_decode()).
|
||||
(andy at demos dot su, Tony)
|
||||
- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter).
|
||||
(Greg)
|
||||
- Fixed bug #43912 (Interbase column names are truncated to 31 characters).
|
||||
(Ilia)
|
||||
- Fixed bug #43875 (Two error messages returned for $new and $flag argument
|
||||
in mysql_connect()). (Hannes)
|
||||
- Fixed bug #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251).
|
||||
(phprus at gmail dot com, Tony)
|
||||
- Fixed bug #43954 (Memory leak when sending the same HTTP status code multiple times). (Scott)
|
||||
- Fixed bug #43927 (koi8r is missing from html_entity_decode()). (andy at demos dot su, Tony)
|
||||
- Fixed bug #43912 (Interbase column names are truncated to 31 characters). (Ilia)
|
||||
- Fixed bug #43875 (Two error messages returned for $new and $flag argument in mysql_connect()). (Hannes)
|
||||
- Fixed bug #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251). (phprus at gmail dot com, Tony)
|
||||
- Fixed bug #43841 (mb_strrpos offset is byte count for negative values). (Rui)
|
||||
- Fixed bug #43840 (mb_strpos bounds check is byte count rather than a character
|
||||
count). (Rui)
|
||||
- Fixed bug #43840 (mb_strpos bounds check is byte count rather than a character count). (Rui)
|
||||
- Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
|
||||
- Fixed bug #43793 (zlib filter is unable to auto-detect gzip/zlib file headers).
|
||||
(Greg)
|
||||
- Fixed bug #43793 (zlib filter is unable to auto-detect gzip/zlib file headers). (Greg)
|
||||
- Fixed bug #43703 (Signature compatibility check broken). (Dmitry)
|
||||
- Fixed bug #43663 (Extending PDO class with a __call() function doesn't work).
|
||||
(David Soria Parra)
|
||||
- Fixed bug #43677 (Inconsistent behaviour of include_path set with php_value). (manuel at mausz dot at)
|
||||
- Fixed bug #43663 (Extending PDO class with a __call() function doesn't work). (David Soria Parra)
|
||||
- Fixed bug #43647 (Make FindFile use PATH_SEPARATOR instead of ";"). (Ilia)
|
||||
- Fixed bug #43635 (mysql extension ingores INI settings on NULL values
|
||||
passed to mysql_connect()). (Ilia)
|
||||
- Fixed bug #43620 (Workaround for a bug inside libcurl 7.16.2 that can result
|
||||
in a crash). (Ilia)
|
||||
- Fixed bug #43606 (define missing depencies of the exif extension).
|
||||
(crrodriguez at suse dot de)
|
||||
- Fixed bug #43635 (mysql extension ingores INI settings on NULL values passed to mysql_connect()). (Ilia)
|
||||
- Fixed bug #43620 (Workaround for a bug inside libcurl 7.16.2 that can result in a crash). (Ilia)
|
||||
- Fixed bug #43614 (incorrect processing of numerical string keys of array in arbitrary serialized data). (Dmitriy Buldakov, Felipe)
|
||||
- Fixed bug #43606 (define missing depencies of the exif extension). (crrodriguez at suse dot de)
|
||||
- Fixed bug #43589 (a possible infinite loop in bz2_filter.c). (Greg)
|
||||
- Fixed bug #43580 (removed bogus declaration of a non-existent php_is_url()
|
||||
function). (Ilia)
|
||||
- Fixed bug #43559 (array_merge_recursive() doesn't behave as expected with
|
||||
duplicate NULL values). (Felipe, Tony)
|
||||
- Fixed bug #43580 (removed bogus declaration of a non-existent php_is_url() function). (Ilia)
|
||||
- Fixed bug #43559 (array_merge_recursive() doesn't behave as expected with duplicate NULL values). (Felipe, Tony)
|
||||
- Fixed bug #43533 (escapeshellarg('') returns null). (Ilia)
|
||||
- Fixed bug #43527 (DateTime created from a timestamp reports environment
|
||||
timezone). (Derick)
|
||||
- Fixed bug #43522 (stream_get_line() eats additional characters). (Felipe,
|
||||
Ilia, Tony)
|
||||
- Fixed bug #43507 (SOAPFault HTTP Status 500 - would like to be able to set
|
||||
the HTTP Status). (Dmitry)
|
||||
- Fixed bug #43527 (DateTime created from a timestamp reports environment timezone). (Derick)
|
||||
- Fixed bug #43522 (stream_get_line() eats additional characters). (Felipe, Ilia, Tony)
|
||||
- Fixed bug #43507 (SOAPFault HTTP Status 500 - would like to be able to set the HTTP Status). (Dmitry)
|
||||
- Fixed bug #43505 (Assign by reference bug). (Dmitry)
|
||||
- Fixed bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory).
|
||||
(Chris)
|
||||
- Fixed bug #43495 (array_merge_recursive() crashes with recursive arrays).
|
||||
(Ilia)
|
||||
- Fixed bug #43498 (file_exists() on a proftpd server got SIZE not
|
||||
allowed in ASCII mode). (Ilia, crrodriguez at suse dot de)
|
||||
- Fixed bug #43493 (pdo_pgsql does not send username on connect when password
|
||||
is not available). (Ilia)
|
||||
- Fixed bug #43491 (Under certain conditions, file_exists() never returns).
|
||||
(Dmitry)
|
||||
- Fixed bug #43483 (get_class_methods() does not list all visible methods).
|
||||
(Dmitry)
|
||||
- Fixed bug #43482 (array_pad() does not warn on very small pad numbers).
|
||||
(Ilia)
|
||||
- Fixed bug #43457 (Prepared statement with incorrect parms doesn't throw
|
||||
exception with pdo_pgsql driver). (Ilia)
|
||||
- Fixed bug #43450 (Memory leak on some functions with implicit object
|
||||
__toString() call). (David C.)
|
||||
- Fixed bug #43498 (file_exists() on a proftpd server got SIZE not allowed in ASCII mode). (Ilia, crrodriguez at suse dot de)
|
||||
- Fixed bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory). (Chris)
|
||||
- Fixed bug #43495 (array_merge_recursive() crashes with recursive arrays). (Ilia)
|
||||
- Fixed bug #43493 (pdo_pgsql does not send username on connect when password is not available). (Ilia)
|
||||
- Fixed bug #43491 (Under certain conditions, file_exists() never returns). (Dmitry)
|
||||
- Fixed bug #43483 (get_class_methods() does not list all visible methods). (Dmitry)
|
||||
- Fixed bug #43482 (array_pad() does not warn on very small pad numbers). (Ilia)
|
||||
- Fixed bug #43457 (Prepared statement with incorrect parms doesn't throw exception with pdo_pgsql driver). (Ilia)
|
||||
- Fixed bug #43450 (Memory leak on some functions with implicit object __toString() call). (David C.)
|
||||
- Fixed bug #43386 (array_globals not reset to 0 properly on init). (Ilia)
|
||||
- Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone). (Ilia)
|
||||
- Fixed bug #43373 (pcntl_fork() should not raise E_ERROR on error). (Ilia)
|
||||
- Fixed bug #43364 (recursive xincludes don't remove internal xml nodes
|
||||
properly). (Rob, patch from ddb@bitxtender.de)
|
||||
- Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL).
|
||||
(Jani)
|
||||
- Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is
|
||||
invalid PHP expression and 'e' option is used). (Jani)
|
||||
- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
|
||||
using a timestamp). (Derick)
|
||||
- Fixed bug #43295 (crash because of uninitialized SG(sapi_headers).mimetype).
|
||||
(Dmitry)
|
||||
- Fixed bug #43364 (recursive xincludes don't remove internal xml nodes properly). (Rob, patch from ddb@bitxtender.de)
|
||||
- Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is invalid PHP expression and 'e' option is used). (Jani)
|
||||
- Fixed bug #43295 (crash because of uninitialized SG(sapi_headers).mimetype). (Dmitry)
|
||||
- Fixed bug #43293 (Multiple segfaults in getopt()). (Hannes)
|
||||
- Fixed bug #43279 (pg_send_query_params() converts all elements in 'params'
|
||||
to strings). (Ilia)
|
||||
- Fixed bug #43276 (Incomplete fix for bug #42739, mkdir() under safe_mode).
|
||||
(Ilia)
|
||||
- Fixed bug #43279 (pg_send_query_params() converts all elements in 'params' to strings). (Ilia)
|
||||
- Fixed bug #43276 (Incomplete fix for bug #42739, mkdir() under safe_mode). (Ilia)
|
||||
- Fixed bug #43248 (backward compatibility break in realpath()). (Dmitry)
|
||||
- Fixed bug #43221 (SimpleXML adding default namespace in addAttribute). (Rob)
|
||||
- Fixed bug #43216 (stream_is_local() returns false on "file://"). (Dmitry)
|
||||
- Fixed bug #43201 (Crash on using uninitialized vals and __get/__set). (Dmitry)
|
||||
- Fixed bug #43182 (file_put_contents() LOCK_EX does not work properly on file
|
||||
truncation). (Ilia)
|
||||
- Fixed bug #43175 (__destruct() throwing an exception with __call() causes
|
||||
segfault). (Dmitry)
|
||||
- Fixed bug #43182 (file_put_contents() LOCK_EX does not work properly on file truncation). (Ilia)
|
||||
- Fixed bug #43175 (__destruct() throwing an exception with __call() causes segfault). (Dmitry)
|
||||
- Fixed bug #43128 (Very long class name causes segfault). (Dmitry)
|
||||
- Fixed bug #43105 (PHP seems to fail to close open files). (Hannes)
|
||||
- Fixed bug #42978 (mismatch between number of bound params and values causes
|
||||
a crash in pdo_pgsql). (Ilia)
|
||||
- Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL). (Jani)
|
||||
- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed using a timestamp). (Derick)
|
||||
- Fixed bug #42978 (mismatch between number of bound params and values causes a crash in pdo_pgsql). (Ilia)
|
||||
- Fixed bug #42945 (preg_split() swallows part of the string). (Nuno)
|
||||
- Fixed bug #42937 (__call() method not invoked when methods are called on
|
||||
parent from child class). (Dmitry)
|
||||
- Fixed bug #42937 (__call() method not invoked when methods are called on parent from child class). (Dmitry)
|
||||
- Fixed bug #42841 (REF CURSOR and oci_new_cursor() crash PHP). (Chris)
|
||||
- Fixed Bug #42838 (Wrong results in array_diff_uassoc) (Felipe)
|
||||
- Fixed bug #42779 (Incorrect forcing from HTTP/1.0 request to HTTP/1.1
|
||||
response). (Ilia)
|
||||
- Fixed bug #42838 (Wrong results in array_diff_uassoc) (Felipe)
|
||||
- Fixed bug #42779 (Incorrect forcing from HTTP/1.0 request to HTTP/1.1 response). (Ilia)
|
||||
- Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony)
|
||||
- Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer).
|
||||
(Dmitry)
|
||||
- Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer). (Dmitry)
|
||||
- Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (Hartmut)
|
||||
- Fixed bug #42369 (Implicit conversion to string leaks memory).
|
||||
(David C., Rob).
|
||||
- Fixed bug #42505 (new sendmail default breaks on Netware platform) (Guenter Knauf)
|
||||
- Fixed bug #42369 (Implicit conversion to string leaks memory). (David C., Rob).
|
||||
- Fixed bug #42272 (var_export() incorrectly escapes char(0)). (Derick)
|
||||
- Fixed bug #42261 (Incorrect lengths for date and boolean data types).
|
||||
(Ilia)
|
||||
- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator invalidates
|
||||
DateTimeZone). (Derick)
|
||||
- Fixed bug #42261 (Incorrect lengths for date and boolean data types). (Ilia)
|
||||
- Fixed bug #42190 (Constructing DateTime with TimeZone Indicator invalidates DateTimeZone). (Derick)
|
||||
- Fixed bug #42177 (Warning "array_merge_recursive(): recursion detected" comes again...). (Felipe)
|
||||
- Fixed bug #41941 (oci8 extension not lib64 savvy). (Chris)
|
||||
- Fixed bug #41828 (Failing to call RecursiveIteratorIterator::__construct() causes a sefault). (Etienne)
|
||||
- Fixed bug #41599 (setTime() fails after modify() is used). (Derick)
|
||||
- Fixed bug #41562 (SimpleXML memory issue). (Rob)
|
||||
- Fixed bug #40013 (php_uname() does not return nodename on Netware (Guenter Knauf)
|
||||
- Fixed bug #38468 (Unexpected creation of cycle). (Dmitry)
|
||||
- Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build) (stotty at tvnet dot hu)
|
||||
|
||||
08 Nov 2007, PHP 5.2.5
|
||||
- Upgraded PCRE to version 7.3 (Nuno)
|
||||
|
||||
+14
-14
@@ -1,11 +1,11 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
This is an addendum to README.TESTING with additional information
|
||||
specific to run-tests2.php.
|
||||
specific to server-tests.php.
|
||||
|
||||
run-tests2.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. run-tests2 is *not* used by
|
||||
'make test'. run-tests2 was developed to provide support for
|
||||
server-tests.php is backward compatible with tests developed for
|
||||
the original run-tests.php script. server-tests is *not* used by
|
||||
'make test'. server-tests was developed to provide support for
|
||||
testing PHP under it's primary environment, HTTP, and can run the
|
||||
PHP tests under any of the SAPI modules that are direct executables,
|
||||
or are accessable via HTTP.
|
||||
@@ -13,12 +13,12 @@ or are accessable via HTTP.
|
||||
[New features]
|
||||
----------------
|
||||
* Command line interface:
|
||||
You can run 'php run-tests2.php -h' to get all the possible options.
|
||||
You can run 'php server-tests.php -h' to get all the possible options.
|
||||
* Configuration file:
|
||||
the -c argument will allow you to use a configuration file. This is
|
||||
handy if you are testing multiple environments and need various options
|
||||
depending on the environment.
|
||||
see run-tests-config.php for details.
|
||||
see server-tests-config.php for details.
|
||||
* CGI Emulation:
|
||||
Will emulate a CGI environment when testing with the cgi sapi executable.
|
||||
* HTTP testing:
|
||||
@@ -39,23 +39,23 @@ make testing work.
|
||||
Some (but not all!) examples of usage:
|
||||
|
||||
1. run tests from the php source directory
|
||||
php run-tests2.php -p /path/to/php-cli
|
||||
php server-tests.php -p /path/to/php-cli
|
||||
|
||||
2. run tests using cgi emulation
|
||||
php run-tests2.php -p /path/to/php-cgi
|
||||
php server-tests.php -p /path/to/php-cgi
|
||||
|
||||
3. run tests over http, copying test files into document root
|
||||
php run-tests2.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
|
||||
|
||||
4. run tests over http, php sources have been aliased in web server
|
||||
php run-tests2.php -w -u http://localhost/test
|
||||
php server-tests.php -w -u http://localhost/test
|
||||
|
||||
5. run tests using configuration file
|
||||
php run-tests2.php -c /path/to/run-tests-config.php
|
||||
php server-tests.php -c /path/to/server-tests-config.php
|
||||
|
||||
6. run tests using configuration file, but overriding some settings:
|
||||
(config file must be first)
|
||||
php run-tests2.php -c /path/to/run-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
|
||||
|
||||
NOTE: configuration as described in README.TESTING still works.
|
||||
|
||||
@@ -63,7 +63,7 @@ NOTE: configuration as described in README.TESTING still works.
|
||||
----------------
|
||||
In addition to the traditional test sections
|
||||
(see http://qa.php.net/write-test.php), several new sections are available
|
||||
under run-tests2.
|
||||
under server-tests.
|
||||
|
||||
--POST--
|
||||
This is not a new section, but not multipart posts are supported for testing
|
||||
@@ -97,7 +97,7 @@ include:
|
||||
$scriptname this is what will become SCRIPT_NAME unless you override it
|
||||
$docroot the equivelant of DOCUMENT_ROOT under Apache
|
||||
$cwd the directory that the test is being initiated from
|
||||
$this->conf all run-tests2 configuration vars
|
||||
$this->conf all server-tests configuration vars
|
||||
$this->env all environment variables that will get passed to the test
|
||||
|
||||
|
||||
|
||||
@@ -491,6 +491,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
int use_relative_path = 0;
|
||||
#ifdef TSRM_WIN32
|
||||
int is_unc;
|
||||
int exists;
|
||||
#endif
|
||||
TSRMLS_FETCH();
|
||||
|
||||
@@ -589,6 +590,7 @@ no_realpath:
|
||||
CWD_STATE_COPY(&old_state, state);
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
exists = (use_realpath != CWD_EXPAND);
|
||||
ret = 0;
|
||||
is_unc = 0;
|
||||
if (path_length >= 2 && path[1] == ':') {
|
||||
@@ -696,13 +698,16 @@ no_realpath:
|
||||
ptr_length = length;
|
||||
FindClose(hFind);
|
||||
ret = 0;
|
||||
} else if (use_realpath == CWD_REALPATH) {
|
||||
} else {
|
||||
if (is_unc) {
|
||||
/* skip share name */
|
||||
is_unc--;
|
||||
ret = 0;
|
||||
} else {
|
||||
ret = 1;
|
||||
exists = 0;
|
||||
if (use_realpath == CWD_REALPATH) {
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -742,7 +747,7 @@ no_realpath:
|
||||
|
||||
/* Store existent file in realpath cache. */
|
||||
#ifdef TSRM_WIN32
|
||||
if (use_cache && !is_unc) {
|
||||
if (use_cache && !is_unc && exists) {
|
||||
#else
|
||||
if (use_cache && (use_realpath == CWD_REALPATH)) {
|
||||
#endif
|
||||
|
||||
+10
-10
@@ -88,7 +88,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
{
|
||||
if (mode == 1 /*X_OK*/) {
|
||||
#if 1
|
||||
/* This code is not supported by Windows 98,
|
||||
/* This code is not supported by Windows 98,
|
||||
* but we don't support it anymore */
|
||||
DWORD type;
|
||||
|
||||
@@ -96,7 +96,7 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
|
||||
#else
|
||||
SHFILEINFO sfi;
|
||||
|
||||
return access(pathname, 0) == 0 &&
|
||||
return access(pathname, 0) == 0 &&
|
||||
SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1;
|
||||
#endif
|
||||
} else {
|
||||
@@ -109,22 +109,22 @@ static process_pair *process_get(FILE *stream TSRMLS_DC)
|
||||
{
|
||||
process_pair *ptr;
|
||||
process_pair *newptr;
|
||||
|
||||
|
||||
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
|
||||
if (ptr->stream == stream) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ptr < (TWG(process) + TWG(process_size))) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
|
||||
if (newptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
TWG(process) = newptr;
|
||||
ptr = newptr + TWG(process_size);
|
||||
TWG(process_size)++;
|
||||
@@ -136,7 +136,7 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
shm_pair *ptr;
|
||||
shm_pair *newptr;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
|
||||
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
|
||||
if (!ptr->descriptor) {
|
||||
continue;
|
||||
@@ -151,12 +151,12 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
if (ptr < (TWG(shm) + TWG(shm_size))) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
|
||||
if (newptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
TWG(shm) = newptr;
|
||||
ptr = newptr + TWG(shm_size);
|
||||
TWG(shm_size)++;
|
||||
@@ -195,7 +195,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
memset(&startup, 0, sizeof(STARTUPINFO));
|
||||
memset(&process, 0, sizeof(PROCESS_INFORMATION));
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# we only support certain bison versions
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3"
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
|
||||
+6
-6
@@ -23,18 +23,18 @@ var_dump(constant("test const"));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Wrong parameter count for define() in %s on line %d
|
||||
Warning: define() expects at least 2 parameters, 0 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Wrong parameter count for define() in %s on line %d
|
||||
Warning: define() expects at least 2 parameters, 1 given in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
|
||||
Notice: Constant true already defined in %s on line %d
|
||||
bool(false)
|
||||
Warning: define() expects parameter 3 to be boolean, array given in %s on line %d
|
||||
NULL
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(true)
|
||||
Warning: define() expects parameter 1 to be string, array given in %s on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #38469 Unexpected creation of cycle
|
||||
Bug #38469 (Unexpected creation of cycle)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
@@ -8,6 +8,16 @@ var_dump($a);
|
||||
$b = array(array());
|
||||
$b[0][0] = $b;
|
||||
var_dump($b);
|
||||
|
||||
function f() {
|
||||
$a = array();
|
||||
$a[0] = $a;
|
||||
var_dump($a);
|
||||
$b = array(array());
|
||||
$b[0][0] = $b;
|
||||
var_dump($b);
|
||||
}
|
||||
f();
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
@@ -26,3 +36,19 @@ array(1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #41372 Internal pointer of source array resets during array copying
|
||||
Bug #41372 (Internal pointer of source array resets during array copying)
|
||||
--FILE--
|
||||
<?php
|
||||
$Foo = array('val1', 'val2', 'val3');
|
||||
|
||||
@@ -8,4 +8,4 @@ $foo[3]->bar[1] = "bang";
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use string offset as an object in %s/bug41919.php on line %d
|
||||
Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #43053 (Regression: some numbers shown in scientific notation)
|
||||
--FILE--
|
||||
<?php
|
||||
echo 1200000.00."\n";
|
||||
echo 1300000.00."\n";
|
||||
echo 1400000.00."\n";
|
||||
echo 1500000.00."\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
1200000
|
||||
1300000
|
||||
1400000
|
||||
1500000
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #43128 Very long class name causes segfault
|
||||
Bug #43128 (Very long class name causes segfault)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #44830 (Very minor issue with backslash in heredoc)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$backslash = <<<EOT
|
||||
\
|
||||
EOT;
|
||||
|
||||
var_dump($backslash);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "\"
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #45178 memory corruption on assignment result of "new" by reference
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __construct() {
|
||||
$this->error = array($this,$this);
|
||||
}
|
||||
}
|
||||
$a =& new Foo();
|
||||
|
||||
class Bar {
|
||||
function __construct() {
|
||||
$this->_rme2 = $this;
|
||||
}
|
||||
}
|
||||
|
||||
$b =& new Bar();
|
||||
$b->_rme2 = 0;
|
||||
var_dump($b);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Assigning the return value of new by reference is deprecated in %sbug45178.php on line 7
|
||||
|
||||
Strict Standards: Assigning the return value of new by reference is deprecated in %sbug45178.php on line 15
|
||||
object(Bar)#%d (1) {
|
||||
["_rme2"]=>
|
||||
int(0)
|
||||
}
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
--TEST--
|
||||
Bug #45805 (Crash on throwing exception from error handler)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('reflection') or die('skip'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
class PHPUnit_Util_ErrorHandler
|
||||
{
|
||||
public static function handleError($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
throw new RuntimeException;
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
public function getX() {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
public function foo() {
|
||||
$obj = new A;
|
||||
$source = &$obj->getX();
|
||||
}
|
||||
|
||||
public function bar() {
|
||||
$m = new ReflectionMethod('B', 'foo');
|
||||
$m->invoke($this);
|
||||
}
|
||||
}
|
||||
|
||||
set_error_handler(
|
||||
array('PHPUnit_Util_ErrorHandler', 'handleError'), E_ALL | E_STRICT
|
||||
);
|
||||
|
||||
$o = new B;
|
||||
$o->bar();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'RuntimeException' in %sbug45805.php:%d
|
||||
Stack trace:
|
||||
#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(2048, 'Only variables ...', '%s', %d, Array)
|
||||
#1 [internal function]: B->foo()
|
||||
#2 %sbug45805.php(%d): ReflectionMethod->invoke(Object(B))
|
||||
#3 %sbug45805.php(%d): B->bar()
|
||||
#4 {main}
|
||||
thrown in %sbug45805.php on line %d
|
||||
@@ -0,0 +1,43 @@
|
||||
--TEST--
|
||||
Bug #45862 (get_class_vars is inconsistent with 'protected' and 'private' variables)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Ancestor {
|
||||
function test() {
|
||||
var_dump(get_class_vars("Tester"));
|
||||
var_dump(Tester::$prot);
|
||||
}
|
||||
}
|
||||
|
||||
class Tester extends Ancestor {
|
||||
static protected $prot = "protected var";
|
||||
static private $priv = "private var";
|
||||
}
|
||||
|
||||
class Child extends Tester {
|
||||
function test() { var_dump(get_class_vars("Tester")); }
|
||||
}
|
||||
|
||||
echo "\n From parent scope\n";
|
||||
$parent = new Ancestor();
|
||||
$parent->test();
|
||||
echo "\n From child scope\n";
|
||||
$child = new Child();
|
||||
$child->test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
From parent scope
|
||||
array(1) {
|
||||
["prot"]=>
|
||||
string(13) "protected var"
|
||||
}
|
||||
string(13) "protected var"
|
||||
|
||||
From child scope
|
||||
array(1) {
|
||||
["prot"]=>
|
||||
string(13) "protected var"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Bug #46246 (difference between call_user_func(array($this, $method)) and $this->$method())
|
||||
--FILE--
|
||||
<?php
|
||||
class A
|
||||
{
|
||||
private function Test()
|
||||
{
|
||||
echo 'Hello from '.get_class($this)."\n";
|
||||
}
|
||||
|
||||
public function call($method, $args = array())
|
||||
{
|
||||
$this->Test();
|
||||
$this->$method();
|
||||
call_user_func(array($this, $method));
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
protected function Test()
|
||||
{
|
||||
echo 'Overridden hello from '.get_class($this)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
$b = new B;
|
||||
|
||||
$a->call('Test');
|
||||
$b->call('Test');
|
||||
?>
|
||||
--EXPECT--
|
||||
Hello from A
|
||||
Hello from A
|
||||
Hello from A
|
||||
Hello from B
|
||||
Hello from B
|
||||
Hello from B
|
||||
@@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
Bug #46308 (Invalid write when changing property from inside getter)
|
||||
--FILE--
|
||||
<?php
|
||||
class main
|
||||
{
|
||||
public static $dummy = NULL ;
|
||||
public static $dataAccessor = NULL ;
|
||||
}
|
||||
|
||||
class dataAccessor
|
||||
{
|
||||
}
|
||||
|
||||
class relay
|
||||
{
|
||||
public function __get( $name )
|
||||
{
|
||||
main::$dataAccessor = new dataAccessor;
|
||||
}
|
||||
}
|
||||
|
||||
class dummy
|
||||
{
|
||||
}
|
||||
|
||||
main::$dummy = new dummy();
|
||||
main::$dataAccessor = new relay();
|
||||
main::$dataAccessor->bar;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #46381 (wrong $this passed to internal methods causes segfault)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
public function test() {
|
||||
return ArrayIterator::current();
|
||||
}
|
||||
}
|
||||
$test = new test();
|
||||
$test->test();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Testing declare statement with several type values
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
declare(encoding = 1);
|
||||
declare(encoding = 1123131232131312321);
|
||||
declare(encoding = NULL);
|
||||
declare(encoding = M_PI);
|
||||
declare(encoding = 'utf-8');
|
||||
|
||||
print 'DONE';
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Testing exception properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class my_file
|
||||
{
|
||||
public function __toString()
|
||||
{
|
||||
return "somebuildfilename" ;
|
||||
}
|
||||
}
|
||||
|
||||
class my_exception extends exception
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->message = new stdclass ;
|
||||
$this->file = new my_file ;
|
||||
$this->line = "12" ;
|
||||
}
|
||||
}
|
||||
|
||||
throw new my_exception;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Catchable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0
|
||||
@@ -0,0 +1,55 @@
|
||||
--TEST--
|
||||
get_class_methods(): Testing scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
abstract class A {
|
||||
public function a() { }
|
||||
private function b() { }
|
||||
protected function c() { }
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
private function bb() { }
|
||||
|
||||
static public function test() {
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
|
||||
|
||||
B::test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(4) "test"
|
||||
[1]=>
|
||||
string(1) "a"
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "c"
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(2) "bb"
|
||||
[1]=>
|
||||
string(4) "test"
|
||||
[2]=>
|
||||
string(1) "a"
|
||||
[3]=>
|
||||
string(1) "c"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
--TEST--
|
||||
get_class_methods(): Testing with interface
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface A {
|
||||
function a();
|
||||
function b();
|
||||
}
|
||||
|
||||
class B implements A {
|
||||
public function a() { }
|
||||
public function b() { }
|
||||
|
||||
public function __construct() {
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
}
|
||||
|
||||
public function __destruct() { }
|
||||
}
|
||||
|
||||
new B;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Redefining already defined constructor for class B in %s on line %d
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
[2]=>
|
||||
string(11) "__construct"
|
||||
[3]=>
|
||||
string(10) "__destruct"
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
--TEST--
|
||||
get_class_methods(): Testing scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface A {
|
||||
function aa();
|
||||
function bb();
|
||||
static function cc();
|
||||
}
|
||||
|
||||
class C {
|
||||
public function a() { }
|
||||
protected function b() { }
|
||||
private function c() { }
|
||||
|
||||
static public function static_a() { }
|
||||
static protected function static_b() { }
|
||||
static private function static_c() { }
|
||||
}
|
||||
|
||||
class B extends C implements A {
|
||||
public function aa() { }
|
||||
public function bb() { }
|
||||
|
||||
static function cc() { }
|
||||
|
||||
public function __construct() {
|
||||
var_dump(get_class_methods('A'));
|
||||
var_dump(get_class_methods('B'));
|
||||
var_dump(get_class_methods('C'));
|
||||
}
|
||||
|
||||
public function __destruct() { }
|
||||
}
|
||||
|
||||
new B;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(2) "aa"
|
||||
[1]=>
|
||||
string(2) "bb"
|
||||
[2]=>
|
||||
string(2) "cc"
|
||||
}
|
||||
array(9) {
|
||||
[0]=>
|
||||
string(2) "aa"
|
||||
[1]=>
|
||||
string(2) "bb"
|
||||
[2]=>
|
||||
string(2) "cc"
|
||||
[3]=>
|
||||
string(11) "__construct"
|
||||
[4]=>
|
||||
string(10) "__destruct"
|
||||
[5]=>
|
||||
string(1) "a"
|
||||
[6]=>
|
||||
string(1) "b"
|
||||
[7]=>
|
||||
string(8) "static_a"
|
||||
[8]=>
|
||||
string(8) "static_b"
|
||||
}
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(1) "a"
|
||||
[1]=>
|
||||
string(1) "b"
|
||||
[2]=>
|
||||
string(8) "static_a"
|
||||
[3]=>
|
||||
string(8) "static_b"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
get_class_vars(): Simple test
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
private $b = 2;
|
||||
private $c = 3;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $aa = 4;
|
||||
static private $bb = 5;
|
||||
static protected $cc = 6;
|
||||
}
|
||||
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(2) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing the scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
private $b = 2;
|
||||
private $c = 3;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $aa = 4;
|
||||
static private $bb = 5;
|
||||
static protected $cc = 6;
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
|
||||
var_dump($this->a, $this->b, $this->c);
|
||||
}
|
||||
}
|
||||
|
||||
new C;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
["cc"]=>
|
||||
int(6)
|
||||
}
|
||||
|
||||
Notice: Undefined property: C::$b in %s on line %d
|
||||
|
||||
Notice: Undefined property: C::$c in %s on line %d
|
||||
int(1)
|
||||
NULL
|
||||
NULL
|
||||
@@ -0,0 +1,47 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing the scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
private $b = 2;
|
||||
private $c = 3;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static public $aa = 4;
|
||||
static private $bb = 5;
|
||||
static protected $cc = 6;
|
||||
|
||||
protected function __construct() {
|
||||
var_dump(get_class_vars('C'));
|
||||
}
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public $aaa = 7;
|
||||
private $bbb = 8;
|
||||
protected $ccc = 9;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
||||
new C;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(5) {
|
||||
["aaa"]=>
|
||||
int(7)
|
||||
["ccc"]=>
|
||||
int(9)
|
||||
["a"]=>
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
["cc"]=>
|
||||
int(6)
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing the scope
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public $a = 1;
|
||||
static public $A = 2;
|
||||
|
||||
private $b = 3;
|
||||
static private $B = 4;
|
||||
|
||||
protected $c = 5;
|
||||
static protected $C = 6;
|
||||
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
}
|
||||
|
||||
static public function test() {
|
||||
var_dump(get_class_vars('A'));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
|
||||
new A;
|
||||
|
||||
var_dump(A::test());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["A"]=>
|
||||
int(2)
|
||||
}
|
||||
array(6) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
int(3)
|
||||
["c"]=>
|
||||
int(5)
|
||||
["A"]=>
|
||||
int(2)
|
||||
["B"]=>
|
||||
int(4)
|
||||
["C"]=>
|
||||
int(6)
|
||||
}
|
||||
array(6) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
int(3)
|
||||
["c"]=>
|
||||
int(5)
|
||||
["A"]=>
|
||||
int(2)
|
||||
["B"]=>
|
||||
int(4)
|
||||
["C"]=>
|
||||
int(6)
|
||||
}
|
||||
NULL
|
||||
@@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing visibility
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
protected $a = 1;
|
||||
private $b = 2;
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
private $c = 3;
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
|
||||
new B;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(2) {
|
||||
["c"]=>
|
||||
int(3)
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing visibility
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
protected $a = 1;
|
||||
}
|
||||
|
||||
class B extends A { }
|
||||
|
||||
class C extends B { }
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
var_dump(get_class_vars('C'));
|
||||
|
||||
print "---\n";
|
||||
|
||||
class D extends B {
|
||||
public function __construct() {
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(get_class_vars('B'));
|
||||
var_dump(get_class_vars('C'));
|
||||
}
|
||||
}
|
||||
|
||||
new D;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
---
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
--TEST--
|
||||
get_class_vars(): Testing with static properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static public $a, $aa;
|
||||
static private $b, $bb;
|
||||
static protected $c, $cc;
|
||||
|
||||
static public function test() {
|
||||
var_dump(get_class_vars(__CLASS__));
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(get_class_vars('A'));
|
||||
var_dump(A::test());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["a"]=>
|
||||
NULL
|
||||
["aa"]=>
|
||||
NULL
|
||||
}
|
||||
array(6) {
|
||||
["a"]=>
|
||||
NULL
|
||||
["aa"]=>
|
||||
NULL
|
||||
["b"]=>
|
||||
NULL
|
||||
["bb"]=>
|
||||
NULL
|
||||
["c"]=>
|
||||
NULL
|
||||
["cc"]=>
|
||||
NULL
|
||||
}
|
||||
NULL
|
||||
@@ -22,7 +22,7 @@ foreach ($doubles as $d) {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
float(4083360297110%d)
|
||||
float(4.0833602971%dE+14)
|
||||
float(4.7223664828%dE+21)
|
||||
float(1.3521606402%dE+31)
|
||||
float(1.9807040628%dE+27)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Testing isset and unset with variable variables
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
print "- isset ---\n";
|
||||
|
||||
$var_name = 'unexisting';
|
||||
|
||||
if (isset($$var_name)) {
|
||||
print "error\n";
|
||||
}
|
||||
|
||||
$test = 'var_name';
|
||||
|
||||
if (isset($$$test)) {
|
||||
print "error\n";
|
||||
}
|
||||
|
||||
print "- unset ---\n";
|
||||
|
||||
unset($$var_name);
|
||||
|
||||
unset($$$test);
|
||||
|
||||
print "done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
- isset ---
|
||||
- unset ---
|
||||
done
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Testing isset with several undefined variables as argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(isset($a, ${$b}, $$c, $$$$d, $e[$f->g]->d));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Testing isset accessing undefined array itens and properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = 'foo';
|
||||
$b =& $a;
|
||||
|
||||
var_dump(isset($b));
|
||||
|
||||
var_dump(isset($a[0], $b[1]));
|
||||
|
||||
var_dump(isset($a[0]->a));
|
||||
|
||||
var_dump(isset($c[0][1][2]->a->b->c->d));
|
||||
|
||||
var_dump(isset(${$a}->{$b->$c[$d]}));
|
||||
|
||||
var_dump(isset($GLOBALS));
|
||||
|
||||
var_dump(isset($GLOBALS[1]));
|
||||
|
||||
var_dump(isset($GLOBALS[1]->$GLOBALS));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Notice: Undefined variable: d in %s on line %d
|
||||
|
||||
Notice: Undefined variable: c in %s on line %d
|
||||
|
||||
Notice: Trying to get property of non-object in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -0,0 +1,74 @@
|
||||
--TEST--
|
||||
Testing method_exists()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class bar {
|
||||
static public function stat_a2() {
|
||||
}
|
||||
static private function stat_b2() {
|
||||
}
|
||||
static protected function stat_c2() {
|
||||
}
|
||||
|
||||
private function method_a() {
|
||||
}
|
||||
protected function method_b() {
|
||||
}
|
||||
public function method_c() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class baz extends bar {
|
||||
static public function stat_a() {
|
||||
}
|
||||
static private function stat_b() {
|
||||
}
|
||||
static protected function stat_c() {
|
||||
}
|
||||
|
||||
private function method_a() {
|
||||
}
|
||||
protected function method_b() {
|
||||
}
|
||||
public function method_c() {
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(method_exists('baz', 'stat_a'));
|
||||
var_dump(method_exists('baz', 'stat_b'));
|
||||
var_dump(method_exists('baz', 'stat_c'));
|
||||
print "----\n";
|
||||
var_dump(method_exists('baz', 'stat_a2'));
|
||||
var_dump(method_exists('baz', 'stat_b2'));
|
||||
var_dump(method_exists('baz', 'stat_c2'));
|
||||
print "----\n";
|
||||
|
||||
$baz = new baz;
|
||||
var_dump(method_exists($baz, 'method_a'));
|
||||
var_dump(method_exists($baz, 'method_b'));
|
||||
var_dump(method_exists($baz, 'method_c'));
|
||||
print "----\n";
|
||||
var_dump(method_exists($baz, 'stat_a'));
|
||||
var_dump(method_exists($baz, 'stat_b'));
|
||||
var_dump(method_exists($baz, 'stat_c'));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
----
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
----
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
----
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Zend Multibyte and UTF-8 BOM
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
|
||||
die("skip Requires configure --enable-zend-multibyte option");
|
||||
}
|
||||
if (!extension_loaded("mbstring")) {
|
||||
die("skip Requires mbstring extension");
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
mbstring.internal_encoding=iso-8859-1
|
||||
--FILE--
|
||||
<?php
|
||||
print "Hello World\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Hello World
|
||||
===DONE===
|
||||
BIN
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
<?php
|
||||
|
||||
unset($x)
|
||||
|
||||
?>
|
||||
@@ -15,5 +15,5 @@ echo "Done\n";
|
||||
float(-100)
|
||||
float(808792757210)
|
||||
float(-4.5646456464565E+27)
|
||||
float(-11276204760067000)
|
||||
float(-1.1276204760067E+16)
|
||||
Done
|
||||
+5
-1
@@ -1779,9 +1779,13 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
efree(lc_class_name);
|
||||
}
|
||||
while (ptr->fname) {
|
||||
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
|
||||
fname_len = strlen(ptr->fname);
|
||||
lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
|
||||
if (zend_hash_exists(target_function_table, lowercase_name, fname_len+1)) {
|
||||
efree(lowercase_name);
|
||||
zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
|
||||
}
|
||||
efree(lowercase_name);
|
||||
ptr++;
|
||||
}
|
||||
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
|
||||
|
||||
+17
-4
@@ -1061,16 +1061,26 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
|
||||
}
|
||||
if (internal) {
|
||||
int i;
|
||||
zend_mm_free_block *p;
|
||||
zend_mm_free_block *p, *q, *orig;
|
||||
zend_mm_heap *mm_heap = _zend_mm_alloc_int(heap, sizeof(zend_mm_heap) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC);
|
||||
|
||||
*mm_heap = *heap;
|
||||
|
||||
p = ZEND_MM_SMALL_FREE_BUCKET(mm_heap, 0);
|
||||
orig = ZEND_MM_SMALL_FREE_BUCKET(heap, 0);
|
||||
for (i = 0; i < ZEND_MM_NUM_BUCKETS; i++) {
|
||||
p->prev_free_block->next_free_block = p;
|
||||
p->next_free_block->prev_free_block = p;
|
||||
q = p;
|
||||
while (q->prev_free_block != orig) {
|
||||
q = q->prev_free_block;
|
||||
}
|
||||
q->prev_free_block = p;
|
||||
q = p;
|
||||
while (q->next_free_block != orig) {
|
||||
q = q->next_free_block;
|
||||
}
|
||||
q->next_free_block = p;
|
||||
p = (zend_mm_free_block*)((char*)p + sizeof(zend_mm_free_block*) * 2);
|
||||
orig = (zend_mm_free_block*)((char*)orig + sizeof(zend_mm_free_block*) * 2);
|
||||
if (mm_heap->large_free_buckets[i]) {
|
||||
mm_heap->large_free_buckets[i]->parent = &mm_heap->large_free_buckets[i];
|
||||
}
|
||||
@@ -1115,7 +1125,10 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
|
||||
if (tmp) {
|
||||
seg_size = zend_atoi(tmp, 0);
|
||||
if (zend_mm_low_bit(seg_size) != zend_mm_high_bit(seg_size)) {
|
||||
fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power ow two.\n");
|
||||
fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power of two\n");
|
||||
exit(255);
|
||||
} else if (seg_size < ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE) {
|
||||
fprintf(stderr, "ZEND_MM_SEG_SIZE is too small\n");
|
||||
exit(255);
|
||||
}
|
||||
} else {
|
||||
|
||||
+3
-2
@@ -113,6 +113,7 @@ inline static void * __zend_realloc(void *p, size_t len)
|
||||
#define safe_perealloc(ptr, nmemb, size, offset, persistent) ((persistent)?_safe_realloc((ptr), (nmemb), (size), (offset)):safe_erealloc((ptr), (nmemb), (size), (offset)))
|
||||
#define perealloc_recoverable(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc_recoverable((ptr), (size)))
|
||||
#define pestrdup(s, persistent) ((persistent)?strdup(s):estrdup(s))
|
||||
#define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
|
||||
|
||||
#define pemalloc_rel(size, persistent) ((persistent)?__zend_malloc(size):emalloc_rel(size))
|
||||
#define pefree_rel(ptr, persistent) ((persistent)?free(ptr):efree_rel(ptr))
|
||||
@@ -199,12 +200,12 @@ ZEND_API size_t _zend_mm_block_size(zend_mm_heap *heap, void *p ZEND_FILE_LINE_D
|
||||
#define zend_mm_alloc(heap, size) _zend_mm_alloc((heap), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_free(heap, p) _zend_mm_free((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_realloc(heap, p, size) _zend_mm_realloc((heap), (p), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_block_size(heap, p) _zend_mm_block_size((heap), (p), ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_block_size(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
|
||||
#define zend_mm_alloc_rel(heap, size) _zend_mm_alloc((heap), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define zend_mm_free_rel(heap, p) _zend_mm_free((heap), (p) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define zend_mm_realloc_rel(heap, p, size) _zend_mm_realloc((heap), (p), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
|
||||
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p), ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
|
||||
|
||||
/* Heaps with user defined storage */
|
||||
typedef struct _zend_mm_storage zend_mm_storage;
|
||||
|
||||
@@ -454,35 +454,24 @@ ZEND_FUNCTION(error_reporting)
|
||||
Define a new constant */
|
||||
ZEND_FUNCTION(define)
|
||||
{
|
||||
zval **var, **val, **non_cs, *val_free = NULL;
|
||||
int case_sensitive;
|
||||
char *name;
|
||||
int name_len;
|
||||
zval *val;
|
||||
zval *val_free = NULL;
|
||||
zend_bool non_cs = 0;
|
||||
int case_sensitive = CONST_CS;
|
||||
zend_constant c;
|
||||
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 2:
|
||||
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
case_sensitive = CONST_CS;
|
||||
break;
|
||||
case 3:
|
||||
if (zend_get_parameters_ex(3, &var, &val, &non_cs)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long_ex(non_cs);
|
||||
if (Z_LVAL_PP(non_cs)) {
|
||||
case_sensitive = 0;
|
||||
} else {
|
||||
case_sensitive = CONST_CS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
break;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|b", &name, &name_len, &val, &non_cs) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(non_cs) {
|
||||
case_sensitive = 0;
|
||||
}
|
||||
|
||||
repeat:
|
||||
switch (Z_TYPE_PP(val)) {
|
||||
switch (Z_TYPE_P(val)) {
|
||||
case IS_LONG:
|
||||
case IS_DOUBLE:
|
||||
case IS_STRING:
|
||||
@@ -492,13 +481,13 @@ repeat:
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (!val_free) {
|
||||
if (Z_OBJ_HT_PP(val)->get) {
|
||||
val_free = *val = Z_OBJ_HT_PP(val)->get(*val TSRMLS_CC);
|
||||
if (Z_OBJ_HT_P(val)->get) {
|
||||
val_free = val = Z_OBJ_HT_P(val)->get(val TSRMLS_CC);
|
||||
goto repeat;
|
||||
} else if (Z_OBJ_HT_PP(val)->cast_object) {
|
||||
} else if (Z_OBJ_HT_P(val)->cast_object) {
|
||||
ALLOC_INIT_ZVAL(val_free);
|
||||
if (Z_OBJ_HT_PP(val)->cast_object(*val, val_free, IS_STRING TSRMLS_CC) == SUCCESS) {
|
||||
val = &val_free;
|
||||
if (Z_OBJ_HT_P(val)->cast_object(val, val_free, IS_STRING TSRMLS_CC) == SUCCESS) {
|
||||
val = val_free;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -511,16 +500,15 @@ repeat:
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(var);
|
||||
|
||||
c.value = **val;
|
||||
c.value = *val;
|
||||
zval_copy_ctor(&c.value);
|
||||
if (val_free) {
|
||||
zval_ptr_dtor(&val_free);
|
||||
}
|
||||
c.flags = case_sensitive; /* non persistent */
|
||||
c.name = zend_strndup(Z_STRVAL_PP(var), Z_STRLEN_PP(var));
|
||||
c.name_len = Z_STRLEN_PP(var)+1;
|
||||
c.name = zend_strndup(name, name_len);
|
||||
c.name_len = name_len+1;
|
||||
c.module_number = PHP_USER_CONSTANT;
|
||||
if (zend_register_constant(&c TSRMLS_CC) == SUCCESS) {
|
||||
RETURN_TRUE;
|
||||
@@ -710,8 +698,6 @@ ZEND_FUNCTION(is_a)
|
||||
/* {{{ add_class_vars */
|
||||
static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *return_value TSRMLS_DC)
|
||||
{
|
||||
int instanceof = EG(scope) && instanceof_function(EG(scope), ce TSRMLS_CC);
|
||||
|
||||
if (zend_hash_num_elements(properties) > 0) {
|
||||
HashPosition pos;
|
||||
zval **prop;
|
||||
@@ -720,20 +706,28 @@ static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *re
|
||||
while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) {
|
||||
char *key, *class_name, *prop_name;
|
||||
uint key_len;
|
||||
ulong num_index;
|
||||
ulong num_index, h;
|
||||
int prop_name_len = 0;
|
||||
zval *prop_copy;
|
||||
zend_property_info *property_info;
|
||||
|
||||
zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos);
|
||||
zend_hash_move_forward_ex(properties, &pos);
|
||||
|
||||
zend_unmangle_property_name(key, key_len-1, &class_name, &prop_name);
|
||||
if (class_name) {
|
||||
if (class_name[0] != '*' && strcmp(class_name, ce->name)) {
|
||||
/* filter privates from base classes */
|
||||
continue;
|
||||
} else if (!instanceof) {
|
||||
/* filter protected if not inside class */
|
||||
continue;
|
||||
}
|
||||
prop_name_len = strlen(prop_name);
|
||||
|
||||
h = zend_get_hash_value(prop_name, prop_name_len+1);
|
||||
if (zend_hash_quick_find(&ce->properties_info, prop_name, prop_name_len+1, h, (void **) &property_info) == FAILURE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (property_info->flags & ZEND_ACC_SHADOW) {
|
||||
continue;
|
||||
} else if ((property_info->flags & ZEND_ACC_PRIVATE) && EG(scope) != ce) {
|
||||
continue;
|
||||
} else if ((property_info->flags & ZEND_ACC_PROTECTED) && zend_check_protected(ce, EG(scope)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* copy: enforce read only access */
|
||||
|
||||
+16
-8
@@ -565,6 +565,7 @@ void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC)
|
||||
CG(active_op_array)->vars[value->u.var].name,
|
||||
CG(active_op_array)->vars[value->u.var].name_len, 1);
|
||||
SET_UNUSED(opline->op2);
|
||||
opline->op2.u.EA.type = ZEND_FETCH_LOCAL;
|
||||
value = &opline->result;
|
||||
}
|
||||
}
|
||||
@@ -655,6 +656,8 @@ void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC)
|
||||
opline->opcode = ZEND_ASSIGN_REF;
|
||||
if (zend_is_function_or_method_call(rvar)) {
|
||||
opline->extended_value = ZEND_RETURNS_FUNCTION;
|
||||
} else if (rvar->u.EA.type & ZEND_PARSED_NEW) {
|
||||
opline->extended_value = ZEND_RETURNS_NEW;
|
||||
} else {
|
||||
opline->extended_value = 0;
|
||||
}
|
||||
@@ -1587,14 +1590,19 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC)
|
||||
zend_stack_top(&CG(function_call_stack), (void **) &function_ptr_ptr);
|
||||
function_ptr = *function_ptr_ptr;
|
||||
|
||||
if (original_op==ZEND_SEND_REF
|
||||
&& !CG(allow_call_time_pass_reference)) {
|
||||
zend_error(E_COMPILE_WARNING,
|
||||
"Call-time pass-by-reference has been deprecated; "
|
||||
"If you would like to pass it by reference, modify the declaration of %s(). "
|
||||
"If you would like to enable call-time pass-by-reference, you can set "
|
||||
"allow_call_time_pass_reference to true in your INI file",
|
||||
(function_ptr ? function_ptr->common.function_name : "[runtime function name]"));
|
||||
if (original_op == ZEND_SEND_REF && !CG(allow_call_time_pass_reference)) {
|
||||
if (function_ptr &&
|
||||
function_ptr->common.function_name &&
|
||||
function_ptr->common.type == ZEND_USER_FUNCTION &&
|
||||
!ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
|
||||
zend_error(E_COMPILE_WARNING,
|
||||
"Call-time pass-by-reference has been deprecated; "
|
||||
"If you would like to pass it by reference, modify the declaration of %s(). "
|
||||
"If you would like to enable call-time pass-by-reference, you can set "
|
||||
"allow_call_time_pass_reference to true in your INI file", function_ptr->common.function_name);
|
||||
} else {
|
||||
zend_error(E_COMPILE_WARNING, "Call-time pass-by-reference has been deprecated");
|
||||
}
|
||||
}
|
||||
|
||||
if (function_ptr) {
|
||||
|
||||
@@ -600,6 +600,7 @@ int zendlex(znode *zendlval TSRMLS_DC);
|
||||
#define ZEND_PARSED_FUNCTION_CALL (1<<3)
|
||||
#define ZEND_PARSED_VARIABLE (1<<4)
|
||||
#define ZEND_PARSED_REFERENCE_VARIABLE (1<<5)
|
||||
#define ZEND_PARSED_NEW (1<<6)
|
||||
|
||||
|
||||
/* unset types */
|
||||
@@ -685,6 +686,7 @@ int zendlex(znode *zendlval TSRMLS_DC);
|
||||
|
||||
|
||||
#define ZEND_RETURNS_FUNCTION 1<<0
|
||||
#define ZEND_RETURNS_NEW 1<<1
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
|
||||
@@ -1402,6 +1402,7 @@ ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_v
|
||||
} \
|
||||
EG(in_execution) = EX(original_in_execution); \
|
||||
EG(current_execute_data) = EX(prev_execute_data); \
|
||||
EG(opline_ptr) = NULL; \
|
||||
ZEND_VM_RETURN()
|
||||
|
||||
#include "zend_vm_execute.h"
|
||||
|
||||
@@ -824,7 +824,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
}
|
||||
EX(function_state).function =
|
||||
Z_OBJ_HT_PP(fci->object_pp)->get_method(fci->object_pp, fname, fname_len TSRMLS_CC);
|
||||
if (EX(function_state).function && calling_scope != EX(function_state).function->common.scope) {
|
||||
if (EX(function_state).function &&
|
||||
(EX(function_state).function->common.fn_flags & ZEND_ACC_PRIVATE) == 0 &&
|
||||
calling_scope != EX(function_state).function->common.scope) {
|
||||
char *function_name_lc = zend_str_tolower_dup(fname, fname_len);
|
||||
if (zend_hash_find(&calling_scope->function_table, function_name_lc, fname_len+1, (void **) &EX(function_state).function)==FAILURE) {
|
||||
efree(function_name_lc);
|
||||
|
||||
@@ -553,7 +553,7 @@ expr_without_variable:
|
||||
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
|
||||
| variable '=' expr { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
|
||||
| variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
|
||||
| variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
|
||||
| variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $3.u.EA.type = ZEND_PARSED_NEW; zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
|
||||
| T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
|
||||
| T_CLONE expr { zend_do_clone(&$$, &$2 TSRMLS_CC); }
|
||||
| variable T_PLUS_EQUAL expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 TSRMLS_CC); }
|
||||
|
||||
@@ -792,9 +792,11 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
|
||||
while (s<end) {
|
||||
if (*s=='\\') {
|
||||
s++;
|
||||
if (s>=end) {
|
||||
continue;
|
||||
if (s >= end) {
|
||||
*t++ = '\\';
|
||||
break;
|
||||
}
|
||||
|
||||
switch(*s) {
|
||||
case 'n':
|
||||
*t++ = '\n';
|
||||
@@ -1808,9 +1810,7 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
|
||||
while (s<end) {
|
||||
if (*s=='\\') {
|
||||
s++;
|
||||
if (s>=end) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(*s) {
|
||||
case '\\':
|
||||
case '\'':
|
||||
@@ -1919,8 +1919,13 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
|
||||
if (yyleng > CG(heredoc_len) && !memcmp(end - CG(heredoc_len), CG(heredoc), CG(heredoc_len))) {
|
||||
int len = yyleng - CG(heredoc_len) - 2; /* 2 for newline before and after label */
|
||||
|
||||
if (len > 0 && yytext[len - 1] == '\r' && yytext[len] == '\n') {
|
||||
len--;
|
||||
/* May have matched fooLABEL; make sure there's a newline before it */
|
||||
if (yytext[len] != '\n') {
|
||||
if (yytext[len] != '\r') {
|
||||
goto wrong_label;
|
||||
}
|
||||
} else if (len > 0 && yytext[len - 1] == '\r') {
|
||||
len--; /* Windows newline */
|
||||
}
|
||||
|
||||
/* Go back before last label char, to match in ST_END_HEREDOC state */
|
||||
@@ -1937,6 +1942,7 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
|
||||
} else {
|
||||
/* Go back to end of label, so the next match works correctly in case of
|
||||
* a variable or another label at the beginning of the next line */
|
||||
wrong_label:
|
||||
yyless(yyleng - 1);
|
||||
yymore();
|
||||
}
|
||||
|
||||
@@ -253,7 +253,6 @@ static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id TSRM
|
||||
static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number TSRMLS_DC)
|
||||
{
|
||||
if (ld->module_number == *module_number) {
|
||||
zend_hash_apply_with_argument(&EG(regular_list), (apply_func_arg_t) clean_module_resource, (void *) &(ld->resource_id) TSRMLS_CC);
|
||||
zend_hash_apply_with_argument(&EG(persistent_list), (apply_func_arg_t) clean_module_resource, (void *) &(ld->resource_id) TSRMLS_CC);
|
||||
return 1;
|
||||
} else {
|
||||
|
||||
@@ -95,10 +95,16 @@ extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
|
||||
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
|
||||
rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 1, resource_type); \
|
||||
ZEND_VERIFY_RESOURCE(rsrc);
|
||||
|
||||
#define ZEND_FETCH_RESOURCE_NO_RETURN(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
|
||||
(rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 1, resource_type))
|
||||
|
||||
#define ZEND_FETCH_RESOURCE2(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type1, resource_type2) \
|
||||
rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2); \
|
||||
ZEND_VERIFY_RESOURCE(rsrc);
|
||||
|
||||
#define ZEND_FETCH_RESOURCE2_NO_RETURN(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type1, resource_type2) \
|
||||
(rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2))
|
||||
|
||||
#define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \
|
||||
zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
|
||||
|
||||
@@ -328,6 +328,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
|
||||
!guard->in_get) {
|
||||
/* have getter - try with it! */
|
||||
ZVAL_ADDREF(object);
|
||||
guard->in_get = 1; /* prevent circular getting */
|
||||
rv = zend_std_call_getter(object, member TSRMLS_CC);
|
||||
guard->in_get = 0;
|
||||
@@ -352,6 +353,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
|
||||
} else {
|
||||
retval = &EG(uninitialized_zval_ptr);
|
||||
}
|
||||
zval_ptr_dtor(&object);
|
||||
} else {
|
||||
if (!silent) {
|
||||
zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
|
||||
@@ -422,12 +424,14 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
|
||||
if (zobj->ce->__set &&
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
|
||||
!guard->in_set) {
|
||||
ZVAL_ADDREF(object);
|
||||
guard->in_set = 1; /* prevent circular setting */
|
||||
if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) {
|
||||
/* for now, just ignore it - __set should take care of warnings, etc. */
|
||||
}
|
||||
setter_done = 1;
|
||||
guard->in_set = 0;
|
||||
zval_ptr_dtor(&object);
|
||||
}
|
||||
if (!setter_done && property_info) {
|
||||
zval **foo;
|
||||
@@ -602,9 +606,11 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC)
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
|
||||
!guard->in_unset) {
|
||||
/* have unseter - try with it! */
|
||||
ZVAL_ADDREF(object);
|
||||
guard->in_unset = 1; /* prevent circular unsetting */
|
||||
zend_std_call_unsetter(object, member TSRMLS_CC);
|
||||
guard->in_unset = 0;
|
||||
zval_ptr_dtor(&object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1020,6 +1026,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
|
||||
zval *rv;
|
||||
|
||||
/* have issetter - try with it! */
|
||||
ZVAL_ADDREF(object);
|
||||
guard->in_isset = 1; /* prevent circular getting */
|
||||
rv = zend_std_call_issetter(object, member TSRMLS_CC);
|
||||
if (rv) {
|
||||
@@ -1037,6 +1044,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
|
||||
}
|
||||
}
|
||||
guard->in_isset = 0;
|
||||
zval_ptr_dtor(&object);
|
||||
}
|
||||
} else {
|
||||
switch (has_set_exists) {
|
||||
|
||||
@@ -891,6 +891,11 @@ ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
|
||||
return FAILURE; /* division by zero */
|
||||
}
|
||||
if (op1->type == IS_LONG && op2->type == IS_LONG) {
|
||||
if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == LONG_MIN) {
|
||||
/* Prevent overflow error/crash */
|
||||
ZVAL_DOUBLE(result, (double) LONG_MIN / -1);
|
||||
return SUCCESS;
|
||||
}
|
||||
if (op1->value.lval % op2->value.lval == 0) { /* integer */
|
||||
result->type = IS_LONG;
|
||||
result->value.lval = op1->value.lval / op2->value.lval;
|
||||
|
||||
@@ -220,6 +220,9 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
|
||||
char *p = haystack;
|
||||
char ne = needle[needle_len-1];
|
||||
|
||||
if(needle_len > end-haystack) {
|
||||
return NULL;
|
||||
}
|
||||
end -= needle_len;
|
||||
|
||||
while (p <= end) {
|
||||
|
||||
+8
-15
@@ -984,9 +984,9 @@ static Bigint * diff(Bigint *a, Bigint *b)
|
||||
|
||||
static double ulp (double _x)
|
||||
{
|
||||
_double x;
|
||||
volatile _double x;
|
||||
register Long L;
|
||||
_double a;
|
||||
volatile _double a;
|
||||
|
||||
value(x) = _x;
|
||||
L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
|
||||
@@ -1026,7 +1026,7 @@ b2d
|
||||
{
|
||||
ULong *xa, *xa0, w, y, z;
|
||||
int k;
|
||||
_double d;
|
||||
volatile _double d;
|
||||
#ifdef VAX
|
||||
ULong d0, d1;
|
||||
#else
|
||||
@@ -1092,7 +1092,7 @@ static Bigint * d2b(double _d, int *e, int *bits)
|
||||
Bigint *b;
|
||||
int de, i, k;
|
||||
ULong *x, y, z;
|
||||
_double d;
|
||||
volatile _double d;
|
||||
#ifdef VAX
|
||||
ULong d0, d1;
|
||||
#endif
|
||||
@@ -1213,7 +1213,7 @@ static Bigint * d2b(double _d, int *e, int *bits)
|
||||
|
||||
static double ratio (Bigint *a, Bigint *b)
|
||||
{
|
||||
_double da, db;
|
||||
volatile _double da, db;
|
||||
int k, ka, kb;
|
||||
|
||||
value(da) = b2d(a, &ka);
|
||||
@@ -1480,7 +1480,7 @@ ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sig
|
||||
Bigint *b, *b1, *delta, *mlo, *mhi, *S, *tmp;
|
||||
double ds;
|
||||
char *s, *s0;
|
||||
_double d, d2, eps;
|
||||
volatile _double d, d2, eps;
|
||||
|
||||
value(d) = _d;
|
||||
|
||||
@@ -1720,14 +1720,7 @@ ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sig
|
||||
if (value(d) > 0.5 + value(eps))
|
||||
goto bump_up;
|
||||
else if (value(d) < 0.5 - value(eps)) {
|
||||
/* cut ALL traling zeros only if the number of chars is greater than precision
|
||||
* otherwise cut only extra zeros
|
||||
*/
|
||||
if (k < ndigits) {
|
||||
while(*--s == '0' && (s - s0) > k);
|
||||
} else {
|
||||
while(*--s == '0');
|
||||
}
|
||||
while(*--s == '0');
|
||||
s++;
|
||||
goto ret1;
|
||||
}
|
||||
@@ -2043,7 +2036,7 @@ ZEND_API double zend_strtod (CONST char *s00, char **se)
|
||||
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
|
||||
CONST char *s, *s0, *s1;
|
||||
double aadj, aadj1, adj;
|
||||
_double rv, rv0;
|
||||
volatile _double rv, rv0;
|
||||
Long L;
|
||||
ULong y, z;
|
||||
Bigint *bb, *bb1, *bd, *bd0, *bs, *delta, *tmp;
|
||||
|
||||
+21
-1
@@ -1482,7 +1482,13 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
|
||||
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
if (EG(exception)) {
|
||||
FREE_OP2_VAR_PTR();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_ASSIGN);
|
||||
} else if (OP2_TYPE == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
PZVAL_LOCK(*value_ptr_ptr);
|
||||
}
|
||||
if (OP1_TYPE == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
|
||||
zend_error(E_ERROR, "Cannot assign by reference to overloaded object");
|
||||
@@ -1491,6 +1497,10 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
|
||||
variable_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
|
||||
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
|
||||
|
||||
if (OP2_TYPE == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
(*variable_ptr_ptr)->refcount--;
|
||||
}
|
||||
|
||||
if (!RETURN_VALUE_UNUSED(&opline->result)) {
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = variable_ptr_ptr;
|
||||
PZVAL_LOCK(*variable_ptr_ptr);
|
||||
@@ -1815,7 +1825,17 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, ANY, CONST|TMP|VAR|UNUSED|CV)
|
||||
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
/* We are calling method of the other (incompatible) class,
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
|
||||
int severity;
|
||||
char *verb;
|
||||
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
severity = E_ERROR;
|
||||
verb = "cannot";
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
|
||||
|
||||
}
|
||||
if ((EX(object) = EG(This))) {
|
||||
|
||||
+95
-5
@@ -710,7 +710,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
|
||||
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
/* We are calling method of the other (incompatible) class,
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
|
||||
int severity;
|
||||
char *verb;
|
||||
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
severity = E_ERROR;
|
||||
verb = "cannot";
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
|
||||
|
||||
}
|
||||
if ((EX(object) = EG(This))) {
|
||||
@@ -911,7 +921,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
/* We are calling method of the other (incompatible) class,
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
|
||||
int severity;
|
||||
char *verb;
|
||||
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
severity = E_ERROR;
|
||||
verb = "cannot";
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
|
||||
|
||||
}
|
||||
if ((EX(object) = EG(This))) {
|
||||
@@ -1072,7 +1092,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
/* We are calling method of the other (incompatible) class,
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
|
||||
int severity;
|
||||
char *verb;
|
||||
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
severity = E_ERROR;
|
||||
verb = "cannot";
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
|
||||
|
||||
}
|
||||
if ((EX(object) = EG(This))) {
|
||||
@@ -1232,7 +1262,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_
|
||||
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
/* We are calling method of the other (incompatible) class,
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
|
||||
int severity;
|
||||
char *verb;
|
||||
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
severity = E_ERROR;
|
||||
verb = "cannot";
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
|
||||
|
||||
}
|
||||
if ((EX(object) = EG(This))) {
|
||||
@@ -1325,7 +1365,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
|
||||
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
/* We are calling method of the other (incompatible) class,
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
|
||||
int severity;
|
||||
char *verb;
|
||||
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
severity = E_ERROR;
|
||||
verb = "cannot";
|
||||
}
|
||||
zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
|
||||
|
||||
}
|
||||
if ((EX(object) = EG(This))) {
|
||||
@@ -12385,7 +12435,13 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
if (EG(exception)) {
|
||||
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
return ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
} else if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
PZVAL_LOCK(*value_ptr_ptr);
|
||||
}
|
||||
if (IS_VAR == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
|
||||
zend_error(E_ERROR, "Cannot assign by reference to overloaded object");
|
||||
@@ -12394,6 +12450,10 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
|
||||
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
|
||||
|
||||
if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
(*variable_ptr_ptr)->refcount--;
|
||||
}
|
||||
|
||||
if (!RETURN_VALUE_UNUSED(&opline->result)) {
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = variable_ptr_ptr;
|
||||
PZVAL_LOCK(*variable_ptr_ptr);
|
||||
@@ -14387,7 +14447,13 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
if (EG(exception)) {
|
||||
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
return ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
} else if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
PZVAL_LOCK(*value_ptr_ptr);
|
||||
}
|
||||
if (IS_VAR == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
|
||||
zend_error(E_ERROR, "Cannot assign by reference to overloaded object");
|
||||
@@ -14396,6 +14462,10 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
|
||||
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
|
||||
|
||||
if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
(*variable_ptr_ptr)->refcount--;
|
||||
}
|
||||
|
||||
if (!RETURN_VALUE_UNUSED(&opline->result)) {
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = variable_ptr_ptr;
|
||||
PZVAL_LOCK(*variable_ptr_ptr);
|
||||
@@ -24494,7 +24564,13 @@ static int ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
if (EG(exception)) {
|
||||
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
return ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
} else if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
PZVAL_LOCK(*value_ptr_ptr);
|
||||
}
|
||||
if (IS_CV == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
|
||||
zend_error(E_ERROR, "Cannot assign by reference to overloaded object");
|
||||
@@ -24503,6 +24579,10 @@ static int ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
|
||||
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
|
||||
|
||||
if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
(*variable_ptr_ptr)->refcount--;
|
||||
}
|
||||
|
||||
if (!RETURN_VALUE_UNUSED(&opline->result)) {
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = variable_ptr_ptr;
|
||||
PZVAL_LOCK(*variable_ptr_ptr);
|
||||
@@ -26486,7 +26566,13 @@ static int ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
if (EG(exception)) {
|
||||
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
return ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
} else if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
PZVAL_LOCK(*value_ptr_ptr);
|
||||
}
|
||||
if (IS_CV == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
|
||||
zend_error(E_ERROR, "Cannot assign by reference to overloaded object");
|
||||
@@ -26495,6 +26581,10 @@ static int ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
|
||||
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
|
||||
|
||||
if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
|
||||
(*variable_ptr_ptr)->refcount--;
|
||||
}
|
||||
|
||||
if (!RETURN_VALUE_UNUSED(&opline->result)) {
|
||||
EX_T(opline->result.u.var).var.ptr_ptr = variable_ptr_ptr;
|
||||
PZVAL_LOCK(*variable_ptr_ptr);
|
||||
|
||||
+19
-10
@@ -837,7 +837,7 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx)
|
||||
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
|
||||
dnl
|
||||
dnl Basically sets up the link-stage for building module-name
|
||||
dnl from object_var in build-dir.
|
||||
@@ -860,7 +860,11 @@ AC_DEFUN([PHP_SHARED_MODULE],[
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
|
||||
if test "x$5" = "xyes"; then
|
||||
PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
|
||||
else
|
||||
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
|
||||
fi
|
||||
PHP_SUBST($2)
|
||||
cat >>Makefile.objects<<EOF
|
||||
\$(phplibdir)/$1.$suffix: $3/$1.$suffix
|
||||
@@ -916,7 +920,7 @@ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx]]]])
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx[, zend_ext]]]]])
|
||||
dnl
|
||||
dnl Includes an extension in the build.
|
||||
dnl
|
||||
@@ -928,6 +932,8 @@ dnl a dynamically loadable library. Optional parameter "sapi_class" can
|
||||
dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
|
||||
dnl "extra-cflags" are passed to the compiler, with
|
||||
dnl @ext_srcdir@ and @ext_builddir@ being substituted.
|
||||
dnl "cxx" can be used to indicate that a C++ shared module is desired.
|
||||
dnl "zend_ext" indicates a zend extension.
|
||||
AC_DEFUN([PHP_NEW_EXTENSION],[
|
||||
ext_builddir=[]PHP_EXT_BUILDDIR($1)
|
||||
ext_srcdir=[]PHP_EXT_SRCDIR($1)
|
||||
@@ -949,10 +955,10 @@ dnl ---------------------------------------------- Shared module
|
||||
PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
|
||||
case $host_alias in
|
||||
*netware*[)]
|
||||
PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6)
|
||||
PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
|
||||
;;
|
||||
*[)]
|
||||
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6)
|
||||
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
|
||||
@@ -2149,17 +2155,17 @@ AC_DEFUN([PHP_PROG_RE2C],[
|
||||
AC_CHECK_PROG(RE2C, re2c, re2c)
|
||||
if test -n "$RE2C"; then
|
||||
AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
|
||||
re2c_vernum=`re2c --vernum 2>/dev/null`
|
||||
if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1200"; then
|
||||
re2c_vernum=`$RE2C --vernum 2>/dev/null`
|
||||
if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
|
||||
php_cv_re2c_version=invalid
|
||||
else
|
||||
php_cv_re2c_version="`re2c --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
|
||||
php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
|
||||
fi
|
||||
])
|
||||
fi
|
||||
case $php_cv_re2c_version in
|
||||
""|invalid[)]
|
||||
AC_MSG_WARN([You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.])
|
||||
AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
|
||||
RE2C="exit 0;"
|
||||
;;
|
||||
esac
|
||||
@@ -2410,6 +2416,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
|
||||
$php_shtool mkdir -p ext/iconv
|
||||
|
||||
echo > ext/iconv/php_have_bsd_iconv.h
|
||||
echo > ext/iconv/php_have_ibm_iconv.h
|
||||
echo > ext/iconv/php_have_glibc_iconv.h
|
||||
echo > ext/iconv/php_have_libiconv.h
|
||||
echo > ext/iconv/php_have_iconv.h
|
||||
@@ -2711,6 +2718,7 @@ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
|
||||
enable-zend-multibyte[)] continue;;
|
||||
esac
|
||||
fi
|
||||
|
||||
is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
|
||||
if eval test "x\$$is_arg_set" = "x"; then
|
||||
PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
|
||||
@@ -2744,7 +2752,7 @@ ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
|
||||
|
||||
dnl
|
||||
dnl PHP_DETECT_ICC
|
||||
dnl
|
||||
dnl Detect Intel C++ Compiler and unset $GCC if ICC found
|
||||
AC_DEFUN([PHP_DETECT_ICC],
|
||||
[
|
||||
ICC="no"
|
||||
@@ -2753,6 +2761,7 @@ AC_DEFUN([PHP_DETECT_ICC],
|
||||
ICC="no"
|
||||
AC_MSG_RESULT([no]),
|
||||
ICC="yes"
|
||||
GCC="no"
|
||||
AC_MSG_RESULT([yes])
|
||||
)
|
||||
])
|
||||
|
||||
+115
-57
@@ -11,8 +11,8 @@ dnl ## Diversion 2 is the initial checking of OS features, programs,
|
||||
dnl ## libraries and so on.
|
||||
|
||||
dnl ## In diversion 3 we check for compile-time options to the PHP
|
||||
dnl ## core and how to deal with different system dependencies. This
|
||||
dnl ## includes what regex library is used and whether debugging or short
|
||||
dnl ## core and how to deal with different system dependencies.
|
||||
dnl ## This includes what regex library is used and whether debugging or short
|
||||
dnl ## tags are enabled, and the default behaviour of php.ini options.
|
||||
dnl ## This is also where an SAPI interface is selected (choosing between
|
||||
dnl ## Apache module, CGI etc.)
|
||||
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=2
|
||||
PHP_RELEASE_VERSION=6
|
||||
PHP_EXTRA_VERSION="RC4"
|
||||
PHP_RELEASE_VERSION=8
|
||||
PHP_EXTRA_VERSION=""
|
||||
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`
|
||||
|
||||
@@ -71,10 +71,10 @@ echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
|
||||
echo "#define PHP_VERSION_ID $PHP_VERSION_ID" >> php_version.h.new
|
||||
cmp php_version.h.new $srcdir/main/php_version.h >/dev/null 2>&1
|
||||
if test $? -ne 0 ; then
|
||||
rm -f $srcdir/main/php_version.h && mv php_version.h.new $srcdir/main/php_version.h && \
|
||||
echo 'Updated main/php_version.h'
|
||||
rm -f $srcdir/main/php_version.h && mv php_version.h.new $srcdir/main/php_version.h && \
|
||||
echo 'Updated main/php_version.h'
|
||||
else
|
||||
rm -f php_version.h.new
|
||||
rm -f php_version.h.new
|
||||
fi
|
||||
|
||||
|
||||
@@ -122,6 +122,21 @@ dnl or the contents of libs.
|
||||
$php_shtool mkdir -p libs
|
||||
rm -f libs/*
|
||||
|
||||
dnl Darwin 9 hack
|
||||
dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
|
||||
dnl causes errors in all current and past versions of Autoconf, we do a little
|
||||
dnl messing with the CFLAGS here to trick it.
|
||||
php_did_darwin9_cheat=0
|
||||
case $host_alias in
|
||||
*darwin9*)
|
||||
hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
|
||||
if test x"$hasg" = "x"; then
|
||||
php_did_darwin9_cheat=1
|
||||
CFLAGS="$CFLAGS -gstabs"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -146,17 +161,26 @@ dnl check for -R, etc. switch
|
||||
PHP_RUNPATH_SWITCH
|
||||
|
||||
dnl Checks for some support/generator progs
|
||||
PHP_PROG_RE2C
|
||||
PHP_PROG_AWK
|
||||
PHP_PROG_BISON
|
||||
PHP_PROG_LEX
|
||||
PHP_PROG_RE2C
|
||||
|
||||
dnl Check if bison generated files exist when bison does not..
|
||||
case $php_cv_bison_version in
|
||||
""|invalid[)]
|
||||
if ! test -f "$abs_srcdir/Zend/zend_language_parser.h" || ! test -f "$abs_srcdir/Zend/zend_language_parser.c" ; then
|
||||
AC_MSG_ERROR([bison is required to build PHP/Zend when building a CVS checkout!])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Platform-specific compile settings.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl See bug #28605
|
||||
case $host_cpu in
|
||||
alpha*)
|
||||
alpha*)
|
||||
if test "$GCC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -mieee"
|
||||
else
|
||||
@@ -166,15 +190,16 @@ alpha*)
|
||||
esac
|
||||
|
||||
case $host_alias in
|
||||
*solaris*)
|
||||
*solaris*)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
|
||||
enable_libgcc=yes
|
||||
fi
|
||||
;;
|
||||
*dgux*)
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
|
||||
*darwin*|*rhapsody*)
|
||||
*dgux*)
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR"
|
||||
;;
|
||||
*darwin*|*rhapsody*)
|
||||
if test -n "$GCC"; then
|
||||
PHP_CHECK_GCC_ARG(-no-cpp-precomp, gcc_no_cpp_precomp=yes)
|
||||
if test "$gcc_no_cpp_precomp" = "yes"; then
|
||||
@@ -182,18 +207,21 @@ case $host_alias in
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
|
||||
php_multiple_shlib_versions_ok=yes;;
|
||||
*beos*)
|
||||
php_multiple_shlib_versions_ok=yes
|
||||
;;
|
||||
*beos*)
|
||||
beos_threads=1
|
||||
LIBS="$LIBS -lbe -lroot";;
|
||||
*mips*)
|
||||
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
|
||||
*hpux*)
|
||||
LIBS="$LIBS -lbe -lroot"
|
||||
;;
|
||||
*mips*)
|
||||
CPPFLAGS="$CPPFLAGS -D_XPG_IV"
|
||||
;;
|
||||
*hpux*)
|
||||
if test "$GCC" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
|
||||
fi
|
||||
;;
|
||||
*netware*)
|
||||
*netware*)
|
||||
PHP_BUILD_PROGRAM
|
||||
PHP_ADD_SOURCES(/main, internal_functions.c,,PHP_GLOBAL_OBJS)
|
||||
PHP_ADD_SOURCES(win32, sendmail.c, -I$CFLAGS, PHP_GLOBAL_OBJS)
|
||||
@@ -208,7 +236,7 @@ esac
|
||||
# to avoid the performance hit from the lost register
|
||||
AC_MSG_CHECKING([whether to force non-PIC code in shared modules])
|
||||
case $host_alias in
|
||||
i?86-*-linux*|i?86-*-freebsd*)
|
||||
i?86-*-linux*|i?86-*-freebsd*)
|
||||
if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
|
||||
with_pic=no
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -216,7 +244,9 @@ i?86-*-linux*|i?86-*-freebsd*)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*) AC_MSG_RESULT(no) ;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -270,11 +300,10 @@ fi
|
||||
divert(3)
|
||||
|
||||
dnl ## In diversion 3 we check for compile-time options to the PHP
|
||||
dnl ## core and how to deal with different system dependencies. This
|
||||
dnl ## includes what regex library is used and whether debugging or short
|
||||
dnl ## core and how to deal with different system dependencies.
|
||||
dnl ## This includes what regex library is used and whether debugging or short
|
||||
dnl ## tags are enabled, and the default behaviour of php.ini options.
|
||||
|
||||
|
||||
dnl Starting system checks.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -295,8 +324,8 @@ PHP_TEST_WRITE_STDOUT
|
||||
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
|
||||
dnl and source packages. This should be harmless on other OSs.
|
||||
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
fi
|
||||
test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
|
||||
|
||||
@@ -362,7 +391,6 @@ langinfo.h \
|
||||
limits.h \
|
||||
locale.h \
|
||||
monetary.h \
|
||||
mach-o/dyld.h \
|
||||
netdb.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
@@ -414,6 +442,16 @@ assert.h
|
||||
#endif
|
||||
])
|
||||
|
||||
dnl Don't use mach-o/dyld.h on Darwin 8+, dl* is recommended by Apple from there on
|
||||
dnl See http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/Articles/loading_code.html
|
||||
case $host_alias in
|
||||
*darwin[[89]]*)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_HEADERS([mach-o/dyld.h],[],[],[])
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_FOPENCOOKIE
|
||||
PHP_BROKEN_GETCWD
|
||||
PHP_BROKEN_GLIBC_FOPEN_APPEND
|
||||
@@ -891,20 +929,24 @@ enable_shared=yes
|
||||
enable_static=yes
|
||||
|
||||
case $php_build_target in
|
||||
program|static)
|
||||
program|static)
|
||||
standard_libtool_flag='-prefer-non-pic -static'
|
||||
if test -z "$PHP_MODULES"; then
|
||||
if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
|
||||
enable_shared=no
|
||||
fi
|
||||
;;
|
||||
shared)
|
||||
;;
|
||||
shared)
|
||||
enable_static=no
|
||||
case $with_pic in
|
||||
yes) standard_libtool_flag='-prefer-pic';;
|
||||
no) standard_libtool_flag='-prefer-non-pic';;
|
||||
yes)
|
||||
standard_libtool_flag='-prefer-pic'
|
||||
;;
|
||||
no)
|
||||
standard_libtool_flag='-prefer-non-pic'
|
||||
;;
|
||||
esac
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
|
||||
@@ -1030,7 +1072,6 @@ case $datadir in
|
||||
'${prefix}/share')
|
||||
datadir=$datadir/php
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
phplibdir=`pwd`/modules
|
||||
@@ -1160,6 +1201,7 @@ PHP_SUBST(PHP_CLI_OBJS)
|
||||
PHP_SUBST(PHP_GLOBAL_OBJS)
|
||||
|
||||
PHP_SUBST(PHP_MODULES)
|
||||
PHP_SUBST(PHP_ZEND_EX)
|
||||
|
||||
PHP_SUBST(EXT_LIBS)
|
||||
|
||||
@@ -1241,6 +1283,17 @@ if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DTHREAD=1"
|
||||
fi
|
||||
|
||||
if test "$PHP_DEBUG" = "yes" && test "$PHP_THREAD_SAFETY" = "yes; then
|
||||
ZEND_EXT_TYPE="zend_extension_debug_ts"
|
||||
elif test "$PHP_DEBUG" = "yes"; then
|
||||
ZEND_EXT_TYPE="zend_extension_debug"
|
||||
elif test "$PHP_THREAD_SAFETY" = "yes; then
|
||||
ZEND_EXT_TYPE="zend_extension_ts"
|
||||
else
|
||||
ZEND_EXT_TYPE="zend_extension"
|
||||
fi
|
||||
PHP_SUBST(ZEND_EXT_TYPE)
|
||||
|
||||
dnl
|
||||
dnl Libtool creation
|
||||
dnl
|
||||
@@ -1250,10 +1303,14 @@ PHP_CONFIGURE_PART(Configuring libtool)
|
||||
|
||||
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
|
||||
|
||||
dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
|
||||
dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
|
||||
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
|
||||
AC_DEFUN([AC_PROG_CXX], [])])
|
||||
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
|
||||
dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
|
||||
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
|
||||
undefine([AC_PROG_CXX])
|
||||
AC_DEFUN([AC_PROG_CXX], [])
|
||||
undefine([AC_PROG_CXXCPP])
|
||||
AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
|
||||
])
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
if test "$enable_debug" != "yes"; then
|
||||
@@ -1269,6 +1326,15 @@ SHARED_LIBTOOL='$(LIBTOOL)'
|
||||
|
||||
CC=$old_CC
|
||||
|
||||
dnl Finish the Darwin hack
|
||||
if test "$php_did_darwin9_cheat" -eq 1; then
|
||||
if test "$PHP_DEBUG" = "yes"; then
|
||||
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-gstabs/-g/g'`
|
||||
else
|
||||
CFLAGS=`echo "-O2 $CFLAGS" | $SED -e 's/-gstabs//g'`
|
||||
fi
|
||||
fi
|
||||
|
||||
PHP_CONFIGURE_PART(Generating files)
|
||||
|
||||
CXXFLAGS_CLEAN=$CXXFLAGS
|
||||
@@ -1277,7 +1343,7 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
|
||||
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
|
||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
|
||||
|
||||
all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)"
|
||||
all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) \$(PHP_CLI_TARGET)"
|
||||
install_targets="$install_modules install-build install-headers install-programs $install_pear"
|
||||
|
||||
case $PHP_SAPI in
|
||||
@@ -1309,13 +1375,13 @@ PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \
|
||||
PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
|
||||
|
||||
case $host_alias in
|
||||
*netware*)
|
||||
PHP_ADD_BUILD_DIR(win32)
|
||||
PHP_ADD_BUILD_DIR(netware)
|
||||
;;
|
||||
*)
|
||||
PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli)
|
||||
;;
|
||||
*netware*)
|
||||
PHP_ADD_BUILD_DIR(win32)
|
||||
PHP_ADD_BUILD_DIR(netware)
|
||||
;;
|
||||
*)
|
||||
PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli)
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_ADD_SOURCES(Zend, \
|
||||
@@ -1330,8 +1396,7 @@ PHP_ADD_SOURCES(Zend, \
|
||||
zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c)
|
||||
|
||||
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
|
||||
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c \
|
||||
zend_default_classes.c)
|
||||
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_default_classes.c)
|
||||
fi
|
||||
|
||||
dnl Selectively disable optimization due to high RAM usage during
|
||||
@@ -1411,13 +1476,6 @@ dnl mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
|
||||
cli_extensions="$EXT_CLI_STATIC"
|
||||
sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$cli_extensions > main/internal_functions_cli.c
|
||||
|
||||
dnl if cmp main/internal_functions.c.old main/internal_functions.c > /dev/null 2>&1; then
|
||||
dnl echo "main/internal_functions.c is unchanged"
|
||||
dnl mv main/internal_functions.c.old main/internal_functions.c
|
||||
dnl else
|
||||
dnl rm -f main/internal_functions.c.old
|
||||
dnl fi
|
||||
|
||||
if test "$UNAME" = "FreeBSD" && test "$PHP_SAPI" = "apache2filter" && test "$TSRM_PTH" != "pth-config" ; then
|
||||
echo "+--------------------------------------------------------------------+"
|
||||
echo "| *** WARNING *** |"
|
||||
|
||||
@@ -248,6 +248,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
bz_file = BZ2_bzdopen(fd, mode);
|
||||
}
|
||||
}
|
||||
|
||||
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
|
||||
* failed.
|
||||
*/
|
||||
|
||||
+17
-3
@@ -34,6 +34,7 @@ typedef struct _php_bz2_filter_data {
|
||||
size_t inbuf_len;
|
||||
char *outbuf;
|
||||
size_t outbuf_len;
|
||||
zend_bool finished;
|
||||
} php_bz2_filter_data;
|
||||
|
||||
/* }}} */
|
||||
@@ -82,6 +83,11 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
|
||||
|
||||
bucket = php_stream_bucket_make_writeable(buckets_in->head TSRMLS_CC);
|
||||
while (bin < bucket->buflen) {
|
||||
if (data->finished) {
|
||||
consumed += bucket->buflen;
|
||||
break;
|
||||
}
|
||||
|
||||
desired = bucket->buflen - bin;
|
||||
if (desired > data->inbuf_len) {
|
||||
desired = data->inbuf_len;
|
||||
@@ -90,7 +96,11 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
|
||||
data->strm.avail_in = desired;
|
||||
|
||||
status = BZ2_bzDecompress(&(data->strm));
|
||||
if (status != BZ_OK && status != BZ_STREAM_END) {
|
||||
|
||||
if (status == BZ_STREAM_END) {
|
||||
BZ2_bzDecompressEnd(&(data->strm));
|
||||
data->finished = '\1';
|
||||
} else if (status != BZ_OK) {
|
||||
/* Something bad happened */
|
||||
php_stream_bucket_delref(bucket TSRMLS_CC);
|
||||
return PSFS_ERR_FATAL;
|
||||
@@ -115,10 +125,11 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
|
||||
return PSFS_PASS_ON;
|
||||
}
|
||||
}
|
||||
|
||||
php_stream_bucket_delref(bucket TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (flags & PSFS_FLAG_FLUSH_CLOSE) {
|
||||
if (!data->finished && (flags & PSFS_FLAG_FLUSH_CLOSE)) {
|
||||
/* Spit it out! */
|
||||
status = BZ_OK;
|
||||
while (status == BZ_OK) {
|
||||
@@ -148,7 +159,9 @@ static void php_bz2_decompress_dtor(php_stream_filter *thisfilter TSRMLS_DC)
|
||||
{
|
||||
if (thisfilter && thisfilter->abstract) {
|
||||
php_bz2_filter_data *data = thisfilter->abstract;
|
||||
BZ2_bzDecompressEnd(&(data->strm));
|
||||
if (!data->finished) {
|
||||
BZ2_bzDecompressEnd(&(data->strm));
|
||||
}
|
||||
pefree(data->inbuf, data->persistent);
|
||||
pefree(data->outbuf, data->persistent);
|
||||
pefree(data, data->persistent);
|
||||
@@ -327,6 +340,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
|
||||
}
|
||||
|
||||
status = BZ2_bzDecompressInit(&(data->strm), 0, smallFootprint);
|
||||
data->finished = '\0';
|
||||
fops = &php_bz2_decompress_ops;
|
||||
} else if (strcasecmp(filtername, "bzip2.compress") == 0) {
|
||||
int blockSize100k = PHP_BZ2_FILTER_DEFAULT_BLOCKSIZE;
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ if test "$PHP_CURL" != "no"; then
|
||||
}
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADER([openssl/crypto.h], [
|
||||
AC_CHECK_HEADERS([openssl/crypto.h], [
|
||||
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
|
||||
])
|
||||
], [
|
||||
|
||||
+28
-6
@@ -786,7 +786,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
{
|
||||
php_curl *ch = (php_curl *) ctx;
|
||||
php_curl_read *t = ch->handlers->read;
|
||||
int length = -1;
|
||||
int length = 0;
|
||||
|
||||
switch (t->method) {
|
||||
case PHP_CURL_DIRECT:
|
||||
@@ -833,7 +833,9 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
ch->in_callback = 0;
|
||||
if (error == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
|
||||
length = -1;
|
||||
#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
|
||||
length = CURL_READFUNC_ABORT;
|
||||
#endif
|
||||
} else if (retval_ptr) {
|
||||
if (Z_TYPE_P(retval_ptr) == IS_STRING) {
|
||||
length = MIN(size * nmemb, Z_STRLEN_P(retval_ptr));
|
||||
@@ -1419,7 +1421,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
case CURLOPT_READFUNCTION:
|
||||
if (ch->handlers->read->func_name) {
|
||||
zval_ptr_dtor(&ch->handlers->read->func_name);
|
||||
ch->handlers->write->fci_cache = empty_fcall_info_cache;
|
||||
ch->handlers->read->fci_cache = empty_fcall_info_cache;
|
||||
}
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->read->func_name = *zvalue;
|
||||
@@ -1428,7 +1430,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
case CURLOPT_HEADERFUNCTION:
|
||||
if (ch->handlers->write_header->func_name) {
|
||||
zval_ptr_dtor(&ch->handlers->write_header->func_name);
|
||||
ch->handlers->write->fci_cache = empty_fcall_info_cache;
|
||||
ch->handlers->write_header->fci_cache = empty_fcall_info_cache;
|
||||
}
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->write_header->func_name = *zvalue;
|
||||
@@ -1479,17 +1481,37 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
* must be explicitly cast to long in curl_formadd
|
||||
* use since curl needs a long not an int. */
|
||||
if (*postval == '@') {
|
||||
char *type;
|
||||
++postval;
|
||||
|
||||
if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + strlen(postval)))) {
|
||||
*type = '\0';
|
||||
}
|
||||
/* safe_mode / open_basedir check */
|
||||
if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
|
||||
if (type) {
|
||||
*type = ';';
|
||||
}
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
error = curl_formadd(&first, &last,
|
||||
if (type) {
|
||||
type++;
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_CONTENTTYPE, type,
|
||||
CURLFORM_END);
|
||||
*(type - 1) = ';';
|
||||
} else {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_END);
|
||||
|
||||
}
|
||||
} else {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
|
||||
+19423
-19412
File diff suppressed because it is too large.
Load diff
@@ -732,7 +732,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||
}
|
||||
#endif
|
||||
/* If we have a TimeZone identifier to start with, use it */
|
||||
if (strstr(tz_abbr, "/")) {
|
||||
if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) {
|
||||
if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) {
|
||||
t->tz_info = res;
|
||||
t->zone_type = TIMELIB_ZONETYPE_ID;
|
||||
@@ -792,7 +792,7 @@ tzcorrection = [+-] hour24 ":"? minute?;
|
||||
daysuf = "st" | "nd" | "rd" | "th";
|
||||
|
||||
month = "0"? [0-9] | "1"[0-2];
|
||||
day = ([0-2]?[0-9] | "3"[01]) daysuf?;
|
||||
day = (([0-2]?[0-9]) | ("3"[01])) daysuf?;
|
||||
year = [0-9]{1,4};
|
||||
year2 = [0-9]{2};
|
||||
year4 = [0-9]{4};
|
||||
@@ -842,11 +842,11 @@ iso8601date2 = year2 "-" monthlz "-" daylz;
|
||||
gnudateshorter = year4 "-" month;
|
||||
gnudateshort = year "-" month "-" day;
|
||||
pointeddate4 = day [.\t-] month [.-] year4;
|
||||
pointeddate2 = day [.\t-] month [.-] year2;
|
||||
pointeddate2 = day [.\t] month "." year2;
|
||||
datefull = day ([ \t.-])* monthtext ([ \t.-])* year;
|
||||
datenoday = monthtext ([ .\t-])* year4;
|
||||
datenodayrev = year4 ([ .\t-])* monthtext;
|
||||
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]* year;
|
||||
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]+ year;
|
||||
datenoyear = monthtext ([ .\t-])* day [,.stndrh\t ]*;
|
||||
datenoyearrev = day ([ .\t-])* monthtext;
|
||||
datenocolon = year4 monthlz daylz;
|
||||
@@ -1125,6 +1125,7 @@ relativetext = reltextnumber space reltextunit;
|
||||
TIMELIB_HAVE_DATE();
|
||||
s->time->y = timelib_get_nr((char **) &ptr, 4);
|
||||
s->time->m = timelib_get_nr((char **) &ptr, 2);
|
||||
s->time->d = 1;
|
||||
TIMELIB_PROCESS_YEAR(s->time->y);
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
@@ -1406,7 +1407,9 @@ relativetext = reltextnumber space reltextunit;
|
||||
TIMELIB_UNHAVE_TIME();
|
||||
relunit = timelib_lookup_relunit((char**) &ptr);
|
||||
s->time->relative.weekday = relunit->multiplier;
|
||||
s->time->relative.weekday_behavior = 1;
|
||||
if (s->time->relative.weekday_behavior != 2) {
|
||||
s->time->relative.weekday_behavior = 1;
|
||||
}
|
||||
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEKDAY;
|
||||
@@ -1517,7 +1520,7 @@ relativetext = reltextnumber space reltextunit;
|
||||
while(*ptr) {
|
||||
i = timelib_get_unsigned_nr((char **) &ptr, 24);
|
||||
timelib_eat_spaces((char **) &ptr);
|
||||
timelib_set_relative((char **) &ptr, i, 0, s);
|
||||
timelib_set_relative((char **) &ptr, i, 1, s);
|
||||
}
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
|
||||
+40
-34
@@ -125,46 +125,52 @@ static void read_types(char **tzf, timelib_tzinfo *tz)
|
||||
memcpy(tz->timezone_abbr, *tzf, sizeof(char) * tz->charcnt);
|
||||
*tzf += sizeof(char) * tz->charcnt;
|
||||
|
||||
leap_buffer = (int32_t *) malloc(tz->leapcnt * 2 * sizeof(int32_t));
|
||||
if (!leap_buffer) {
|
||||
return;
|
||||
}
|
||||
memcpy(leap_buffer, *tzf, sizeof(int32_t) * tz->leapcnt * 2);
|
||||
*tzf += sizeof(int32_t) * tz->leapcnt * 2;
|
||||
if (tz->leapcnt) {
|
||||
leap_buffer = (int32_t *) malloc(tz->leapcnt * 2 * sizeof(int32_t));
|
||||
if (!leap_buffer) {
|
||||
return;
|
||||
}
|
||||
memcpy(leap_buffer, *tzf, sizeof(int32_t) * tz->leapcnt * 2);
|
||||
*tzf += sizeof(int32_t) * tz->leapcnt * 2;
|
||||
|
||||
tz->leap_times = (tlinfo*) malloc(tz->leapcnt * sizeof(tlinfo));
|
||||
if (!tz->leap_times) {
|
||||
return;
|
||||
tz->leap_times = (tlinfo*) malloc(tz->leapcnt * sizeof(tlinfo));
|
||||
if (!tz->leap_times) {
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < tz->leapcnt; i++) {
|
||||
tz->leap_times[i].trans = timelib_conv_int(leap_buffer[i * 2]);
|
||||
tz->leap_times[i].offset = timelib_conv_int(leap_buffer[i * 2 + 1]);
|
||||
}
|
||||
free(leap_buffer);
|
||||
}
|
||||
for (i = 0; i < tz->leapcnt; i++) {
|
||||
tz->leap_times[i].trans = timelib_conv_int(leap_buffer[i * 2]);
|
||||
tz->leap_times[i].offset = timelib_conv_int(leap_buffer[i * 2 + 1]);
|
||||
}
|
||||
free(leap_buffer);
|
||||
|
||||
buffer = (unsigned char*) malloc(tz->ttisstdcnt * sizeof(unsigned char));
|
||||
if (!buffer) {
|
||||
return;
|
||||
}
|
||||
memcpy(buffer, *tzf, sizeof(unsigned char) * tz->ttisstdcnt);
|
||||
*tzf += sizeof(unsigned char) * tz->ttisstdcnt;
|
||||
|
||||
for (i = 0; i < tz->ttisstdcnt; i++) {
|
||||
tz->type[i].isstdcnt = buffer[i];
|
||||
}
|
||||
free(buffer);
|
||||
if (tz->ttisstdcnt) {
|
||||
buffer = (unsigned char*) malloc(tz->ttisstdcnt * sizeof(unsigned char));
|
||||
if (!buffer) {
|
||||
return;
|
||||
}
|
||||
memcpy(buffer, *tzf, sizeof(unsigned char) * tz->ttisstdcnt);
|
||||
*tzf += sizeof(unsigned char) * tz->ttisstdcnt;
|
||||
|
||||
buffer = (unsigned char*) malloc(tz->ttisgmtcnt * sizeof(unsigned char));
|
||||
if (!buffer) {
|
||||
return;
|
||||
for (i = 0; i < tz->ttisstdcnt; i++) {
|
||||
tz->type[i].isstdcnt = buffer[i];
|
||||
}
|
||||
free(buffer);
|
||||
}
|
||||
memcpy(buffer, *tzf, sizeof(unsigned char) * tz->ttisgmtcnt);
|
||||
*tzf += sizeof(unsigned char) * tz->ttisgmtcnt;
|
||||
|
||||
for (i = 0; i < tz->ttisgmtcnt; i++) {
|
||||
tz->type[i].isgmtcnt = buffer[i];
|
||||
if (tz->ttisgmtcnt) {
|
||||
buffer = (unsigned char*) malloc(tz->ttisgmtcnt * sizeof(unsigned char));
|
||||
if (!buffer) {
|
||||
return;
|
||||
}
|
||||
memcpy(buffer, *tzf, sizeof(unsigned char) * tz->ttisgmtcnt);
|
||||
*tzf += sizeof(unsigned char) * tz->ttisgmtcnt;
|
||||
|
||||
for (i = 0; i < tz->ttisgmtcnt; i++) {
|
||||
tz->type[i].isgmtcnt = buffer[i];
|
||||
}
|
||||
free(buffer);
|
||||
}
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
void timelib_dump_tzinfo(timelib_tzinfo *tz)
|
||||
@@ -391,7 +397,7 @@ timelib_sll timelib_get_current_offset(timelib_time *t)
|
||||
switch (t->zone_type) {
|
||||
case TIMELIB_ZONETYPE_ABBR:
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
return t->z * 60;
|
||||
return (t->z + t->dst) * -60;
|
||||
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
gmt_offset = timelib_get_time_zone_info(t->sse, t->tz_info);
|
||||
|
||||
+3348
-2722
File diff suppressed because it is too large.
Load diff
+37
-16
@@ -136,35 +136,55 @@ static void do_adjust_relative(timelib_time* time)
|
||||
|
||||
static void do_adjust_special_weekday(timelib_time* time)
|
||||
{
|
||||
timelib_sll current_dow, this_weekday = 0, count;
|
||||
timelib_sll current_dow, count;
|
||||
|
||||
count = time->special.amount;
|
||||
|
||||
current_dow = timelib_day_of_week(time->y, time->m, time->d);
|
||||
count = time->special.amount;
|
||||
if (count == 0) {
|
||||
/* skip over saturday and sunday */
|
||||
if (current_dow == 6) {
|
||||
this_weekday = 2;
|
||||
time->d += 2;
|
||||
}
|
||||
/* skip over sunday */
|
||||
if (current_dow == 0) {
|
||||
this_weekday = 1;
|
||||
time->d += 1;
|
||||
}
|
||||
time->d += this_weekday;
|
||||
return;
|
||||
} else if (count > 0) {
|
||||
/* skip over saturday and sunday */
|
||||
if (current_dow == 5) {
|
||||
this_weekday = 2;
|
||||
time->d += 2;
|
||||
}
|
||||
/* skip over sunday */
|
||||
if (current_dow == 6) {
|
||||
this_weekday = 1;
|
||||
time->d += 1;
|
||||
}
|
||||
/* add increments of 5 weekdays as a week */
|
||||
time->d += (count / 5) * 7;
|
||||
/* if current DOW plus the remainder > 5, add two days */
|
||||
current_dow = timelib_day_of_week(time->y, time->m, time->d);
|
||||
time->d += (count % 5);
|
||||
if ((count % 5) + current_dow > 5) {
|
||||
time->d += 2;
|
||||
}
|
||||
} else if (count < 0) {
|
||||
if (current_dow == 0) {
|
||||
this_weekday = -1;
|
||||
}
|
||||
/* skip over sunday and saturday */
|
||||
if (current_dow == 1) {
|
||||
this_weekday = -2;
|
||||
time->d -= 2;
|
||||
}
|
||||
/* skip over satruday */
|
||||
if (current_dow == 0 ) {
|
||||
time->d -= 1;
|
||||
}
|
||||
/* subtract increments of 5 weekdays as a week */
|
||||
time->d += (count / 5) * 7;
|
||||
/* if current DOW minus the remainder < 0, subtract two days */
|
||||
current_dow = timelib_day_of_week(time->y, time->m, time->d);
|
||||
time->d += (count % 5);
|
||||
if ((count % 5) + current_dow < 1) {
|
||||
time->d -= 2;
|
||||
}
|
||||
}
|
||||
time->d += this_weekday + ((count / 5) * 7) + (count % 5);
|
||||
}
|
||||
|
||||
static void do_adjust_special(timelib_time* time)
|
||||
@@ -178,6 +198,7 @@ static void do_adjust_special(timelib_time* time)
|
||||
}
|
||||
do_normalize(time);
|
||||
memset(&(time->special), 0, sizeof(time->special));
|
||||
time->have_relative = 0;
|
||||
}
|
||||
|
||||
static timelib_sll do_years(timelib_sll year)
|
||||
@@ -186,10 +207,10 @@ static timelib_sll do_years(timelib_sll year)
|
||||
timelib_sll res = 0;
|
||||
timelib_sll eras;
|
||||
|
||||
eras = (year - 1970) / 400;
|
||||
eras = (year - 1970) / 40000;
|
||||
if (eras != 0) {
|
||||
year = year - (eras * 400);
|
||||
res += (SECS_PER_ERA * eras);
|
||||
year = year - (eras * 40000);
|
||||
res += (SECS_PER_ERA * eras * 100);
|
||||
}
|
||||
|
||||
if (year >= 1970) {
|
||||
|
||||
@@ -76,12 +76,18 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)
|
||||
*/
|
||||
|
||||
while (tmp_days <= 0) {
|
||||
cur_year--;
|
||||
DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year););
|
||||
if (timelib_is_leap(cur_year)) {
|
||||
tmp_days += DAYS_PER_LYEAR;
|
||||
if (tmp_days < -1460970) {
|
||||
cur_year -= 4000;
|
||||
DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year););
|
||||
tmp_days += 1460970;
|
||||
} else {
|
||||
tmp_days += DAYS_PER_YEAR;
|
||||
cur_year--;
|
||||
DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year););
|
||||
if (timelib_is_leap(cur_year)) {
|
||||
tmp_days += DAYS_PER_LYEAR;
|
||||
} else {
|
||||
tmp_days += DAYS_PER_YEAR;
|
||||
}
|
||||
}
|
||||
}
|
||||
remainder += SECS_PER_DAY;
|
||||
|
||||
+26
-45
@@ -269,9 +269,9 @@ struct _php_timezone_obj {
|
||||
int initialized;
|
||||
int type;
|
||||
union {
|
||||
timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
|
||||
timelib_sll utc_offset; // TIMELIB_ZONETYPE_OFFSET
|
||||
struct // TIMELIB_ZONETYPE_ABBR
|
||||
timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID; */
|
||||
timelib_sll utc_offset; /* TIMELIB_ZONETYPE_OFFSET */
|
||||
struct /* TIMELIB_ZONETYPE_ABBR */
|
||||
{
|
||||
timelib_sll utc_offset;
|
||||
char *abbr;
|
||||
@@ -731,7 +731,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||
char buffer[33];
|
||||
timelib_time_offset *offset = NULL;
|
||||
timelib_sll isoweek, isoyear;
|
||||
int rfc_colon = 0;
|
||||
int rfc_colon;
|
||||
|
||||
if (!format_len) {
|
||||
return estrdup("");
|
||||
@@ -761,6 +761,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||
timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear);
|
||||
|
||||
for (i = 0; i < format_len; i++) {
|
||||
rfc_colon = 0;
|
||||
switch (format[i]) {
|
||||
/* day */
|
||||
case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;
|
||||
@@ -1146,14 +1147,6 @@ PHP_FUNCTION(strtotime)
|
||||
timelib_update_ts(t, tzi);
|
||||
ts = timelib_date_to_int(t, &error2);
|
||||
|
||||
/* if tz_info is not a copy, avoid double free */
|
||||
if (now->tz_info != tzi && now->tz_info) {
|
||||
timelib_tzinfo_dtor(now->tz_info);
|
||||
}
|
||||
if (t->tz_info != tzi) {
|
||||
timelib_tzinfo_dtor(t->tz_info);
|
||||
}
|
||||
|
||||
timelib_time_dtor(now);
|
||||
timelib_time_dtor(t);
|
||||
|
||||
@@ -1195,7 +1188,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
|
||||
case 6:
|
||||
if (yea >= 0 && yea < 70) {
|
||||
yea += 2000;
|
||||
} else if (yea >= 70 && yea <= 110) {
|
||||
} else if (yea >= 70 && yea <= 100) {
|
||||
yea += 1900;
|
||||
}
|
||||
now->y = yea;
|
||||
@@ -1560,7 +1553,7 @@ static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC)
|
||||
new_obj->time->tz_abbr = strdup(old_obj->time->tz_abbr);
|
||||
}
|
||||
if (old_obj->time->tz_info) {
|
||||
new_obj->time->tz_info = timelib_tzinfo_clone(old_obj->time->tz_info);
|
||||
new_obj->time->tz_info = old_obj->time->tz_info;
|
||||
}
|
||||
|
||||
return new_ov;
|
||||
@@ -1644,9 +1637,6 @@ static void date_object_free_storage_date(void *object TSRMLS_DC)
|
||||
php_date_obj *intern = (php_date_obj *)object;
|
||||
|
||||
if (intern->time) {
|
||||
if (intern->time->tz_info) {
|
||||
timelib_tzinfo_dtor(intern->time->tz_info);
|
||||
}
|
||||
timelib_time_dtor(intern->time);
|
||||
}
|
||||
|
||||
@@ -1684,14 +1674,11 @@ static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
|
||||
timelib_time *now;
|
||||
timelib_tzinfo *tzi;
|
||||
timelib_error_container *err = NULL;
|
||||
int free_tzi = 0, type = TIMELIB_ZONETYPE_ID, new_dst, errors_found = 0;
|
||||
int type = TIMELIB_ZONETYPE_ID, new_dst, errors_found = 0;
|
||||
char *new_abbr;
|
||||
timelib_sll new_offset;
|
||||
|
||||
if (dateobj->time) {
|
||||
if (dateobj->time->tz_info) {
|
||||
timelib_tzinfo_dtor(dateobj->time->tz_info);
|
||||
}
|
||||
timelib_time_dtor(dateobj->time);
|
||||
}
|
||||
dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB);
|
||||
@@ -1715,8 +1702,7 @@ static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
|
||||
tzobj = (php_timezone_obj *) zend_object_store_get_object(timezone_object TSRMLS_CC);
|
||||
switch (tzobj->type) {
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
tzi = timelib_tzinfo_clone(tzobj->tzi.tz);
|
||||
free_tzi = 1;
|
||||
tzi = tzobj->tzi.tz;
|
||||
break;
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
new_offset = tzobj->tzi.utc_offset;
|
||||
@@ -1729,8 +1715,7 @@ static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
|
||||
}
|
||||
type = tzobj->type;
|
||||
} else if (dateobj->time->tz_info) {
|
||||
tzi = timelib_tzinfo_clone(dateobj->time->tz_info);
|
||||
free_tzi = 1;
|
||||
tzi = dateobj->time->tz_info;
|
||||
} else {
|
||||
tzi = get_timezone_info(TSRMLS_C);
|
||||
}
|
||||
@@ -1757,12 +1742,6 @@ static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
|
||||
|
||||
dateobj->time->have_weekday_relative = dateobj->time->have_relative = 0;
|
||||
|
||||
if (type == TIMELIB_ZONETYPE_ID && now->tz_info != tzi) {
|
||||
timelib_tzinfo_dtor(now->tz_info);
|
||||
}
|
||||
if (free_tzi) {
|
||||
timelib_tzinfo_dtor(tzi);
|
||||
}
|
||||
timelib_time_dtor(now);
|
||||
|
||||
return 1;
|
||||
@@ -1941,13 +1920,7 @@ PHP_FUNCTION(date_modify)
|
||||
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
|
||||
|
||||
tmp_time = timelib_strtotime(modify, modify_len, NULL, DATE_TIMEZONEDB);
|
||||
dateobj->time->relative.y = tmp_time->relative.y;
|
||||
dateobj->time->relative.m = tmp_time->relative.m;
|
||||
dateobj->time->relative.d = tmp_time->relative.d;
|
||||
dateobj->time->relative.h = tmp_time->relative.h;
|
||||
dateobj->time->relative.i = tmp_time->relative.i;
|
||||
dateobj->time->relative.s = tmp_time->relative.s;
|
||||
dateobj->time->relative.weekday = tmp_time->relative.weekday;
|
||||
memcpy(&dateobj->time->relative, &tmp_time->relative, sizeof(struct timelib_rel_time));
|
||||
dateobj->time->have_relative = tmp_time->have_relative;
|
||||
dateobj->time->have_weekday_relative = tmp_time->have_weekday_relative;
|
||||
dateobj->time->sse_uptodate = 0;
|
||||
@@ -2014,11 +1987,9 @@ PHP_FUNCTION(date_timezone_set)
|
||||
tzobj = (php_timezone_obj *) zend_object_store_get_object(timezone_object TSRMLS_CC);
|
||||
if (tzobj->type != TIMELIB_ZONETYPE_ID) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can only do this for zones with ID for now");
|
||||
return;
|
||||
}
|
||||
if (dateobj->time->tz_info) {
|
||||
timelib_tzinfo_dtor(dateobj->time->tz_info);
|
||||
}
|
||||
timelib_set_timezone(dateobj->time, timelib_tzinfo_clone(tzobj->tzi.tz));
|
||||
timelib_set_timezone(dateobj->time, tzobj->tzi.tz);
|
||||
timelib_unixtime2local(dateobj->time, dateobj->time->sse);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2271,9 +2242,19 @@ PHP_FUNCTION(timezone_offset_get)
|
||||
dateobj = (php_date_obj *) zend_object_store_get_object(dateobject TSRMLS_CC);
|
||||
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
|
||||
|
||||
offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz);
|
||||
RETVAL_LONG(offset->offset);
|
||||
timelib_time_offset_dtor(offset);
|
||||
switch (tzobj->type) {
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
offset = timelib_get_time_zone_info(dateobj->time->sse, tzobj->tzi.tz);
|
||||
RETVAL_LONG(offset->offset);
|
||||
timelib_time_offset_dtor(offset);
|
||||
break;
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
RETURN_LONG(tzobj->tzi.utc_offset * -60);
|
||||
break;
|
||||
case TIMELIB_ZONETYPE_ABBR:
|
||||
RETURN_LONG((tzobj->tzi.z.utc_offset - (tzobj->tzi.z.dst*60)) * -60);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
--TEST--
|
||||
Bug #43452 ("weekday" is not equivalent to "1 weekday" of the current weekday is "weekday")
|
||||
--INI--
|
||||
date.timezone=Europe/Oslo
|
||||
--FILE--
|
||||
<?php
|
||||
// <day> is equivalent to 1 <day> and will *not* forward if the current day
|
||||
// (November 1st) is the same day of week.
|
||||
$day = strtotime( "Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "1 Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "2 Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "3 Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n\n";
|
||||
|
||||
// forward one week, then behaves like above for week days
|
||||
$day = strtotime( "Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "+1 week Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "+2 week Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "+3 week Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n\n";
|
||||
|
||||
// First, second, etc skip to the first/second weekday *after* the current day.
|
||||
// This makes "first thursday" equivalent to "+1 week thursday" - but only
|
||||
// if the current day-of-week is the one mentioned in the phrase.
|
||||
$day = strtotime( "Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "first Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "second Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "third Thursday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n\n";
|
||||
|
||||
// Now the same where the current day-of-week does not match the one in the
|
||||
// phrase.
|
||||
$day = strtotime( "Friday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "first Friday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "second Friday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n";
|
||||
$day = strtotime( "third Friday Nov 2007" );
|
||||
echo date( DateTime::ISO8601, $day ), "\n\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
2007-11-01T00:00:00+0100
|
||||
2007-11-01T00:00:00+0100
|
||||
2007-11-08T00:00:00+0100
|
||||
2007-11-15T00:00:00+0100
|
||||
|
||||
2007-11-01T00:00:00+0100
|
||||
2007-11-08T00:00:00+0100
|
||||
2007-11-15T00:00:00+0100
|
||||
2007-11-22T00:00:00+0100
|
||||
|
||||
2007-11-01T00:00:00+0100
|
||||
2007-11-08T00:00:00+0100
|
||||
2007-11-15T00:00:00+0100
|
||||
2007-11-22T00:00:00+0100
|
||||
|
||||
2007-11-02T00:00:00+0100
|
||||
2007-11-02T00:00:00+0100
|
||||
2007-11-09T00:00:00+0100
|
||||
2007-11-16T00:00:00+0100
|
||||
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
Bug #44742 (timezone_offset_get() causes segmentation faults)
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('Europe/London');
|
||||
$dates = array(
|
||||
"2008-04-11 00:00:00+0000",
|
||||
"2008-04-11 00:00:00+0200",
|
||||
"2008-04-11 00:00:00+0330",
|
||||
"2008-04-11 00:00:00-0500",
|
||||
"2008-04-11 00:00:00-1130",
|
||||
"2008-04-11 00:00:00 CEST",
|
||||
"2008-04-11 00:00:00 CET",
|
||||
"2008-04-11 00:00:00 UTC",
|
||||
"2008-04-11 00:00:00 America/New_York",
|
||||
"2008-04-11 00:00:00 Europe/Oslo",
|
||||
"2008-04-11 00:00:00 Asia/Singapore",
|
||||
);
|
||||
foreach ($dates as $date)
|
||||
{
|
||||
$date = date_create($date);
|
||||
var_dump(timezone_offset_get(date_timezone_get($date), $date));
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(7200)
|
||||
int(12600)
|
||||
int(-18000)
|
||||
int(-41400)
|
||||
int(7200)
|
||||
int(3600)
|
||||
int(0)
|
||||
int(-14400)
|
||||
int(7200)
|
||||
int(28800)
|
||||
@@ -79,7 +79,7 @@ array(15) {
|
||||
["month"]=>
|
||||
int(12)
|
||||
["day"]=>
|
||||
bool(false)
|
||||
int(1)
|
||||
["hour"]=>
|
||||
bool(false)
|
||||
["minute"]=>
|
||||
@@ -171,7 +171,7 @@ array(12) {
|
||||
["month"]=>
|
||||
int(3)
|
||||
["day"]=>
|
||||
bool(false)
|
||||
int(1)
|
||||
["hour"]=>
|
||||
bool(false)
|
||||
["minute"]=>
|
||||
|
||||
@@ -7,7 +7,7 @@ error_reporting=2047
|
||||
--FILE--
|
||||
<?php
|
||||
$tzs = array("America/Toronto", "Europe/Oslo");
|
||||
$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 2001);
|
||||
$years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999, 2000, 2001);
|
||||
|
||||
foreach ($tzs as $tz) {
|
||||
echo $tz, "\n";
|
||||
@@ -32,7 +32,9 @@ Y: 70 - January 1970-01-01T01:01:01-0500
|
||||
Y: 71 - January 1971-01-01T01:01:01-0500
|
||||
Y: 99 - January 1999-01-01T01:01:01-0500
|
||||
Y: 100 - January 2000-01-01T01:01:01-0500
|
||||
Y: 105 - January 2005-01-01T01:01:01-0500
|
||||
Y: 101 - January 0101-01-01T01:01:01-0500
|
||||
Y: 105 - January 0105-01-01T01:01:01-0500
|
||||
Y: 110 - January 0110-01-01T01:01:01-0500
|
||||
Y: 1900 - January 1900-01-01T01:01:01-0500
|
||||
Y: 1901 - January 1901-01-01T01:01:01-0500
|
||||
Y: 1902 - January 1902-01-01T01:01:01-0500
|
||||
@@ -47,7 +49,9 @@ Y: 70 - January 1970-01-01T01:01:01+0100
|
||||
Y: 71 - January 1971-01-01T01:01:01+0100
|
||||
Y: 99 - January 1999-01-01T01:01:01+0100
|
||||
Y: 100 - January 2000-01-01T01:01:01+0100
|
||||
Y: 105 - January 2005-01-01T01:01:01+0100
|
||||
Y: 101 - January 0101-01-01T01:01:01+0100
|
||||
Y: 105 - January 0105-01-01T01:01:01+0100
|
||||
Y: 110 - January 0110-01-01T01:01:01+0100
|
||||
Y: 1900 - January 1900-01-01T01:01:01+0100
|
||||
Y: 1901 - January 1901-01-01T01:01:01+0100
|
||||
Y: 1902 - January 1902-01-01T01:01:01+0100
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
strtotime() function - a test to show the difference in behaviour between 'first' and '1', "second" and "2"...
|
||||
--XFAIL--
|
||||
Expected to fail - fix to bug 43452 needs to be back ported to PHP52
|
||||
--INI--
|
||||
date.timezone="UTC"
|
||||
--SKIPIF--
|
||||
<?php if (!function_exists('strtotime')) echo "SKIP"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* The first of December 2008 is a Monday.
|
||||
* The term "Monday December 2008" will be parsed as the first Monday in December 2008.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is parsed as the "first following Monday OR the current day if it is a Monday"
|
||||
*/
|
||||
var_dump(date('Y-m-d', strtotime('1 Monday December 2008')));
|
||||
/*
|
||||
* This is parsed as the "second following Monday OR the first following
|
||||
* Monday if the current day is a Monday"
|
||||
*/
|
||||
var_dump(date('Y-m-d', strtotime('2 Monday December 2008')));
|
||||
/*
|
||||
* This is parsed as the "third following Monday OR the second following
|
||||
* Monday if the current day is a Monday"
|
||||
*/
|
||||
var_dump(date('Y-m-d', strtotime('3 Monday December 2008')));
|
||||
/*
|
||||
* This is parsed as the "first following Monday after the first Monday in December"
|
||||
*/
|
||||
var_dump(date('Y-m-d', strtotime('first Monday December 2008')));
|
||||
/*
|
||||
* This is parsed as the "second following Monday after the first Monday in December"
|
||||
*/
|
||||
var_dump(date('Y-m-d', strtotime('second Monday December 2008')));
|
||||
/*
|
||||
* This is parsed as the "third following Monday after the first Monday in December"
|
||||
*/
|
||||
var_dump(date('Y-m-d', strtotime('third Monday December 2008')));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(10) "2008-12-01"
|
||||
string(10) "2008-12-08"
|
||||
string(10) "2008-12-15"
|
||||
string(10) "2008-12-08"
|
||||
string(10) "2008-12-15"
|
||||
string(10) "2008-12-22"
|
||||
+1
-1
@@ -360,7 +360,7 @@ static dba_handler handler[] = {
|
||||
DBA_HND(db3, DBA_LOCK_ALL) /* No lock in lib */
|
||||
#endif
|
||||
#if DBA_DB4
|
||||
DBA_HND(db4, DBA_LOCK_EXT) /* Locking done in library itself */
|
||||
DBA_HND(db4, DBA_LOCK_ALL) /* No lock in lib */
|
||||
#endif
|
||||
#if DBA_INIFILE
|
||||
DBA_HND(inifile, DBA_STREAM_OPEN|DBA_LOCK_ALL|DBA_CAST_AS_FD) /* No lock in lib */
|
||||
|
||||
+5
-6
@@ -36,7 +36,11 @@
|
||||
#include <db.h>
|
||||
#endif
|
||||
|
||||
static void php_dba_db4_errcall_fcn(const char *errpfx, char *msg)
|
||||
static void php_dba_db4_errcall_fcn(
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
|
||||
const DB_ENV *dbenv,
|
||||
#endif
|
||||
const char *errpfx, const char *msg)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
@@ -81,7 +85,6 @@ DBA_OPEN_FUNC(db4)
|
||||
return FAILURE; /* not possible */
|
||||
}
|
||||
|
||||
gmode |= DB_INIT_LOCK;
|
||||
if (info->flags & DBA_PERSISTENT) {
|
||||
gmode |= DB_THREAD;
|
||||
}
|
||||
@@ -91,10 +94,6 @@ DBA_OPEN_FUNC(db4)
|
||||
filemode = Z_LVAL_PP(info->argv[0]);
|
||||
}
|
||||
|
||||
#ifdef DB_FCNTL_LOCKING
|
||||
gmode |= DB_FCNTL_LOCKING;
|
||||
#endif
|
||||
|
||||
if ((err=db_create(&dbp, NULL, 0)) == 0) {
|
||||
dbp->set_errcall(dbp, php_dba_db4_errcall_fcn);
|
||||
if (
|
||||
|
||||
@@ -508,7 +508,9 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
|
||||
|
||||
/* 5 */
|
||||
if (ret == SUCCESS) {
|
||||
ret = inifile_truncate(dba, append ? pos_grp_next : pos_grp_start TSRMLS_CC); /* writes error on fail */
|
||||
if (!value || (key->name && strlen(key->name))) {
|
||||
ret = inifile_truncate(dba, append ? pos_grp_next : pos_grp_start TSRMLS_CC); /* writes error on fail */
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == SUCCESS) {
|
||||
|
||||
@@ -9,7 +9,6 @@ DBA DB4 handler test
|
||||
<?php
|
||||
$handler = 'db4';
|
||||
require_once('test.inc');
|
||||
$lock_flag = ''; // lock in library
|
||||
require_once('dba_handler.inc');
|
||||
?>
|
||||
===DONE===
|
||||
@@ -18,7 +17,22 @@ database handler: db4
|
||||
3NYNYY
|
||||
Content String 2
|
||||
Content 2 replaced
|
||||
Read during write: allowed
|
||||
Read during write: not allowed
|
||||
Content 2 replaced 2nd time
|
||||
The 6th value
|
||||
array(3) {
|
||||
["key number 6"]=>
|
||||
string(13) "The 6th value"
|
||||
["key2"]=>
|
||||
string(27) "Content 2 replaced 2nd time"
|
||||
["key5"]=>
|
||||
string(23) "The last content string"
|
||||
}
|
||||
--NO-LOCK--
|
||||
3NYNYY
|
||||
Content String 2
|
||||
Content 2 replaced
|
||||
Read during write: not allowed
|
||||
Content 2 replaced 2nd time
|
||||
The 6th value
|
||||
array(3) {
|
||||
|
||||
@@ -73,7 +73,7 @@ PHP_METHOD(domcdatasection, __construct)
|
||||
|
||||
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
|
||||
if (intern != NULL) {
|
||||
oldnode = (xmlNodePtr)intern->ptr;
|
||||
oldnode = dom_object_get_node(intern);
|
||||
if (oldnode != NULL) {
|
||||
php_libxml_node_free_resource(oldnode TSRMLS_CC);
|
||||
}
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ PHP_METHOD(domcomment, __construct)
|
||||
|
||||
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
|
||||
if (intern != NULL) {
|
||||
oldnode = (xmlNodePtr)intern->ptr;
|
||||
oldnode = dom_object_get_node(intern);
|
||||
if (oldnode != NULL) {
|
||||
php_libxml_node_free_resource(oldnode TSRMLS_CC);
|
||||
}
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ ZEND_END_ARG_INFO();
|
||||
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savexml, 0, 0, 0)
|
||||
ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
|
||||
ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
static
|
||||
|
||||
@@ -76,7 +76,7 @@ PHP_METHOD(domdocumentfragment, __construct)
|
||||
|
||||
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
|
||||
if (intern != NULL) {
|
||||
oldnode = (xmlNodePtr)intern->ptr;
|
||||
oldnode = dom_object_get_node(intern);
|
||||
if (oldnode != NULL) {
|
||||
php_libxml_node_free_resource(oldnode TSRMLS_CC);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_set_parameter, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, name)
|
||||
ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
|
||||
ZEND_ARG_INFO(0, value)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
static
|
||||
@@ -43,7 +43,7 @@ ZEND_END_ARG_INFO();
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_can_set_parameter, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, name)
|
||||
ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
|
||||
ZEND_ARG_INFO(0, value)
|
||||
ZEND_END_ARG_INFO();
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -585,6 +585,10 @@ PHP_FUNCTION(dom_element_set_attribute_node)
|
||||
xmlUnlinkNode((xmlNodePtr) existattrp);
|
||||
}
|
||||
|
||||
if (attrp->parent != NULL) {
|
||||
xmlUnlinkNode((xmlNodePtr) attrp);
|
||||
}
|
||||
|
||||
if (attrp->doc == NULL && nodep->doc != NULL) {
|
||||
attrobj->document = intern->document;
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)attrobj, NULL TSRMLS_CC);
|
||||
@@ -998,6 +1002,10 @@ PHP_FUNCTION(dom_element_set_attribute_node_ns)
|
||||
xmlUnlinkNode((xmlNodePtr) existattrp);
|
||||
}
|
||||
|
||||
if (attrp->parent != NULL) {
|
||||
xmlUnlinkNode((xmlNodePtr) attrp);
|
||||
}
|
||||
|
||||
if (attrp->doc == NULL && nodep->doc != NULL) {
|
||||
attrobj->document = intern->document;
|
||||
php_libxml_increment_doc_ref((php_libxml_node_object *)attrobj, NULL TSRMLS_CC);
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ ZEND_END_ARG_INFO();
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_set_user_data, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, key)
|
||||
ZEND_ARG_OBJ_INFO(0, data, DOMUserData, 0)
|
||||
ZEND_ARG_INFO(0, data)
|
||||
ZEND_ARG_INFO(0, handler)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ int dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry *basece,
|
||||
if (ce) {
|
||||
return zend_hash_update(doc_props->classmap, basece->name, basece->name_length + 1, &ce, sizeof(ce), NULL);
|
||||
} else {
|
||||
return zend_hash_del(doc_props->classmap, basece->name, basece->name_length + 1);
|
||||
zend_hash_del(doc_props->classmap, basece->name, basece->name_length + 1);
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
|
||||
@@ -81,7 +81,7 @@ PHP_METHOD(domprocessinginstruction, __construct)
|
||||
|
||||
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
|
||||
if (intern != NULL) {
|
||||
oldnode = (xmlNodePtr)intern->ptr;
|
||||
oldnode = dom_object_get_node(intern);
|
||||
if (oldnode != NULL) {
|
||||
php_libxml_node_free_resource(oldnode TSRMLS_CC);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
DOMCharacterData::appendData basic functionality test
|
||||
--CREDITS--
|
||||
Mike Sullivan <mike@regexia.com>
|
||||
#TestFest 2008 (London)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$document = new DOMDocument;
|
||||
$root = $document->createElement('root');
|
||||
$document->appendChild($root);
|
||||
|
||||
$cdata = $document->createElement('cdata');
|
||||
$root->appendChild($cdata);
|
||||
|
||||
$cdatanode = $document->createCDATASection('');
|
||||
$cdata->appendChild($cdatanode);
|
||||
$cdatanode->appendData('data');
|
||||
echo "CDATA Length (one append): " . $cdatanode->length . "\n";
|
||||
|
||||
$cdatanode->appendData('><&"');
|
||||
echo "CDATA Length (two appends): " . $cdatanode->length . "\n";
|
||||
|
||||
echo "CDATA Content: " . $cdatanode->data . "\n";
|
||||
|
||||
echo "\n" . $document->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
CDATA Length (one append): 4
|
||||
CDATA Length (two appends): 8
|
||||
CDATA Content: data><&"
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<root><cdata><![CDATA[data><&"]]></cdata></root>
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Test adding data to a DOMComment
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
$comment->appendData('-more-data');
|
||||
$dom->appendChild($comment);
|
||||
$dom->saveXML();
|
||||
echo $dom->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0"?>
|
||||
<!--test-comment-more-data-->
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
DOMComment::appendData basic functionality test
|
||||
--CREDITS--
|
||||
Mike Sullivan <mike@regexia.com>
|
||||
#TestFest 2008 (London)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$document = new DOMDocument;
|
||||
$root = $document->createElement('root');
|
||||
$document->appendChild($root);
|
||||
|
||||
$comment = $document->createElement('comment');
|
||||
$root->appendChild($comment);
|
||||
|
||||
$commentnode = $document->createComment('');
|
||||
$comment->appendChild($commentnode);
|
||||
$commentnode->appendData('data');
|
||||
echo "Comment Length (one append): " . $commentnode->length . "\n";
|
||||
|
||||
$commentnode->appendData('><&"');
|
||||
echo "Comment Length (two appends): " . $commentnode->length . "\n";
|
||||
|
||||
echo "Comment Content: " . $commentnode->data . "\n";
|
||||
|
||||
echo "\n" . $document->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Comment Length (one append): 4
|
||||
Comment Length (two appends): 8
|
||||
Comment Content: data><&"
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<root><comment><!--data><&"--></comment></root>
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Test inserting data into a DOMComment basic test
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//correct offset
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
$comment->insertData(4,'-inserted');
|
||||
$dom->appendChild($comment);
|
||||
echo $dom->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0"?>
|
||||
<!--test-inserted-comment-->
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Test inserting data into a DOMComment basic test
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//Negative offset
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
try {
|
||||
$comment->insertData(-1,'-inserted');
|
||||
} catch (DOMException $e ) {
|
||||
if ($e->getMessage() == 'Index Size Error'){
|
||||
echo "Throws DOMException for -ve offset\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Throws DOMException for -ve offset
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Test inserting data into a DOMComment basic test
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//offset to large
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
try {
|
||||
$comment->insertData(999,'-inserted');
|
||||
} catch (DOMException $e ) {
|
||||
if ($e->getMessage() == 'Index Size Error'){
|
||||
echo "Throws DOMException for offset too large\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Throws DOMException for offset too large
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Test replacing data into a DOMComment basic test
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php // require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
$comment->replaceData(4,1,'replaced');
|
||||
$dom->appendChild($comment);
|
||||
echo $dom->saveXML();
|
||||
|
||||
// Replaces rest of string if count is greater than length of existing string
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
$comment->replaceData(0,50,'replaced');
|
||||
$dom->appendChild($comment);
|
||||
echo $dom->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
<?xml version="1.0"?>
|
||||
<!--testreplacedcomment-->
|
||||
<?xml version="1.0"?>
|
||||
<!--replaced-->
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Test replacing data into a DOMComment basic test
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//Negative offset
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
try {
|
||||
$comment->replaceData(-1,4,'-inserted');
|
||||
} catch (DOMException $e ) {
|
||||
if ($e->getMessage() == 'Index Size Error'){
|
||||
echo "Throws DOMException for -ve offest\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Throws DOMException for -ve offest
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Test replacing data into a DOMComment basic test
|
||||
--CREDITS--
|
||||
Andrew Larssen <al@larssen.org>
|
||||
London TestFest 2008
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//offset to large
|
||||
$dom = new DomDocument();
|
||||
$comment = $dom->createComment('test-comment');
|
||||
try {
|
||||
$comment->replaceData(999,4,'-inserted');
|
||||
} catch (DOMException $e ) {
|
||||
if ($e->getMessage() == 'Index Size Error'){
|
||||
echo "Throws DOMException for offest too large\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Throws DOMException for offest too large
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Testing DOMDocumentFragment::appendXML and DOMDocumentFragment::hasChildNodes
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
|
||||
$fragment = $doc->createDocumentFragment();
|
||||
if ($fragment->hasChildNodes()) {
|
||||
echo "has child nodes\n";
|
||||
} else {
|
||||
echo "has no child nodes\n";
|
||||
}
|
||||
$fragment->appendXML('<foo>bar</foo>');
|
||||
if ($fragment->hasChildNodes()) {
|
||||
echo "has child nodes\n";
|
||||
} else {
|
||||
echo "has no child nodes\n";
|
||||
}
|
||||
--EXPECT--
|
||||
has no child nodes
|
||||
has child nodes
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
DomDocument::createAttribute() - basic test for DomDocument::createAttribute()
|
||||
--CREDITS--
|
||||
Muhammad Khalid Adnan
|
||||
# TestFest 2008
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$doc = new DOMDocument;
|
||||
|
||||
$node = $doc->createElement("para");
|
||||
$newnode = $doc->appendChild($node);
|
||||
|
||||
// A pass case.
|
||||
$test_attribute = $doc->createAttribute("hahaha");
|
||||
$node->appendChild($test_attribute);
|
||||
|
||||
echo $doc->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
<?xml version="1.0"?>
|
||||
<para hahaha=""/>
|
||||
|
||||
Loaded 100 of 1699 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user