mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 03:00:49 +00:00
Compare commits
1024
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
254298cea9 | ||
|
|
38af726f28 | ||
|
|
6c0b2a3a0e | ||
|
|
eb84243d04 | ||
|
|
3a30b7dfca | ||
|
|
2ded6af198 | ||
|
|
e4fb981bf0 | ||
|
|
0d4bf4110f | ||
|
|
6b838aa6d2 | ||
|
|
ef54c9c5ed | ||
|
|
481a5d8b18 | ||
|
|
cf9e914754 | ||
|
|
9c445100c8 | ||
|
|
ff8c39c8e9 | ||
|
|
2e9192926f | ||
|
|
6512c8669f | ||
|
|
faee4c72b8 | ||
|
|
f79bc0ac21 | ||
|
|
028ffa75f3 | ||
|
|
428088c848 | ||
|
|
9fca678c47 | ||
|
|
fcf959ad3e | ||
|
|
c21c2da229 | ||
|
|
be06106d62 | ||
|
|
cfa096dd4d | ||
|
|
69097f305c | ||
|
|
86529ad73c | ||
|
|
b109e5bd82 | ||
|
|
69ed9840ef | ||
|
|
5a64467cba | ||
|
|
553191ea5c | ||
|
|
84bc7c449c | ||
|
|
eb3a2ee1b7 | ||
|
|
596dd39fa3 | ||
|
|
1ca7c27638 | ||
|
|
aa1904f4ab | ||
|
|
565cec5cfc | ||
|
|
be62e2c702 | ||
|
|
fb44cca847 | ||
|
|
38ba16b060 | ||
|
|
3487ab7eb9 | ||
|
|
43d6b87ccb | ||
|
|
42c4e5c148 | ||
|
|
50e31fe9c1 | ||
|
|
f34f334638 | ||
|
|
87230feb91 | ||
|
|
8eb333ffa2 | ||
|
|
af0595c40b | ||
|
|
c4ec9018f5 | ||
|
|
abb6a035d3 | ||
|
|
ee12cbd751 | ||
|
|
e85a2dd296 | ||
|
|
01ba3e44b3 | ||
|
|
14909202a8 | ||
|
|
df4b288737 | ||
|
|
ea3faadf6a | ||
|
|
5ef06b0c62 | ||
|
|
fa955848f6 | ||
|
|
ce6bb055e1 | ||
|
|
6bdc96f68b | ||
|
|
fbd9757a39 | ||
|
|
a08f0425de | ||
|
|
8c3509c894 | ||
|
|
1eaf99d866 | ||
|
|
4e4cd57658 | ||
|
|
fbfef72ba5 | ||
|
|
707074aa6f | ||
|
|
50ca6f0fa1 | ||
|
|
e5f42bfd06 | ||
|
|
cb397e86ea | ||
|
|
a12e272b9a | ||
|
|
eba3dd019e | ||
|
|
bee4607345 | ||
|
|
e91b12acc7 | ||
|
|
0dc1918687 | ||
|
|
7a5348280e | ||
|
|
0dd637ea57 | ||
|
|
452ffe21a2 | ||
|
|
89a570638b | ||
|
|
87a7fa0abf | ||
|
|
84a4d1c20c | ||
|
|
54727670c3 | ||
|
|
6c621b15cd | ||
|
|
d2c593017d | ||
|
|
07db754f8d | ||
|
|
8f3677601e | ||
|
|
d3949380b8 | ||
|
|
1a174b0828 | ||
|
|
237feb2149 | ||
|
|
da729f3874 | ||
|
|
2ce1d0056d | ||
|
|
9a7db58096 | ||
|
|
456c790c63 | ||
|
|
dea8172f6d | ||
|
|
2767484162 | ||
|
|
87c7c2a3d1 | ||
|
|
0e8c20106f | ||
|
|
ff62865fc0 | ||
|
|
ae35c47a4b | ||
|
|
0d71754a2e | ||
|
|
df042dc98e | ||
|
|
38e95f692f | ||
|
|
6880bcc319 | ||
|
|
84543c1ee7 | ||
|
|
d5dacfc274 | ||
|
|
9dc54d8483 | ||
|
|
bb524935a3 | ||
|
|
1d2a24f530 | ||
|
|
c94ac24231 | ||
|
|
d6fd508045 | ||
|
|
cd1195c44e | ||
|
|
57b251cee8 | ||
|
|
67259ce03b | ||
|
|
4f8253338c | ||
|
|
4f6fa0ba12 | ||
|
|
b614214638 | ||
|
|
53952fef26 | ||
|
|
9096aef11a | ||
|
|
1d5c137b00 | ||
|
|
1e52beff0f | ||
|
|
2a481b01fb | ||
|
|
c4bee3fa96 | ||
|
|
18a433f0d9 | ||
|
|
c6b89853ef | ||
|
|
170b33dec0 | ||
|
|
2dcdcd8d5f | ||
|
|
5703dbea03 | ||
|
|
389811a6c5 | ||
|
|
b256c06592 | ||
|
|
c75d7f3af5 | ||
|
|
693e138d5d | ||
|
|
1434f64b7d | ||
|
|
44f8c63ff5 | ||
|
|
dad7ada835 | ||
|
|
9676c4b0ea | ||
|
|
4dbc65c7b7 | ||
|
|
a1fe3c1401 | ||
|
|
0b4c25d916 | ||
|
|
31a64059ca | ||
|
|
fa23faaca4 | ||
|
|
caa28c2a22 | ||
|
|
494877cbd1 | ||
|
|
b7fe1fe3d8 | ||
|
|
6105b12333 | ||
|
|
a3268aef52 | ||
|
|
094bb76bbf | ||
|
|
cf7e439938 | ||
|
|
dda3dfff9b | ||
|
|
1d51c0f7d6 | ||
|
|
7b6dce6a62 | ||
|
|
10a048bc3f | ||
|
|
0b18abd2f2 | ||
|
|
2c210cadd6 | ||
|
|
a5f518f00a | ||
|
|
91be772174 | ||
|
|
4d7a588951 | ||
|
|
1719e7c300 | ||
|
|
e5e26d817e | ||
|
|
e94965d0a7 | ||
|
|
697277d152 | ||
|
|
880b090479 | ||
|
|
c0677af865 | ||
|
|
eb9ca1bf82 | ||
|
|
33b43d710f | ||
|
|
85037bbfad | ||
|
|
22d7581a9b | ||
|
|
1bc451744f | ||
|
|
29aa08e3a8 | ||
|
|
f77a222897 | ||
|
|
ac2bdbaeb0 | ||
|
|
b46243e2e2 | ||
|
|
3ef866882a | ||
|
|
040871458c | ||
|
|
18b0a78708 | ||
|
|
e394a130f6 | ||
|
|
b8175c7919 | ||
|
|
efacbfff88 | ||
|
|
2594c77511 | ||
|
|
2595252ebf | ||
|
|
98a8665383 | ||
|
|
875c91b415 | ||
|
|
f9b8139e65 | ||
|
|
29b7b871b7 | ||
|
|
a6321016da | ||
|
|
cf2c0f3ee3 | ||
|
|
5007c77a31 | ||
|
|
bf34edee8f | ||
|
|
c21d59c08e | ||
|
|
25209f9a71 | ||
|
|
0de483dcf4 | ||
|
|
bbc9b86f0d | ||
|
|
ce1b22fd85 | ||
|
|
4c2d3cace1 | ||
|
|
67303f2999 | ||
|
|
c5d06308b1 | ||
|
|
98ce43e431 | ||
|
|
bbd230d119 | ||
|
|
d5ee6d613d | ||
|
|
4ddffe7b35 | ||
|
|
198361e012 | ||
|
|
bc72db169b | ||
|
|
5803d3b029 | ||
|
|
3758a57bba | ||
|
|
22693aa7fb | ||
|
|
6a1736de17 | ||
|
|
2b2fb3fd49 | ||
|
|
ef17ae4ecb | ||
|
|
d5cf5939f8 | ||
|
|
845bfd0a0c | ||
|
|
fc79d27624 | ||
|
|
722b937b8f | ||
|
|
cc83bf0be2 | ||
|
|
bbba732e79 | ||
|
|
8324654b13 | ||
|
|
976fbc7006 | ||
|
|
c2471b4950 | ||
|
|
4a391f68d5 | ||
|
|
5bd58e538e | ||
|
|
c0735c68da | ||
|
|
7cbdfd2757 | ||
|
|
02dd12385b | ||
|
|
5c51b3f11a | ||
|
|
ca1692fe16 | ||
|
|
c2dbf60325 | ||
|
|
d5d77c1beb | ||
|
|
88586426d4 | ||
|
|
943d08ee0f | ||
|
|
b164d2b97c | ||
|
|
76ff5590c2 | ||
|
|
4061a72664 | ||
|
|
6db1f59938 | ||
|
|
c6bc88db3a | ||
|
|
dc2f690377 | ||
|
|
b91f37fdc0 | ||
|
|
77fd5b8075 | ||
|
|
ba855e4824 | ||
|
|
9a983f9ccf | ||
|
|
80e91e8f0d | ||
|
|
4c92f98c4e | ||
|
|
911228f106 | ||
|
|
80fee52884 | ||
|
|
58c3410689 | ||
|
|
4d4871f578 | ||
|
|
e5b872a817 | ||
|
|
c6849dc9ba | ||
|
|
d32efcaeaf | ||
|
|
82d6e7855d | ||
|
|
275909c813 | ||
|
|
c068f17a31 | ||
|
|
5f4a55c67f | ||
|
|
8f584b3207 | ||
|
|
dbac748812 | ||
|
|
f21a5b2332 | ||
|
|
27fb503751 | ||
|
|
d5ab5a6452 | ||
|
|
1fee2957ae | ||
|
|
98c32cf3b0 | ||
|
|
ac40eed89d | ||
|
|
8d17f0c2cc | ||
|
|
0be7c56f86 | ||
|
|
06f5b207c9 | ||
|
|
d12cfe5b07 | ||
|
|
8926fbaf26 | ||
|
|
2acedb40e6 | ||
|
|
d9eeb2e6e6 | ||
|
|
1b7cad9a28 | ||
|
|
9c6d53b68c | ||
|
|
efcefa9fd9 | ||
|
|
a2c78531df | ||
|
|
79868f8566 | ||
|
|
e46f05a0a2 | ||
|
|
ca5c15efe4 | ||
|
|
3891e2a52e | ||
|
|
7c56a4d498 | ||
|
|
9251699926 | ||
|
|
532e142459 | ||
|
|
f03552c27d | ||
|
|
ec9c7a4599 | ||
|
|
780bda4ce1 | ||
|
|
58aeff1978 | ||
|
|
a966ab428a | ||
|
|
7aa125747e | ||
|
|
ffa06648fd | ||
|
|
076ada3a46 | ||
|
|
28c5f6948b | ||
|
|
77cd4db9cc | ||
|
|
62426919df | ||
|
|
fa2b95c95a | ||
|
|
b5145cb74d | ||
|
|
9ea28dd365 | ||
|
|
e71fee906e | ||
|
|
0d332b4edb | ||
|
|
1cbf3eb6c3 | ||
|
|
b80812021e | ||
|
|
f19b49815c | ||
|
|
963575b07f | ||
|
|
7e791e6e19 | ||
|
|
56510b5aaf | ||
|
|
a56bb8e06e | ||
|
|
7a4e20ca25 | ||
|
|
ef5691ff42 | ||
|
|
bfa792bb3c | ||
|
|
6b20ef8197 | ||
|
|
2d8ddcb682 | ||
|
|
af7d5f950d | ||
|
|
c935d23791 | ||
|
|
c934b1e7c9 | ||
|
|
50fa1e7a2f | ||
|
|
2b682228e2 | ||
|
|
c3e759372e | ||
|
|
8c84e5256b | ||
|
|
223a8da69d | ||
|
|
161dbf90ad | ||
|
|
844d49f80c | ||
|
|
b589d82176 | ||
|
|
d6439e0920 | ||
|
|
09e01d4384 | ||
|
|
f5f8a3cee2 | ||
|
|
b000227f0a | ||
|
|
78846dab86 | ||
|
|
2a6b53de4b | ||
|
|
60d0e60d87 | ||
|
|
85cee656e4 | ||
|
|
ae38f7ad1c | ||
|
|
672cf89dea | ||
|
|
872d28d545 | ||
|
|
51b01fca74 | ||
|
|
42aa79cd97 | ||
|
|
ed57e50fca | ||
|
|
77e32a6371 | ||
|
|
e88345d268 | ||
|
|
0125a3620b | ||
|
|
fdd4a42546 | ||
|
|
a212a16419 | ||
|
|
bae879486a | ||
|
|
60a8b1f6fb | ||
|
|
545b5fcd54 | ||
|
|
a207b7ea69 | ||
|
|
73de7b29b6 | ||
|
|
1c439aacf8 | ||
|
|
5c729bb28c | ||
|
|
a63ce91cd6 | ||
|
|
a2b373d224 | ||
|
|
6d78ad0f01 | ||
|
|
bcabef3c9f | ||
|
|
2ce7143347 | ||
|
|
4638a9c78e | ||
|
|
a358e4d0dd | ||
|
|
ababa2eabd | ||
|
|
76f8041036 | ||
|
|
aaea1e8b58 | ||
|
|
3b9ebac846 | ||
|
|
a00d5aa5bd | ||
|
|
316d82625a | ||
|
|
caa09a360e | ||
|
|
07c8bb9d6c | ||
|
|
4ee2949d68 | ||
|
|
cebcb49215 | ||
|
|
1f4ba45991 | ||
|
|
b1fbbea818 | ||
|
|
fbb3bc2b8c | ||
|
|
cb28009c72 | ||
|
|
017670317f | ||
|
|
329c258148 | ||
|
|
748590c6ab | ||
|
|
1e21fd1777 | ||
|
|
c46c584f97 | ||
|
|
28e248da9b | ||
|
|
4bc219eadb | ||
|
|
f3d7bf9cf3 | ||
|
|
a525ea8c5b | ||
|
|
b691c34579 | ||
|
|
7f594baaa3 | ||
|
|
5624073f74 | ||
|
|
c624bfb376 | ||
|
|
63a7abc493 | ||
|
|
4bf6310b15 | ||
|
|
b36044f633 | ||
|
|
5ef997b7eb | ||
|
|
888669dd69 | ||
|
|
3135976b14 | ||
|
|
a4a09a00ab | ||
|
|
da73057c2a | ||
|
|
3627bd185a | ||
|
|
df61b3c6eb | ||
|
|
2f577607b0 | ||
|
|
4caca3b57d | ||
|
|
1679a25308 | ||
|
|
f9e548a9e5 | ||
|
|
bdcc7e1460 | ||
|
|
24e68ba62c | ||
|
|
14e9fd36cd | ||
|
|
628d1d59d7 | ||
|
|
d07fcfd636 | ||
|
|
334d154acc | ||
|
|
b2449e38f2 | ||
|
|
45194181d2 | ||
|
|
5024e00b78 | ||
|
|
0754517cb2 | ||
|
|
650ece0b75 | ||
|
|
18d7a1b461 | ||
|
|
420c0ccda9 | ||
|
|
501b9f7894 | ||
|
|
e4e8e7b46a | ||
|
|
1f9610b81d | ||
|
|
0b311264b8 | ||
|
|
64ee5ebffb | ||
|
|
c380c743fc | ||
|
|
48ce6230b0 | ||
|
|
007f0fd43c | ||
|
|
2147f3e1f5 | ||
|
|
93ceb2ada5 | ||
|
|
91676429a5 | ||
|
|
802daf8f7c | ||
|
|
acbfafef3c | ||
|
|
f67eeca1ef | ||
|
|
540bab3e67 | ||
|
|
72550b4f0a | ||
|
|
459b3bfa6a | ||
|
|
4abb6878fd | ||
|
|
3bb252a461 | ||
|
|
0b75925a6f | ||
|
|
d1b5964a6e | ||
|
|
e30acaa428 | ||
|
|
ee9e684705 | ||
|
|
6e1f000090 | ||
|
|
4b9b4ad0dd | ||
|
|
5e0d5f2fa0 | ||
|
|
e5bbeae477 | ||
|
|
a231624c60 | ||
|
|
7c2896d60c | ||
|
|
728069b96b | ||
|
|
89de347f92 | ||
|
|
1941fb2bf1 | ||
|
|
fb3b83b85a | ||
|
|
3e3099f0d0 | ||
|
|
c912e1c07b | ||
|
|
918889c957 | ||
|
|
1cee22e83f | ||
|
|
ff9403f4c0 | ||
|
|
bf7764ce57 | ||
|
|
ed14e50435 | ||
|
|
eddb79e0ab | ||
|
|
e02a2ac8e8 | ||
|
|
6dacd1d269 | ||
|
|
ad6945538c | ||
|
|
913ca7786c | ||
|
|
954bb8e35e | ||
|
|
7f87b7e15c | ||
|
|
3050decf1e | ||
|
|
0dab567bcc | ||
|
|
854ddd8c6e | ||
|
|
e8ca212c9d | ||
|
|
1d1cafd4cc | ||
|
|
0158a15046 | ||
|
|
12a666b7e0 | ||
|
|
8d3123a0a1 | ||
|
|
563b6ba594 | ||
|
|
c16d5d946c | ||
|
|
22bd02b4b8 | ||
|
|
6346c75d15 | ||
|
|
d5045b3697 | ||
|
|
790b65617a | ||
|
|
995950facb | ||
|
|
d4afadbfbe | ||
|
|
964baec5e6 | ||
|
|
757a492651 | ||
|
|
1d16a525a5 | ||
|
|
19059ef91e | ||
|
|
e03540f80e | ||
|
|
d7db4660ee | ||
|
|
874e9e0006 | ||
|
|
86659d4de0 | ||
|
|
a809e1429e | ||
|
|
b718e008f5 | ||
|
|
920290d0dc | ||
|
|
d13a8c30df | ||
|
|
b2f934d74b | ||
|
|
6cb2f1cabc | ||
|
|
9ec93445a8 | ||
|
|
c9b0466df1 | ||
|
|
fe7cc3b1cf | ||
|
|
6b46e3b7b9 | ||
|
|
b7e602d74c | ||
|
|
5278a956f0 | ||
|
|
7705411a87 | ||
|
|
ff9a0a7811 | ||
|
|
3e5c792a6e | ||
|
|
4e48207626 | ||
|
|
ae424dbb83 | ||
|
|
2c3bd3bc30 | ||
|
|
e9b85ae00c | ||
|
|
86101f6162 | ||
|
|
ffe840983b | ||
|
|
05687be885 | ||
|
|
13878ae91e | ||
|
|
4bf10270c7 | ||
|
|
4b5fddfdc4 | ||
|
|
07530e05c4 | ||
|
|
53de77421d | ||
|
|
187336aaff | ||
|
|
795a087448 | ||
|
|
b723416322 | ||
|
|
722657e641 | ||
|
|
a20f01aef7 | ||
|
|
5ae716a724 | ||
|
|
d0a312e573 | ||
|
|
2ad2cb4054 | ||
|
|
7a2141e48a | ||
|
|
2ec070bb56 | ||
|
|
06eb625f50 | ||
|
|
47d3c72622 | ||
|
|
ccfabf9644 | ||
|
|
ed20cc0d63 | ||
|
|
74190c4d5e | ||
|
|
1e0340a447 | ||
|
|
79a8116f02 | ||
|
|
6b560284dd | ||
|
|
fbe70a47ea | ||
|
|
6295278dfc | ||
|
|
c79ec97b29 | ||
|
|
36d03e10a4 | ||
|
|
9eafbf0998 | ||
|
|
910bd85c7a | ||
|
|
42df1c901d | ||
|
|
66e3ea2c17 | ||
|
|
305f104687 | ||
|
|
307bd5a23b | ||
|
|
043a282d1b | ||
|
|
c6116d0ca4 | ||
|
|
0496b37bf0 | ||
|
|
74d7af3194 | ||
|
|
86d682ca7f | ||
|
|
82f9a77f57 | ||
|
|
ef04c97e2a | ||
|
|
ad07fa214e | ||
|
|
8062b50a07 | ||
|
|
979ed8e3f1 | ||
|
|
e493bbae1d | ||
|
|
d972b5de5b | ||
|
|
c6f719b915 | ||
|
|
984737ae63 | ||
|
|
25e8f839d5 | ||
|
|
40fff3e335 | ||
|
|
724c464ad0 | ||
|
|
ceee572c0b | ||
|
|
9d9e57236d | ||
|
|
9c602f1e6b | ||
|
|
9729792378 | ||
|
|
6c2782c92b | ||
|
|
fdd7bbac0f | ||
|
|
0f79478716 | ||
|
|
ec1d2c8dc9 | ||
|
|
ef600a05a5 | ||
|
|
c4e0f38aa7 | ||
|
|
5c3c95d224 | ||
|
|
c615df97f3 | ||
|
|
44807c9bbe | ||
|
|
f01baf3965 | ||
|
|
bcf5793b56 | ||
|
|
13cd2683cc | ||
|
|
8bb00a20d4 | ||
|
|
960ac2b4b0 | ||
|
|
30cadad903 | ||
|
|
4a6df1caf8 | ||
|
|
4482bfd2e4 | ||
|
|
025891e50f | ||
|
|
5ff316f1d6 | ||
|
|
feef90243a | ||
|
|
5db5d77cdb | ||
|
|
db4411e768 | ||
|
|
34b0f569e1 | ||
|
|
3b4eb71a05 | ||
|
|
030aea969b | ||
|
|
c7c937fb9b | ||
|
|
5ee03b46d2 | ||
|
|
01c9097c74 | ||
|
|
74de9b7c6f | ||
|
|
49638f0f8f | ||
|
|
624930c22f | ||
|
|
f558744785 | ||
|
|
564ea0fb1c | ||
|
|
09b3411803 | ||
|
|
b77d833eaf | ||
|
|
c174177a50 | ||
|
|
6ae535aaf8 | ||
|
|
c1412ea367 | ||
|
|
edd936517a | ||
|
|
9a29989bfd | ||
|
|
01a2453496 | ||
|
|
57e2723ce9 | ||
|
|
38db2b869c | ||
|
|
3c56aa38e8 | ||
|
|
e1583cd82e | ||
|
|
282eab49fb | ||
|
|
191307c968 | ||
|
|
c572a7fd8b | ||
|
|
d509bf07bd | ||
|
|
eaf01568a1 | ||
|
|
96ea9c6e5b | ||
|
|
2aa9a15641 | ||
|
|
3b92265bc3 | ||
|
|
ee780e60b8 | ||
|
|
30b25d0229 | ||
|
|
273bda7b21 | ||
|
|
7f492c7f66 | ||
|
|
51781931e2 | ||
|
|
13594f8a98 | ||
|
|
08c7d57d73 | ||
|
|
c570bed1da | ||
|
|
04961ad0c0 | ||
|
|
7012611307 | ||
|
|
5cd01fa48b | ||
|
|
e4ba76cdec | ||
|
|
9e6779cfac | ||
|
|
96271ff8fb | ||
|
|
aac2b9464d | ||
|
|
946c404c5d | ||
|
|
a2e4ef3ba4 | ||
|
|
c34ba188cc | ||
|
|
f071936f47 | ||
|
|
8e2850fe3c | ||
|
|
4a1ae192a6 | ||
|
|
1c4a6d3f32 | ||
|
|
3f1bdda498 | ||
|
|
aa152b1c50 | ||
|
|
32c8f50ea9 | ||
|
|
e933031ccb | ||
|
|
344a9b2c7e | ||
|
|
823224ef8d | ||
|
|
6b1bd0d0dc | ||
|
|
838402a1bc | ||
|
|
d4d49f4f12 | ||
|
|
de3f385e5c | ||
|
|
12ab20c4fe | ||
|
|
c52581d95e | ||
|
|
8d699be646 | ||
|
|
2229ab084c | ||
|
|
f250ef7824 | ||
|
|
813dd91af8 | ||
|
|
ebce70c20e | ||
|
|
17dc898a72 | ||
|
|
a48b65d6f5 | ||
|
|
3c624f108e | ||
|
|
71b075062b | ||
|
|
8ab86d944a | ||
|
|
14620596ab | ||
|
|
135f4ebc10 | ||
|
|
18ecb768d0 | ||
|
|
9066f91b01 | ||
|
|
a747855425 | ||
|
|
0ab4f57c99 | ||
|
|
9818b12488 | ||
|
|
dd4b27e943 | ||
|
|
6555a5a93e | ||
|
|
53a63b82d4 | ||
|
|
077ff24ef9 | ||
|
|
c3e1afc2a3 | ||
|
|
6a05922020 | ||
|
|
3999ac15b4 | ||
|
|
3b43d3002b | ||
|
|
3e79cbe9b1 | ||
|
|
ba836422c6 | ||
|
|
09ac5ebe7f | ||
|
|
ff6862b7e1 | ||
|
|
f68866c487 | ||
|
|
bfebb9c6aa | ||
|
|
1493336708 | ||
|
|
687f673bb9 | ||
|
|
00a461a989 | ||
|
|
8e7fa70fd5 | ||
|
|
d033f6904a | ||
|
|
e69b4a743e | ||
|
|
bfa336e891 | ||
|
|
ac345b5915 | ||
|
|
dc4bfd4d80 | ||
|
|
63b6c3bab3 | ||
|
|
355ffae8dc | ||
|
|
e636ed5789 | ||
|
|
426522f4e0 | ||
|
|
06a48156f0 | ||
|
|
82655fb856 | ||
|
|
48fc6c5237 | ||
|
|
32a9ff9aef | ||
|
|
0bae389aa4 | ||
|
|
93ed844901 | ||
|
|
e4a93c6d0a | ||
|
|
1627157cdd | ||
|
|
b702ce45ce | ||
|
|
47fcac267c | ||
|
|
6621987732 | ||
|
|
4b5eda20ae | ||
|
|
f5bf2d7ed7 | ||
|
|
884c20439c | ||
|
|
1a836712f0 | ||
|
|
7055f3bae5 | ||
|
|
a524e99076 | ||
|
|
721fe01e55 | ||
|
|
632c5a775f | ||
|
|
99eede75b1 | ||
|
|
e29517872b | ||
|
|
fea7c24372 | ||
|
|
d6ddd48ed0 | ||
|
|
3197576f2c | ||
|
|
91e968462f | ||
|
|
572cd2000b | ||
|
|
d080807957 | ||
|
|
a6fdd53b90 | ||
|
|
fb69372707 | ||
|
|
886690219d | ||
|
|
d9722865f7 | ||
|
|
b90c2e7cb1 | ||
|
|
0b6182b683 | ||
|
|
f974d42e18 | ||
|
|
7d8ff0b3fc | ||
|
|
ddf40dc32d | ||
|
|
011ec5b1af | ||
|
|
6abaea16ef | ||
|
|
e3d54cd30e | ||
|
|
3e6435e3c4 | ||
|
|
a42f47071f | ||
|
|
88667674e2 | ||
|
|
13c65dd8f7 | ||
|
|
802706c8a9 | ||
|
|
0008c005b9 | ||
|
|
4f89db675d | ||
|
|
afbe0bfb19 | ||
|
|
39d82c35c3 | ||
|
|
9f6c828f63 | ||
|
|
f14ec051af | ||
|
|
0be28396ae | ||
|
|
72f551ca66 | ||
|
|
80f98df54e | ||
|
|
415b75e3f5 | ||
|
|
ecf2cabcdd | ||
|
|
011547bd36 | ||
|
|
0c3d8accbb | ||
|
|
1bebeea29c | ||
|
|
77816c4ed9 | ||
|
|
020749e160 | ||
|
|
bcfdedd53f | ||
|
|
e0ca27fc23 | ||
|
|
d3ec090688 | ||
|
|
b43345ec0c | ||
|
|
7728a703f6 | ||
|
|
fbaed2ba81 | ||
|
|
a607ee15a8 | ||
|
|
1989085325 | ||
|
|
bb33de84b0 | ||
|
|
3c984d6d4f | ||
|
|
bdfcb7ca73 | ||
|
|
61abd918e7 | ||
|
|
70ebbdea0a | ||
|
|
558d25649d | ||
|
|
422a101fae | ||
|
|
2b72a6df0a | ||
|
|
d6e3b89d9b | ||
|
|
40cabb39c6 | ||
|
|
fe6bbdca72 | ||
|
|
ea8bdf5d8f | ||
|
|
7323f24b58 | ||
|
|
bcfdf04cbf | ||
|
|
49fa689d5b | ||
|
|
8d7a9aa9a3 | ||
|
|
30ef00c15c | ||
|
|
c299ac0bd4 | ||
|
|
4324c10d24 | ||
|
|
2a39c5e435 | ||
|
|
16d4cad828 | ||
|
|
22ce11b711 | ||
|
|
9ebb304ed5 | ||
|
|
255d78111a | ||
|
|
56274f384a | ||
|
|
36b2ebf95f | ||
|
|
4d82ed968e | ||
|
|
3bb8d604c7 | ||
|
|
afc82c756c | ||
|
|
996920a889 | ||
|
|
71b329c703 | ||
|
|
5f6b9cf5f6 | ||
|
|
4710871ab8 | ||
|
|
efdaf53cf5 | ||
|
|
3008404116 | ||
|
|
0a9e3e3d86 | ||
|
|
f6f23616b0 | ||
|
|
f7e075e4b9 | ||
|
|
947b9ce3f3 | ||
|
|
2cce527199 | ||
|
|
33bcc088ca | ||
|
|
eaf1121b7e | ||
|
|
b2ce675b6a | ||
|
|
9c0cfe0d6c | ||
|
|
00a0efa5a2 | ||
|
|
938763c753 | ||
|
|
913c81d4ad | ||
|
|
82b940adf2 | ||
|
|
040a647481 | ||
|
|
20fd5b9932 | ||
|
|
299a6a2baf | ||
|
|
865194fa4d | ||
|
|
fb7437d7f1 | ||
|
|
e40df88ad6 | ||
|
|
aa1be9514f | ||
|
|
3222df99d9 | ||
|
|
3e738e7a46 | ||
|
|
a05ca2c6d3 | ||
|
|
5626bcabf2 | ||
|
|
a7b3f59f7b | ||
|
|
c94580895f | ||
|
|
8a15edc308 | ||
|
|
6fbed2a9f3 | ||
|
|
a18c0be994 | ||
|
|
7e62c98201 | ||
|
|
251d108d58 | ||
|
|
2c3579fdd7 | ||
|
|
84208a6740 | ||
|
|
c7bc9053e1 | ||
|
|
a2d837585e | ||
|
|
4ad3ac09c1 | ||
|
|
78ecc18710 | ||
|
|
48c50e616a | ||
|
|
51735ad33f | ||
|
|
7f3ba73b3d | ||
|
|
0b6e00cd64 | ||
|
|
95b9e430f4 | ||
|
|
271b03b6f7 | ||
|
|
d3d84cc152 | ||
|
|
4ece5a103e | ||
|
|
a07b780bc6 | ||
|
|
e3685d6918 | ||
|
|
d48cc34211 | ||
|
|
bb451fe8ac | ||
|
|
34f39a1086 | ||
|
|
0bc4075753 | ||
|
|
6d32ad3c1f | ||
|
|
0c040fc5d3 | ||
|
|
ca6a024965 | ||
|
|
3cea6c7bf4 | ||
|
|
b6b8b5ffc6 | ||
|
|
a0ef3cc010 | ||
|
|
30bc1b72ef | ||
|
|
5b05a2da10 | ||
|
|
c7c4b92b38 | ||
|
|
c9a717fcb8 | ||
|
|
38450822ae | ||
|
|
4b90dd8f06 | ||
|
|
4121be50e9 | ||
|
|
c133062470 | ||
|
|
802cbbd49b | ||
|
|
5812e33052 | ||
|
|
5759108ed0 | ||
|
|
4d2e295344 | ||
|
|
8d7ecdfdbb | ||
|
|
b91afb10af | ||
|
|
0bdbd69561 | ||
|
|
0445f9025b | ||
|
|
6712e8680c | ||
|
|
eb0ae9417b | ||
|
|
8294411819 | ||
|
|
51eb7b4aea | ||
|
|
a4bc21cbe5 | ||
|
|
323769820f | ||
|
|
38576823b1 | ||
|
|
7b62380d6b | ||
|
|
1e09a216e4 | ||
|
|
de44ff21e5 | ||
|
|
323984a1ae | ||
|
|
1ae79dfe28 | ||
|
|
ba70e77b43 | ||
|
|
f2445c083a | ||
|
|
f096e27011 | ||
|
|
ff12af6133 | ||
|
|
7fbf3433c7 | ||
|
|
9f8376ead3 | ||
|
|
6c80425fb1 | ||
|
|
82be89d366 | ||
|
|
9f729f9c6b | ||
|
|
ff9c528454 | ||
|
|
7f97b581c2 | ||
|
|
3f511f6ddb | ||
|
|
dd7d7e2b6e | ||
|
|
cb22f59dbd | ||
|
|
706152d40d | ||
|
|
35d506b942 | ||
|
|
055622caf2 | ||
|
|
22717a0c8c | ||
|
|
7c7b7b4042 | ||
|
|
0608b239ab | ||
|
|
f5748aab6c | ||
|
|
631e6fc427 | ||
|
|
030bfc24ab | ||
|
|
89f977c117 | ||
|
|
28e7780326 | ||
|
|
fab09bda92 | ||
|
|
8abacb0292 | ||
|
|
4b0df64a46 | ||
|
|
ce125a6d46 | ||
|
|
97400732ad | ||
|
|
12e8c8ddc7 | ||
|
|
d34a636598 | ||
|
|
b6dc5c0574 | ||
|
|
91e30c22d1 | ||
|
|
8b083a9938 | ||
|
|
ce2c662791 | ||
|
|
1a9b6363f4 | ||
|
|
96ec5091f5 | ||
|
|
4aab8b21ac | ||
|
|
9d028122b4 | ||
|
|
c3fd834e3a | ||
|
|
c557abeb04 | ||
|
|
3fcaf01902 | ||
|
|
a61ac8cfe6 | ||
|
|
4ebb71d265 | ||
|
|
716cc044ef | ||
|
|
adefeac748 | ||
|
|
f2e15c11c4 | ||
|
|
d60e754107 | ||
|
|
0a68541055 | ||
|
|
925c892dc9 | ||
|
|
66ec8d9632 | ||
|
|
5765def870 | ||
|
|
077c6ea03b | ||
|
|
3e2513d8f3 | ||
|
|
af99e4e438 | ||
|
|
6b719df163 | ||
|
|
629eecbf7c | ||
|
|
3ac8882dc1 | ||
|
|
a987ae115d | ||
|
|
053c91d1ce | ||
|
|
9f9266cd88 | ||
|
|
7aea024b69 | ||
|
|
db53404011 | ||
|
|
22c4a22379 | ||
|
|
944f02b46d | ||
|
|
2b3e1ecece | ||
|
|
ff4522e7dc | ||
|
|
8728f276f9 | ||
|
|
4399a96a6b | ||
|
|
88c8ecb0a7 | ||
|
|
d52ad52511 | ||
|
|
792218240f | ||
|
|
8e5a9e931d | ||
|
|
7126bbbd9e | ||
|
|
e3fb9c3e8f | ||
|
|
9011deb604 | ||
|
|
db1fa7fa80 | ||
|
|
51d28a7b17 | ||
|
|
3100dc31f0 | ||
|
|
d602767ec5 | ||
|
|
e5912d6486 | ||
|
|
77e3667550 | ||
|
|
8cad08f9a3 | ||
|
|
79dbf136b0 | ||
|
|
72fed70e47 | ||
|
|
9c3e1e96b8 | ||
|
|
02f8fe6aa0 | ||
|
|
ff9bc5c5e1 | ||
|
|
0bde38f6d2 | ||
|
|
252f09fbe6 | ||
|
|
65e12bbf74 | ||
|
|
4904830ca5 | ||
|
|
10d64bd4a9 | ||
|
|
966e1e6833 | ||
|
|
6e617627f6 | ||
|
|
947df429ca | ||
|
|
9118a6ba7d | ||
|
|
65d1a3a441 | ||
|
|
bf8ac5f70c | ||
|
|
255422ab1e | ||
|
|
5dda7e709c | ||
|
|
c95f7e8bb7 | ||
|
|
3fdd12683f | ||
|
|
4219951e86 | ||
|
|
d92e82edc2 | ||
|
|
2b43578d54 | ||
|
|
ea9f303dd2 | ||
|
|
bdfafa3dd4 | ||
|
|
a2ad68d054 | ||
|
|
aa89f171fa | ||
|
|
85c513c1fc | ||
|
|
d72e47f4af | ||
|
|
1ed6d9109e | ||
|
|
d2e781ff7e | ||
|
|
bbd2a36b74 | ||
|
|
9e48089f65 | ||
|
|
007685a39d | ||
|
|
baa0e628be | ||
|
|
c4e040a468 | ||
|
|
9d8330a389 | ||
|
|
c06fb2f274 | ||
|
|
9d638e65c7 | ||
|
|
a2374d6a81 | ||
|
|
17530bbccd | ||
|
|
b3542a6ec4 | ||
|
|
7e9fd69bd8 | ||
|
|
7edf0f9e96 | ||
|
|
109dc1e6f6 | ||
|
|
9075bfd1d9 | ||
|
|
b48436eb77 | ||
|
|
7dcb90d877 | ||
|
|
0d161c7bfb | ||
|
|
00f576cc97 | ||
|
|
e6d3c85e89 | ||
|
|
4103f0bfbd | ||
|
|
e5a211bafc | ||
|
|
32027f5944 | ||
|
|
d189d478e3 | ||
|
|
baa869110b | ||
|
|
b4c07450d2 | ||
|
|
ba65b35b7f | ||
|
|
4d8283a3ad | ||
|
|
f1092fb663 | ||
|
|
023a3caf05 | ||
|
|
536ed996a0 | ||
|
|
ae31c3c66a | ||
|
|
2b2874eafd | ||
|
|
2d1f1b1b68 | ||
|
|
e95f0a0058 | ||
|
|
7db52b84b7 | ||
|
|
c5903bd6ab | ||
|
|
6788dcf3bc | ||
|
|
da3fad6285 | ||
|
|
ba9cdc0ad1 | ||
|
|
b764a1a782 |
No files matched your search
@@ -12,6 +12,25 @@ document ____executor_globals
|
||||
ZTS detection is automatically based on ext/standard module struct
|
||||
end
|
||||
|
||||
define print_cvs
|
||||
____executor_globals
|
||||
set $p = $eg.current_execute_data.CVs
|
||||
set $c = $eg.current_execute_data.op_array.last_var
|
||||
set $v = $eg.current_execute_data.op_array.vars
|
||||
set $i = 0
|
||||
|
||||
printf "Compiled variables count: %d\n", $c
|
||||
while $i < $c
|
||||
printf "%d = %s\n", $i, $v[$i].name
|
||||
if $p[$i] != 0
|
||||
printzv *$p[$i]
|
||||
else
|
||||
printf "*uninitialized*\n"
|
||||
end
|
||||
set $i = $i + 1
|
||||
end
|
||||
end
|
||||
|
||||
define dump_bt
|
||||
set $t = $arg0
|
||||
while $t
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>php-5.2</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+2
-2
@@ -58,8 +58,8 @@ Exceptions:
|
||||
calling.
|
||||
|
||||
[7] When commenting out code using a #if statement, do NOT use 0 only. Instead
|
||||
use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
|
||||
cvs user foo. This allows easier tracking of why code was commented out,
|
||||
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
|
||||
svn user foo. This allows easier tracking of why code was commented out,
|
||||
especially in bundled libraries.
|
||||
|
||||
[8] Do not define functions that are not available. For instance, if a
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_pgsql
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
|
||||
@@ -386,7 +386,7 @@ Apache 2.0 on Unix systems
|
||||
http://snaps.php.net/php5-latest.tar.gz or download binaries for
|
||||
Windows http://snaps.php.net/win32/php5-win32-latest.zip.
|
||||
* a prerelease version downloadable from http://qa.php.net/.
|
||||
* you have always the option to obtain PHP through anonymous CVS.
|
||||
* you have always the option to obtain PHP through SVN.
|
||||
|
||||
These versions of PHP are compatible to Apache 2.0.40 and later.
|
||||
|
||||
@@ -1303,8 +1303,8 @@ Introduction to PECL Installations
|
||||
|
||||
When building PHP modules, it's important to have known-good versions
|
||||
of the required tools (autoconf, automake, libtool, etc.) See the
|
||||
Anonymous CVS Instructions for details on the required tools, and
|
||||
required versions.
|
||||
SVN Instructions for details on the required tools, and required
|
||||
versions.
|
||||
__________________________________________________________________
|
||||
|
||||
Downloading PECL extensions
|
||||
@@ -1320,14 +1320,11 @@ Downloading PECL extensions
|
||||
PECL extensions that have releases listed on the PECL web site are
|
||||
available for download and installation using the pecl command.
|
||||
Specific revisions may also be specified.
|
||||
* CVS
|
||||
Most PECL extensions also reside in CVS. A web-based view may be
|
||||
seen at http://cvs.php.net/pecl/. To download straight from CVS,
|
||||
the following sequence of commands may be used. Note that phpfi is
|
||||
the password for user cvsread:
|
||||
* SVN
|
||||
All PECL files reside in SVN. A web-based view may be seen at
|
||||
http://svn.php.net/pecl/. To download straight from SVN, use:
|
||||
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
|
||||
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
|
||||
$ svn co http://svn.php.net/repository/pecl/<extname>/trunk <extname>
|
||||
|
||||
* Windows downloads
|
||||
Windows users may find compiled PECL binaries by downloading the
|
||||
|
||||
+5
-11
@@ -82,26 +82,21 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
|
||||
test: all
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(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) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(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`; \
|
||||
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -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_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(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); \
|
||||
$(PHP_EXECUTABLE) -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
|
||||
@@ -115,9 +110,8 @@ clean:
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
find . -name Makefile | xargs rm -f
|
||||
|
||||
.PHONY: all clean install distclean test
|
||||
.NOEXPORT:
|
||||
@@ -1,27 +1,431 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
19 Feb 2009, PHP 5.2.9RC3
|
||||
- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit linux).
|
||||
(Matt)
|
||||
- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
|
||||
characters). (for-bugs at hnw dot jp, Moriyoshi)
|
||||
- Fixed bug #47049 (SoapClient::__soapCall causes a segmentation fault).
|
||||
(Dmitry)
|
||||
- Fixed bug #45940 (MySQLI OO does not populate connect_error property on
|
||||
failed connect). (Johannes)
|
||||
- Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
|
||||
- Fixed bug #45327 (memory leak if offsetGet throws exception). (Greg)
|
||||
- Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
|
||||
17 Dec 2009, PHP 5.2.12
|
||||
|
||||
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
|
||||
single text node when using libxml2.7.3+. (Kalle)
|
||||
- Added protection for $_SESSION from interrupt corruption and improved
|
||||
"session.save_path" check. (Stas)
|
||||
- Added "max_file_uploads" INI directive, which can be set to limit the
|
||||
number of file uploads per-request to 20 by default, to prevent possible
|
||||
DOS via temporary file exhaustion. (Ilia)
|
||||
|
||||
- Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
|
||||
- Fixed error_log() to be binary safe when using message_type 3. (Jani)
|
||||
- Fixed unnecessary invocation of setitimer when timeouts have been disabled.
|
||||
(Arvind Srinivasan)
|
||||
- Fixed crash in com_print_typeinfo when an invalid typelib is given.
|
||||
(Pierre)
|
||||
- Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak.
|
||||
(Rasmus)
|
||||
- Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz
|
||||
Stachowiak. (Rasmus)
|
||||
- Fixed crash in SQLiteDatabase::ArrayQuery() and SQLiteDatabase::SingleQuery()
|
||||
when calling using Reflection. (Felipe)
|
||||
- Fixed crash when instantiating PDORow and PDOStatement through Reflection.
|
||||
(Felipe)
|
||||
- Fixed memory leak in openssl_pkcs12_export_to_file(). (Felipe)
|
||||
|
||||
- Updated timezone database to version 2009.19 (2009s). (Derick)
|
||||
|
||||
- Changed "post_max_size" php.ini directive to allow unlimited post size by
|
||||
setting it to 0. (Rasmus)
|
||||
|
||||
- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes
|
||||
segfault). (davbrown4 at yahoo dot com, Felipe)
|
||||
- Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
|
||||
(Jani)
|
||||
- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
|
||||
(Ilia, Pierrick)
|
||||
- Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).
|
||||
(Felipe)
|
||||
- Fixed bug #50282 (xmlrpc_encode_request() changes object into array in
|
||||
calling function). (Felipe)
|
||||
- Fixed bug #50266 (conflicting types for llabs). (Jani)
|
||||
- Fixed bug #50255 (isset() and empty() silently casts array to object).
|
||||
(Felipe)
|
||||
- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
|
||||
(Pierrick)
|
||||
- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
|
||||
(tcallawa at redhat dot com)
|
||||
- Fixed bug #50207 (segmentation fault when concatenating very large strings
|
||||
on 64bit linux). (Ilia)
|
||||
- Fixed bug #50195 (pg_copy_to() fails when table name contains schema. (Ilia)
|
||||
- Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
|
||||
when there is no error). (Jani)
|
||||
- Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
|
||||
- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
|
||||
non-existent file). (Dmitry)
|
||||
- Fixed bug #50162 (Memory leak when fetching timestamp column from Oracle
|
||||
database). (Felipe)
|
||||
- Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
|
||||
containing = or ?). (Pierrick)
|
||||
- Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
|
||||
- Fixed bug #50006 (Segfault caused by uksort()). (Felipe)
|
||||
- Fixed bug #50005 (Throwing through Reflection modified Exception object makes
|
||||
segmentation fault). (Felipe)
|
||||
- Fixed bug #49990 (SNMP3 warning message about security level printed twice).
|
||||
(Jani)
|
||||
- Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction).
|
||||
(ben dot pineau at gmail dot com, Ilia, Matteo)
|
||||
- Fixed bug #49972 (AppendIterator undefined function crash). (Johannes)
|
||||
- Fixed bug #49921 (Curl post upload functions changed). (Ilia)
|
||||
- Fixed bug #49855 (import_request_variables() always returns NULL).
|
||||
(Ilia, sjoerd at php dot net)
|
||||
- Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given
|
||||
output lines >4095 bytes). (Ilia)
|
||||
- Fixed bug #49809 (time_sleep_until() is not available on OpenSolaris). (Jani)
|
||||
- Fixed bug #49785 (insufficient input string validation of htmlspecialchars()).
|
||||
(Moriyoshi, hello at iwamot dot com)
|
||||
- Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded
|
||||
applications). (Ilia, Florian Anderiasch)
|
||||
- Fixed bug #49738 (calling mcrypt() after mcrypt_generic_deinit() crashes).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
|
||||
property in base class). (Felipe)
|
||||
- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus)
|
||||
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini
|
||||
variables). (Jani)
|
||||
- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
|
||||
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
|
||||
- Fixed bug #49630 (imap_listscan() function missing). (Felipe)
|
||||
- Fixed bug #49627 (error_log to specified file does not log time according to
|
||||
date.timezone). (Dmitry)
|
||||
- Fixed bug #49578 (make install-pear fails). (Hannes)
|
||||
- Fixed bug #49536 (mb_detect_encoding() returns incorrect results when
|
||||
mbstring.strict_mode is turned on). (Moriyoshi)
|
||||
- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE
|
||||
cannot be set"). (Felipe)
|
||||
- Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
|
||||
(Pierrick)
|
||||
- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
|
||||
fclose()). (Ilia)
|
||||
- Fixed bug #49472 (Constants defined in Interfaces can be overridden).
|
||||
(Felipe)
|
||||
- Fixed bug #49354 (mb_strcut() cuts wrong length when offset is in the middle
|
||||
of a multibyte character). (Moriyoshi)
|
||||
- Fixed bug #49332 (Build error with Snow Leopard). (Scott)
|
||||
- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
|
||||
- Fixed bug #49174 (crash when extending PDOStatement and trying to set
|
||||
queryString property). (Felipe)
|
||||
- Fixed bug #49098 (mysqli segfault on error). (Rasmus)
|
||||
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
|
||||
- Fixed bug #48764 (PDO_pgsql::query() always uses implicit prepared statements
|
||||
if v3 proto available). (Matteo, Mark Kirkwood)
|
||||
- Fixed bug #47848 (importNode doesn't preserve attribute namespaces). (Rob)
|
||||
- Fixed bug #45120 (PDOStatement->execute() returns true then false for same
|
||||
statement). (Pierrick)
|
||||
- Fixed bug #34852 (Failure in odbc_exec() using oracle-supplied odbc driver).
|
||||
(tim dot tassonis at trivadis dot com)
|
||||
|
||||
12 Feb 2009, PHP 5.2.9RC2
|
||||
- Fixed bug #47353 (crash when creating a lot of objects in object destructor).
|
||||
(Tony)
|
||||
- Fixed bug #47322 (sscanf %d doesn't work). (Felipe)
|
||||
- Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress after
|
||||
end of stream). (Greg)
|
||||
|
||||
02 Feb 2009, PHP 5.2.9RC1
|
||||
17 Sep 2009, PHP 5.2.11
|
||||
- Fixed certificate validation inside php_openssl_apply_verification_policy.
|
||||
(Ryan Sleevi, Ilia)
|
||||
- Updated timezone database to version 2009.13 (2009m) (Derick)
|
||||
- Added missing sanity checks around exif processing. (Ilia)
|
||||
- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
|
||||
- Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
|
||||
- Fixed leak on error in popen/exec (and related functions) on Windows.
|
||||
(Pierre)
|
||||
- Fixed regression in cURL extension that prevented flush of data to output
|
||||
defined as a file handle. (Ilia)
|
||||
- Fixed memory leak in stream_is_local(). (Felipe, Tony)
|
||||
|
||||
- Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters). (Ilia)
|
||||
- Fixed bug #49447 (php engine needs to correctly check for socket API return
|
||||
status on windows). (Sriram Natarajan)
|
||||
- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre)
|
||||
- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
|
||||
(Ilia, code-it at mail dot ru)
|
||||
- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
|
||||
(Jani)
|
||||
- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
|
||||
- Fixed bug #49269 (Ternary operator fails on Iterator object when used
|
||||
inside foreach declaration). (Etienne, Dmitry)
|
||||
- Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
|
||||
- Fixed bug #49144 (Import of schema from different host transmits original
|
||||
authentication details). (Dmitry)
|
||||
- Fixed bug #49132 (posix_times returns false without error).
|
||||
(phpbugs at gunnu dot us)
|
||||
- Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
|
||||
- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
|
||||
- Fixed bug #49074 (private class static fields can be modified by using
|
||||
reflection). (Jani)
|
||||
- Fixed bug #49072 (feof never returns true for damaged file in zip).
|
||||
(Pierre)
|
||||
- Fixed bug #49052 (context option headers freed too early when using
|
||||
--with-curlwrappers). (Jani)
|
||||
- Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference).
|
||||
(Jani)
|
||||
- Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
|
||||
restrictions). (Ilia)
|
||||
- Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes when
|
||||
including files from function). (Stas)
|
||||
- Fixed bug #48994 (zlib.output_compression does not output HTTP headers
|
||||
when set to a string value). (Jani)
|
||||
- Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
|
||||
- Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia)
|
||||
- Fixed bug #48929 (Double \r\n after HTTP headers when "header" context
|
||||
option is an array). (David Zülke)
|
||||
- Fixed bug #48913 (Too long error code strings in pdo_odbc driver).
|
||||
(naf at altlinux dot ru, Felipe)
|
||||
- Fixed bug #48802 (printf() returns incorrect outputted length). (Jani)
|
||||
- Fixed bug #48801 (Problem with imagettfbbox). (Takeshi Abe)
|
||||
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into
|
||||
symlinked directories). (Ilia)
|
||||
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()). (Sriram Natarajan)
|
||||
- Fixed bug #48763 (ZipArchive produces corrupt archive).
|
||||
(dani dot church at gmail dot com, Pierre)
|
||||
- Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
|
||||
- Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
|
||||
files that have been opened with r+). (Ilia)
|
||||
- Fixed bug #48732 (TTF Bounding box wrong for letters below baseline).
|
||||
(Takeshi Abe)
|
||||
- Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain
|
||||
components). (Ilia)
|
||||
- Fixed bug #48709 (metaphone and 'wh'). (brettz9 at yahoo dot com, Felipe)
|
||||
- Fixed bug #48697 (mb_internal_encoding() value gets reset by parse_str()).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #48696 (ldap_read() segfaults with invalid parameters). (Felipe)
|
||||
- Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly
|
||||
formatted). (peter at lvp-media dot com, Felipe)
|
||||
- Fixed bug #48661 (phpize is broken with non-bash shells). (Jani)
|
||||
- Fixed bug #48645 (mb_convert_encoding() doesn't understand hexadecimal
|
||||
html-entities). (Moriyoshi)
|
||||
- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
|
||||
--with-curlwrappers). (Jani)
|
||||
- Fixed bug #48636 (Error compiling of ext/date on netware).
|
||||
(guenter at php.net, Ilia)
|
||||
- Fixed bug #48629 (get_defined_constants() ignores categorize parameter).
|
||||
(Felipe)
|
||||
- Fixed bug #48619 (imap_search ALL segfaults). (Pierre)
|
||||
- Fixed bug #48608 (Invalid libreadline version not detected during
|
||||
configure). (Jani)
|
||||
- Fixed bug #48555 (ImageFTBBox() differs from previous versions for texts with
|
||||
new lines) (Takeshi Abe)
|
||||
- Fixed bug #48539 (pdo_dblib fails to connect, throws empty PDOException
|
||||
"SQLSTATE[] (null)"). (Felipe)
|
||||
- Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using TMPDIR).
|
||||
(Ilia)
|
||||
- Fixed bug #48450 (Compile failure under IRIX 6.5.30 building gd.c). (Kalle)
|
||||
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE
|
||||
flag). (Jani)
|
||||
- Fixed bug #48284 (hash "adler32" byte order is reversed). (Scott)
|
||||
- Fixed bug #48276 (date("Y") on big endian machines produces the wrong
|
||||
result). (Scott)
|
||||
- Fixed bug #48247 (Infinite loop and possible crash during startup with
|
||||
errors when errors are logged). (Jani)
|
||||
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #48116 (Fixed build with Openssl 1.0).
|
||||
(Pierre, Al dot Smith at aeschi dot ch dot eu dot org)
|
||||
- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
|
||||
- Fixed bug #48057 (Only the date fields of the first row are fetched,
|
||||
others are empty). (info at programmiernutte dot net)
|
||||
- Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
|
||||
correctly). (Herman Radtke)
|
||||
- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
|
||||
- Fixed bug #47273 (Encoding bug in SoapServer->fault). (Dmitry)
|
||||
- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
|
||||
(Uwe Schindler)
|
||||
- Fixed bug #45905 (imagefilledrectangle() clipping error).
|
||||
(markril at hotmail dot com, Pierre)
|
||||
- Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to
|
||||
crash). (Paul Richards, Kalle)
|
||||
- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
|
||||
- Fixed bug #44683 (popen crashes when an invalid mode is passed). (Pierre)
|
||||
- Fixed bug #44144 (spl_autoload_functions() should return object instance
|
||||
when appropriate). (Hannes, Etienne)
|
||||
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in
|
||||
fopen). (Jani)
|
||||
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter).
|
||||
(wojjie at gmail dot com, Kalle)
|
||||
- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
|
||||
- Fixed bug #49572 (use of C++ style comments causes build failure).
|
||||
(Sriram Natarajan)
|
||||
|
||||
17 Jun 2009, PHP 5.2.10
|
||||
- Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara)
|
||||
- Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
|
||||
and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
|
||||
- Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra)
|
||||
|
||||
- Changed default value of array_unique()'s optional sorting type parameter
|
||||
back to SORT_STRING to fix backwards compatibility breakage introduced in
|
||||
PHP 5.2.9. (Moriyoshi)
|
||||
|
||||
- Fixed memory corruptions while reading properties of zip files. (Ilia)
|
||||
- Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
|
||||
- Fixed segfault on invalid session.save_path. (Hannes)
|
||||
- Fixed leaks in imap when a mail_criteria is used. (Pierre)
|
||||
- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. (Greg)
|
||||
|
||||
- Fixed bug #48562 (Reference recursion causes segfault when used in
|
||||
wddx_serialize_vars()). (Felipe)
|
||||
- Fixed bug #48557 (Numeric string keys in Apache Hashmaps are not cast to
|
||||
integers). (David Zuelke)
|
||||
- Fixed bug #48518 (curl crashes when writing into invalid file handle). (Tony)
|
||||
- Fixed bug #48514 (cURL extension uses same resource name for simple and
|
||||
multi APIs). (Felipe)
|
||||
- Fixed bug #48469 (ldap_get_entries() leaks memory on empty search
|
||||
results). (Patrick)
|
||||
- Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4). (Jani,
|
||||
spisek at kerio dot com)
|
||||
- Fixed bug #48448 (Compile failure under IRIX 6.5.30 building cast.c).
|
||||
(Kalle)
|
||||
- Fixed bug #48441 (ldap_search() sizelimit, timelimit and deref options
|
||||
persist). (Patrick)
|
||||
- Fixed bug #48434 (Improve memory_get_usage() accuracy). (Arnaud)
|
||||
- Fixed bug #48416 (Force a cache limit in ereg() to stop excessive memory
|
||||
usage). (Scott)
|
||||
- Fixed bug #48409 (Crash when exception is thrown while passing function
|
||||
arguments). (Arnaud)
|
||||
- Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg
|
||||
files). (Pierre)
|
||||
- Fixed bug #48359 (Script hangs on snmprealwalk if OID is not increasing).
|
||||
(Ilia, simonov at gmail dot com)
|
||||
- Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work
|
||||
with redeclared property).
|
||||
(patch by Markus dot Lidel at shadowconnect dot com)
|
||||
- Fixed bug #48326 (constant MSG_DONTWAIT not defined). (Arnaud)
|
||||
- Fixed bug #48313 (fgetcsv() does not return null for empty rows). (Ilia)
|
||||
- Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not update
|
||||
stream position of plain files). (Arnaud)
|
||||
- Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source is a
|
||||
socket). (Arnaud)
|
||||
- Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values).
|
||||
(Ilia, lytboris at gmail dot com)
|
||||
- Fixed bug #48256 (Crash due to double-linking of history.o).
|
||||
(tstarling at wikimedia dot org)
|
||||
- Fixed bug #48248 (SIGSEGV when access to private property via &__get).
|
||||
(Felipe)
|
||||
- Fixed bug #48247 (Crash on errors during startup). (Stas)
|
||||
- Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe)
|
||||
- Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne)
|
||||
- Fixed bug #48221 (memory leak when passing invalid xslt parameter).
|
||||
(Felipe)
|
||||
- Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when
|
||||
working with a non-writable stream). (Ilia)
|
||||
- Fixed bug #48206 (Iterating over an invalid data structure with
|
||||
RecursiveIteratorIterator leads to a segfault). (Scott)
|
||||
- Fixed bug #48204 (xmlwriter_open_uri() does not emit warnings on invalid
|
||||
paths). (Ilia)
|
||||
- Fixed bug #48203 (Crash when CURLOPT_STDERR is set to regular file). (Jani)
|
||||
- Fixed bug #48202 (Out of Memory error message when passing invalid file
|
||||
path) (Pierre)
|
||||
- Fixed bug #48156 (Added support for lcov v1.7). (Ilia)
|
||||
- Fixed bug #48132 (configure check for curl ssl support fails with
|
||||
--disable-rpath). (Jani)
|
||||
- Fixed bug #48131 (Don't try to bind ipv4 addresses to ipv6 ips via bindto).
|
||||
(Ilia)
|
||||
- Fixed bug #48070 (PDO_OCI: Segfault when using persistent connection).
|
||||
(Pierre, Matteo, jarismar dot php at gmail dot com)
|
||||
- Fixed bug #48058 (Year formatter goes wrong with out-of-int range). (Derick)
|
||||
- Fixed bug #48038 (odbc_execute changes variables used to form params array).
|
||||
(Felipe)
|
||||
- Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams). (Arnaud)
|
||||
- Fixed bug #47991 (SSL streams fail if error stack contains items). (Mikko)
|
||||
- Fixed bug #47981 (error handler not called regardless). (Hannes)
|
||||
- Fixed bug #47969 (ezmlm_hash() returns different values depend on OS). (Ilia)
|
||||
- Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
|
||||
- Fixed bug #47940 (memory leaks in imap_body). (Pierre, Jake Levitt)
|
||||
- Fixed bug #47937 (system() calls sapi_flush() regardless of output
|
||||
buffering). (Ilia)
|
||||
- Fixed bug #47903 ("@" operator does not work with string offsets). (Felipe)
|
||||
- Fixed bug #47893 (CLI aborts on non blocking stdout). (Arnaud)
|
||||
- Fixed bug #47849 (Non-deep import loses the namespace). (Rob)
|
||||
- Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W)
|
||||
- Fixed bug #47836 (array operator [] inconsistency when the array has
|
||||
PHP_INT_MAX index value). (Matt)
|
||||
- Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c).
|
||||
(Ilia, rainer dot jung at kippdata dot de)
|
||||
- Fixed bug #47828 (openssl_x509_parse() segfaults when a UTF-8 conversion
|
||||
fails). (Scott, Kees Cook, Pierre)
|
||||
- Fixed bug #47818 (Segfault due to bound callback param). (Felipe)
|
||||
- Fixed bug #47801 (__call() accessed via parent:: operator is provided
|
||||
incorrect method name). (Felipe)
|
||||
- Fixed bug #47769 (Strange extends PDO). (Felipe)
|
||||
- Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer).
|
||||
(Dmitry)
|
||||
- Fixed bug #47721 (Alignment issues in mbstring and sysvshm extension).
|
||||
(crrodriguez at opensuse dot org, Ilia)
|
||||
- Fixed bug #47704 (PHP crashes on some "bad" operations with string
|
||||
offsets). (Dmitry)
|
||||
- Fixed bug #47695 (build error when xmlrpc and iconv are compiled against
|
||||
different iconv versions). (Scott)
|
||||
- Fixed bug #47667 (ZipArchive::OVERWRITE seems to have no effect).
|
||||
(Mikko, Pierre)
|
||||
- Fixed bug #47644 (Valid integers are truncated with json_decode()). (Scott)
|
||||
- Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a
|
||||
string literal). (Ilia)
|
||||
- Fixed bug #47616 (curl keeps crashing). (Felipe)
|
||||
- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
|
||||
- Fixed bug #47566 (pcntl_wexitstatus() returns signed status).
|
||||
(patch by james at jamesreno dot com)
|
||||
- Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns wrong
|
||||
result). (Ilia)
|
||||
- Fixed bug #47487 (performance degraded when reading large chunks after
|
||||
fix of bug #44607). (Arnaud)
|
||||
- Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi). (Jani)
|
||||
- Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
|
||||
addresses in the filter extension). (Ilia)
|
||||
- Fixed bug #47430 (Errors after writing to nodeValue parameter of an absent
|
||||
previousSibling). (Rob)
|
||||
- Fixed bug #47365 (ip2long() may allow some invalid values on certain 64bit
|
||||
systems). (Ilia)
|
||||
- Fixed bug #47254 (Wrong Reflection for extends class). (Felipe)
|
||||
- Fixed bug #47042 (cgi sapi is incorrectly removing SCRIPT_FILENAME).
|
||||
(Sriram Natarajan, David Soria Parra)
|
||||
- Fixed bug #46882 (Serialize / Unserialize misbehaviour under OS with
|
||||
different bit numbers). (Matt)
|
||||
- Fixed bug #46812 (get_class_vars() does not include visible private variable
|
||||
looking at subclass). (Arnaud)
|
||||
- Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL
|
||||
SOAP services). (Ilia, lordelph at gmail dot com)
|
||||
- Fixed bug #46109 (Memory leak when mysqli::init() is called multiple times).
|
||||
(Andrey)
|
||||
- Fixed bug #45997 (safe_mode bypass with exec/system/passthru (windows only)).
|
||||
(Pierre)
|
||||
- Fixed bug #45877 (Array key '2147483647' left as string). (Matt)
|
||||
- Fixed bug #45822 (Near infinite-loops while parsing huge relative offsets).
|
||||
(Derick, Mike Sullivan)
|
||||
- Fixed bug #45799 (imagepng() crashes on empty image).
|
||||
(Martin McNickle, Takeshi Abe)
|
||||
- Fixed bug #45622 (isset($arrayObject->p) misbehaves with
|
||||
ArrayObject::ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud)
|
||||
- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private prop
|
||||
of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
|
||||
- Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud)
|
||||
- Fixed bug #45202 (zlib.output_compression can not be set with ini_set()).
|
||||
(Jani)
|
||||
- Fixed bug #45191 (error_log ignores date.timezone php.ini val when setting
|
||||
logging timestamps). (Derick)
|
||||
- Fixed bug #45092 (header HTTP context option not being used when compiled
|
||||
using --with-curlwrappers). (Jani)
|
||||
- Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime).
|
||||
(Ilia, kawai at apache dot org)
|
||||
- Fixed bug #44827 (define() is missing error checks for class constants).
|
||||
(Ilia)
|
||||
- Fixed bug #44214 (Crash using preg_replace_callback() and global variables).
|
||||
(Nuno, Scott)
|
||||
- Fixed bug #43073 (TrueType bounding box is wrong for angle<>0).
|
||||
(Martin McNickle)
|
||||
- Fixed bug #42663 (gzinflate() try to allocate all memory with truncated
|
||||
data). (Arnaud)
|
||||
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC
|
||||
driver). (jhml at gmx dot net)
|
||||
- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped).
|
||||
(Scott, Edward Z. Yang)
|
||||
- Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
|
||||
(Kanwaljeet Singla, Venkat Raman Don)
|
||||
- Fixed bug #38805 (PDO truncates text from SQL Server text data type field).
|
||||
(Steph)
|
||||
|
||||
|
||||
26 Feb 2009, PHP 5.2.9
|
||||
- Changed __call() to be invoked on private/protected method access, similar to
|
||||
properties and __get(). (Andrei)
|
||||
|
||||
@@ -40,11 +444,17 @@ PHP NEWS
|
||||
- Fixed bug in xml_error_string() which resulted in messages being
|
||||
off by one. (Scott)
|
||||
|
||||
- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit
|
||||
linux). (Matt)
|
||||
- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
|
||||
characters). (for-bugs at hnw dot jp, Moriyoshi)
|
||||
- Fixed bug #47353 (crash when creating a lot of objects in object
|
||||
destructor). (Tony)
|
||||
- Fixed bug #47322 (sscanf %d doesn't work). (Felipe)
|
||||
- Fixed bug #47282 (FILTER_VALIDATE_EMAIL is marking valid email addresses
|
||||
as invalid). (Ilia)
|
||||
- Fixed bug #47220 (segfault in dom_document_parser in recovery mode). (Rob)
|
||||
- Fixed bug #47217 (content-type is not set properly for file uploads).
|
||||
(Ilia)
|
||||
- Fixed bug #47217 (content-type is not set properly for file uploads). (Ilia)
|
||||
- Fixed bug #47174 (base64_decode() interprets pad char in mid string as
|
||||
terminator). (Ilia)
|
||||
- Fixed bug #47165 (Possible memory corruption when passing return value by
|
||||
@@ -52,53 +462,66 @@ PHP NEWS
|
||||
- Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results).
|
||||
(Felipe)
|
||||
- Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
|
||||
- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
|
||||
- Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
|
||||
(Etienne, Dmitry)
|
||||
- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
|
||||
- Fixed bug #47049 (SoapClient::__soapCall causes a segmentation fault).
|
||||
(Dmitry)
|
||||
- Fixed bug #47048 (Segfault with new pg_meta_data). (Felipe)
|
||||
- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #47037 (No error when using fopen with empty string).
|
||||
(Cristian Rodriguez R., Felipe)
|
||||
- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT
|
||||
record). (Felipe)
|
||||
- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non
|
||||
apache). (Sriram Natarajan)
|
||||
- Fixed bug #47037 (No error when using fopen with empty string). (Cristian
|
||||
Rodriguez R., Felipe)
|
||||
- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a
|
||||
TXT record). (Felipe)
|
||||
- Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject).
|
||||
(Derick)
|
||||
- Fixed bug #46985 (OVERWRITE and binary mode does not work, regression introduced in
|
||||
5.2.8). (Pierre)
|
||||
- Fixed bug #46985 (OVERWRITE and binary mode does not work, regression
|
||||
introduced in 5.2.8). (Pierre)
|
||||
- Fixed bug #46973 (IPv6 address filter rejects valid address). (Felipe)
|
||||
- Fixed bug #46964 (Fixed pdo_mysql build with older version of MySQL). (Ilia)
|
||||
- Fixed bug #46959 (Unable to disable PCRE). (Scott)
|
||||
- Fixed bug #46918 (imap_rfc822_parse_adrlist host part not filled in correctly).
|
||||
(Felipe)
|
||||
- Fixed bug #46918 (imap_rfc822_parse_adrlist host part not filled in
|
||||
correctly). (Felipe)
|
||||
- Fixed bug #46889 (Memory leak in strtotime()). (Derick)
|
||||
- Fixed bug #46887 (Invalid calls to php_error_docref()).
|
||||
(oeriksson at mandriva dot com, Ilia)
|
||||
- Fixed bug #46887 (Invalid calls to php_error_docref()). (oeriksson at
|
||||
mandriva dot com, Ilia)
|
||||
- Fixed bug #46873 (extract($foo) crashes if $foo['foo'] exists). (Arnaud)
|
||||
- Fixed bug #46843 (CP936 euro symbol is not converted properly).
|
||||
(ty_c at cybozuy dot co dot jp, Moriyoshi)
|
||||
- Fixed bug #46843 (CP936 euro symbol is not converted properly). (ty_c at
|
||||
cybozuy dot co dot jp, Moriyoshi)
|
||||
- Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
|
||||
inside a binary or image column type). (Ilia)
|
||||
- Fixed bug #46782 (fastcgi.c parse error). (Matt)
|
||||
- Fixed bug #46760 (SoapClient doRequest fails when proxy is used). (Felipe)
|
||||
- Fixed bug #46748 (Segfault when an SSL error has more than one error). (Scott)
|
||||
- Fixed bug #46739 (array returned by curl_getinfo should contain content_type key).
|
||||
(Mikko)
|
||||
- Fixed bug #46748 (Segfault when an SSL error has more than one error).
|
||||
(Scott)
|
||||
- Fixed bug #46739 (array returned by curl_getinfo should contain
|
||||
content_type key). (Mikko)
|
||||
- Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob)
|
||||
- Fixed bug #46419 (Elements of associative arrays with NULL value are lost).
|
||||
(Dmitry)
|
||||
- Fixed bug #46419 (Elements of associative arrays with NULL value are
|
||||
lost). (Dmitry)
|
||||
- Fixed bug #46282 (Corrupt DBF When Using DATE). (arne at bukkie dot nl)
|
||||
- Fixed bug #46005 (User not consistently logged under Apache2).
|
||||
(admorten at umich dot edu, Stas)
|
||||
- Fixed bug #45996 (libxml2 2.7 causes breakage with character data
|
||||
in xml_parse()). (Rob)
|
||||
- Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress
|
||||
after end of stream). (Greg)
|
||||
- Fixed bug #46005 (User not consistently logged under Apache2). (admorten
|
||||
at umich dot edu, Stas)
|
||||
- Fixed bug #45996 (libxml2 2.7 causes breakage with character data in
|
||||
xml_parse()). (Rob)
|
||||
- Fixed bug #45940 (MySQLI OO does not populate connect_error property on
|
||||
failed connect). (Johannes)
|
||||
- Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
|
||||
- Fixed bug #45327 (memory leak if offsetGet throws exception). (Greg)
|
||||
- Fixed bug #45239 (Encoding detector hangs with mbstring.strict_detection
|
||||
enabled). (Moriyoshi)
|
||||
- Fixed bug #45161 (Reusing a curl handle leaks memory). (Mark Karpeles, Jani)
|
||||
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
|
||||
(frode at coretrek dot com, Nuno)
|
||||
- Fixed bug #35975 (Session cookie expires date format isn't the most compatible.
|
||||
Now matches that of setcookie()). (Scott)
|
||||
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance). (frode
|
||||
at coretrek dot com, Nuno)
|
||||
- Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #37209 (mssql_execute with non fatal errors). (Kalle)
|
||||
- Fixed bug #35975 (Session cookie expires date format isn't the most
|
||||
compatible. Now matches that of setcookie()). (Scott)
|
||||
|
||||
|
||||
08 Dec 2008, PHP 5.2.8
|
||||
- Reverted bug fix #42718 that broke magic_quotes_gpc (Scott)
|
||||
@@ -115,6 +538,9 @@ PHP NEWS
|
||||
either disable or change the compile time ini scan directory (FR #45114).
|
||||
(Jani)
|
||||
|
||||
- Reverted fix for bug #44197 due to behaviour change in minor version.
|
||||
(Felipe)
|
||||
|
||||
- Fixed missing initialization of BG(page_uid) and BG(page_gid),
|
||||
reported by Maksymilian Arciemowicz. (Stas)
|
||||
- Fixed memory leak inside sqlite_create_aggregate(). (Felipe)
|
||||
@@ -160,8 +586,6 @@ PHP NEWS
|
||||
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 #46732 (mktime.year description is wrong). (Derick)
|
||||
- Fixed bug #46696 (cURL fails in upload files with specified content-type).
|
||||
@@ -294,7 +718,6 @@ PHP NEWS
|
||||
(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
|
||||
@@ -410,6 +833,8 @@ PHP NEWS
|
||||
|
||||
|
||||
01 May 2008, PHP 5.2.6
|
||||
- Upgraded PCRE to version 7.6 (Nuno)
|
||||
|
||||
- Fixed two possible crashes inside posix extension (Tony)
|
||||
- Fixed incorrect heredoc handling when label is used within the block.
|
||||
(Matt)
|
||||
@@ -429,7 +854,6 @@ PHP NEWS
|
||||
- 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)
|
||||
|
||||
+10
-30
@@ -8,11 +8,11 @@ part is making it acceptable for inclusion into our repository. :-)
|
||||
|
||||
How to create patch?
|
||||
--------------------
|
||||
We are working with CVS. You need to get CVS source to create a patch
|
||||
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
|
||||
source. You can check out older versions, but make sure you get
|
||||
the default branch (i.e. Do not use -r option when you check out the
|
||||
CVS source)
|
||||
We use Subversion (SVN) for revision control. You need to get the
|
||||
source from SVN in order to create a patch. Read
|
||||
http://www.php.net/svn.php for help on using SVN. You can check out
|
||||
older branches, but make sure you get trunk as well and make your
|
||||
patch work there.
|
||||
|
||||
Read CODING_STANDARDS file before you start working.
|
||||
|
||||
@@ -21,7 +21,7 @@ add a new feature to PHP. After you finished editing, please test your
|
||||
patch. Read README.TESTING for testing.
|
||||
|
||||
After you finish testing your patch, take diff file using
|
||||
"cvs diff > your.patch" command.
|
||||
"svn diff > your.patch" command.
|
||||
|
||||
Read README.TESTING for submitting a test script for your patch. This is
|
||||
not strictly required, but it is preferred to submit a test script along
|
||||
@@ -41,25 +41,8 @@ maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
|
||||
you are patching PEAR. Official module maintainers can be found in
|
||||
EXTENSIONS file in PHP source.
|
||||
|
||||
If you are new to CVS (Concurrent Versions System), visit
|
||||
http://cvshome.org/ for details.
|
||||
|
||||
|
||||
Recommended CVS client settings for creating patch file
|
||||
------------------------------------------------------
|
||||
Recommended ~/.cvsrc file setting is:
|
||||
------
|
||||
cvs -z3
|
||||
update -d -P
|
||||
checkout -P
|
||||
diff -u
|
||||
|
||||
------
|
||||
diff -u means:
|
||||
-u Use the unified output format.
|
||||
|
||||
With this CVS setting, you don't have to worry about adding/deleting
|
||||
newlines and spaces.
|
||||
If you are new to SVN (Subversion), visit
|
||||
http://svnbook.red-bean.com/ for details.
|
||||
|
||||
|
||||
Check list for submitting patch
|
||||
@@ -70,10 +53,7 @@ Check list for submitting patch
|
||||
web server error logs when you test your patch?
|
||||
- Did you build PHP for multi-threaded web servers. (Optional)
|
||||
- Did you create test script for "make test"? (Recommended)
|
||||
- Did you check your patch is unified format and it does not
|
||||
contain white space changes? (If you are not using recommended
|
||||
cvs setting)
|
||||
- Did you update CVS source before you take final patch?
|
||||
- Did you update SVN source before you take final patch?
|
||||
- Did you read the patch again?
|
||||
|
||||
|
||||
@@ -118,7 +98,7 @@ these questions:
|
||||
|
||||
What happens when your patch is applied?
|
||||
----------------------------------------
|
||||
Your name will be included together with your email address in the CVS
|
||||
Your name will be included together with your email address in the SVN
|
||||
commit log. If your patch affects end-users, a brief description
|
||||
and your name might be added to the NEWS file.
|
||||
|
||||
|
||||
@@ -1,24 +1,31 @@
|
||||
This is the first file you should be reading after you get your CVS account.
|
||||
We'll assume you're basically familiar with CVS, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://cvsbook.red-bean.com/ for more detailed information on CVS.
|
||||
====================
|
||||
SVN Commit Rules
|
||||
====================
|
||||
|
||||
This is the first file you should be reading after you get your SVN account.
|
||||
We'll assume you're basically familiar with SVN, but feel free to post
|
||||
your questions on the mailing list. Please have a look at
|
||||
http://svnbook.red-bean.com/ for more detailed information on SVN.
|
||||
|
||||
PHP is developed through the efforts of a large number of people.
|
||||
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
|
||||
some basic rules with regards to CVS usage will:
|
||||
Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
|
||||
some basic rules with regards to SVN usage will::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
the CVS itself.
|
||||
the SVN itself.
|
||||
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
|
||||
c. Prevent some of those 'Oops' moments.
|
||||
|
||||
d. Increase the general level of good will on planet Earth.
|
||||
|
||||
|
||||
Having said that, here are the organizational rules:
|
||||
Having said that, here are the organizational rules::
|
||||
|
||||
1. Respect other people working on the project.
|
||||
|
||||
2. Discuss any significant changes on the list before committing.
|
||||
2. Discuss any significant changes on the list before committing and get
|
||||
confirmation from the release manager for the given branch.
|
||||
|
||||
3. Look at EXTENSIONS file to see who is the primary maintainer of
|
||||
the code you want to contribute to.
|
||||
@@ -30,45 +37,54 @@ Having said that, here are the organizational rules:
|
||||
|
||||
6. Test your changes before committing them. We mean it. Really.
|
||||
To do so use "make test".
|
||||
|
||||
|
||||
7. For development use the --enable-maintainer-zts switch to ensure your
|
||||
code handles TSRM correctly and doesn't break for thos who need that.
|
||||
|
||||
Currently we have the following branches in use:
|
||||
HEAD Will become PHP 6.0. This CVS branch is for active development.
|
||||
PHP_5_2 Is used to release the PHP 5.2.x series. Only minor feature
|
||||
enhancements may go in here, but please keep that as infrequent as
|
||||
possible.
|
||||
PHP_5_1 This branch is closed.
|
||||
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
PHP_4_3 This branch is closed.
|
||||
Currently we have the following branches in use::
|
||||
|
||||
The next few rules are more of a technical nature.
|
||||
trunk Will become PHP 6.0. This CVS branch is for active development.
|
||||
|
||||
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
branches/PHP_5_3 Is used to release the PHP 5.3.x series. It still allows for
|
||||
larger enhancements.
|
||||
|
||||
branches/PHP_5_2 Is used to release the PHP 5.2.x series. Only bugfixes are permitted
|
||||
on this branch (Consult the releasemaster prior to commit).
|
||||
|
||||
branches/PHP_5_1 This branch is closed.
|
||||
|
||||
branches/PHP_4_4 This branch is closed.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to trunk and then get merged from trunk
|
||||
(aka MFH'ed) to all other relevant branches.
|
||||
|
||||
2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
|
||||
messages every day. Woe be to those who attempt to mess with it.
|
||||
|
||||
2. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file.
|
||||
|
||||
3. All news updates intended for public viewing, such as new features,
|
||||
bug fixes, improvements, etc., should go into the NEWS file of the
|
||||
*first* to be released version with the given change. In other words
|
||||
any NEWS file change only needs to done in one branch.
|
||||
|
||||
NB! Lines, starting with @ will go automagically into NEWS file, but
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
this is NOT recommended, though. Please, add news entries directly to
|
||||
NEWS file and don't forget to keep them adjusted and sorted.
|
||||
|
||||
3. Do not commit multiple file and dump all messages in one commit. If you
|
||||
4. Do not commit multiple file and dump all messages in one commit. If you
|
||||
modified several unrelated files, commit each group separately and
|
||||
provide a nice commit message for each one. See example below.
|
||||
|
||||
4. Do write your commit message in such a way that it makes sense even
|
||||
5. Do write your commit message in such a way that it makes sense even
|
||||
without the corresponding diff. One should be able to look at it, and
|
||||
immediately know what was modified. Definitely include the function name
|
||||
in the message as shown below.
|
||||
|
||||
5. In your commit messages, keep each line shorter than 80 characters. And
|
||||
6. In your commit messages, keep each line shorter than 80 characters. And
|
||||
try to align your lines vertically, if they wrap. It looks bad otherwise.
|
||||
|
||||
6. If you modified a function that is callable from PHP, prepend PHP to
|
||||
7. If you modified a function that is callable from PHP, prepend PHP to
|
||||
the function name as shown below.
|
||||
|
||||
|
||||
@@ -80,7 +96,7 @@ If a line begins with #, it is taken to be a comment and will not appear
|
||||
in the ChangeLog. Everything else goes into the ChangeLog.
|
||||
|
||||
It is important to note that if your comment or news logline spans multiple
|
||||
lines, you have to put # at the beginning of _every_ such line.
|
||||
lines, you have to put # at the beginning of **every** such line.
|
||||
|
||||
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
|
||||
added a new format option for the date() function, and in string.c you fixed a
|
||||
@@ -88,13 +104,15 @@ memory leak in php_trim(). Don't commit both of these at once. Commit them
|
||||
separately and try to make sure your commit messages look something like the
|
||||
following.
|
||||
|
||||
For datetime.c:
|
||||
- Added new 'K' format modifier to date() for printing out number of days until
|
||||
New Year's Eve.
|
||||
For datetime.c::
|
||||
|
||||
For string.c:
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
- Added new 'K' format modifier to date() for printing out number of days
|
||||
until New Year's Eve.
|
||||
|
||||
For string.c::
|
||||
|
||||
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
|
||||
#- Man, that thing was leaking all over the place!
|
||||
|
||||
The # lines will be omitted from the ChangeLog automagically.
|
||||
|
||||
@@ -106,16 +124,19 @@ If you fix some bugs, you should note the bug ID numbers in your
|
||||
commit message. Bug ID should be prefixed by "#" for easier access to
|
||||
bug report when developers are browsing CVS via LXR or Bonsai.
|
||||
|
||||
Example:
|
||||
Example::
|
||||
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
Fixed bug #14016 (pgsql notice handler double free crash bug.)
|
||||
|
||||
If you don't see your messages in ChangeLog right away, don't worry!
|
||||
These files are updated once a day, so your stuff will not show up until
|
||||
somewhat later.
|
||||
somewhat later.
|
||||
|
||||
When you change the NEWS file for a bug fix, then please keep the bugs
|
||||
sorted in decreasing order under the fixed version.
|
||||
|
||||
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
|
||||
to look at PHP CVS repository in various ways.
|
||||
to look at PHP SVN repository in various ways.
|
||||
|
||||
To receive daily updates to ChangeLog and NEWS, send an empty message to
|
||||
php-cvs-daily-subscribe@lists.php.net.
|
||||
+5
-4
@@ -32,11 +32,12 @@ sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]
|
||||
|
||||
[Which "php" executable "make test" look for]
|
||||
---------------------------------------------
|
||||
You must use TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the php executable to be used to run the tests. That can either
|
||||
be the CLI or CGI executable.
|
||||
If you are running the run-tests.php script from the command line (as above)
|
||||
you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
|
||||
select the PHP executable that is to be tested, that is, used to run the test scripts.
|
||||
|
||||
"make test" executes "run-tests.php" script with "php" binary. Some
|
||||
If you run the tests using make test, the PHP CLI and CGI executables are
|
||||
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
|
||||
test scripts such as session must be executed by CGI SAPI. Therefore,
|
||||
you must build PHP with CGI SAPI to perform all tests.
|
||||
|
||||
|
||||
+24
-4
@@ -179,20 +179,39 @@ TSRM_API FILE *popen(const char *command, const char *type)
|
||||
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
|
||||
{
|
||||
FILE *stream = NULL;
|
||||
int fno, str_len = strlen(type), read, mode;
|
||||
int fno, type_len = strlen(type), read, mode;
|
||||
STARTUPINFO startup;
|
||||
PROCESS_INFORMATION process;
|
||||
SECURITY_ATTRIBUTES security;
|
||||
HANDLE in, out;
|
||||
char *cmd;
|
||||
process_pair *proc;
|
||||
char *cmd;
|
||||
int i;
|
||||
char *ptype = (char *)type;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (!type) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*The following two checks can be removed once we drop XP support */
|
||||
type_len = strlen(type);
|
||||
if (type_len <1 || type_len > 2) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i=0; i < type_len; i++) {
|
||||
if (!(*ptype == 'r' || *ptype == 'w' || *ptype == 'b' || *ptype == 't')) {
|
||||
return NULL;
|
||||
}
|
||||
ptype++;
|
||||
}
|
||||
|
||||
security.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
security.bInheritHandle = TRUE;
|
||||
security.lpSecurityDescriptor = NULL;
|
||||
|
||||
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
if (!type_len || !CreatePipe(&in, &out, &security, 2048L)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -204,7 +223,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
|
||||
read = (type[0] == 'r') ? TRUE : FALSE;
|
||||
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
|
||||
mode = ((type_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
|
||||
|
||||
|
||||
if (read) {
|
||||
@@ -220,6 +239,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
|
||||
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
|
||||
sprintf(cmd, "%s /c %s", TWG(comspec), command);
|
||||
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) {
|
||||
free(cmd);
|
||||
return NULL;
|
||||
}
|
||||
free(cmd);
|
||||
|
||||
@@ -381,12 +381,12 @@ ext/pfpro not actively maintained
|
||||
ext/w32api pecl/ffi
|
||||
ext/yp not actively maintained
|
||||
sapi/activescript http://pecl4win.php.net/ext.php/php5activescript.dll (PECL package)
|
||||
or pecl/activescript (CVS)
|
||||
or pecl/activescript (SVN)
|
||||
|
||||
Modules in PECL that are not actively maintained (i.e. have not been supported
|
||||
for some time, have no active maintainer working on them currently, and do not
|
||||
have any PECL package releases), are still available in CVS at
|
||||
http://cvs.php.net/pecl/. However, unreleased PHP modules are by their nature
|
||||
have any PECL package releases), are still available in SVN at
|
||||
http://svn.php.net/pecl/. However, unreleased PHP modules are by their nature
|
||||
unsupported, and your mileage may vary when attempting to install or use them.
|
||||
|
||||
9b. Class constants in new PHP 5.1 extensions
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ int(%d)
|
||||
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Wrong parameter count for get_defined_constants() in %s on line %d
|
||||
Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
|
||||
NULL
|
||||
string(5) "array"
|
||||
string(5) "array"
|
||||
|
||||
+12
-11
@@ -359,7 +359,8 @@ var_dump($global_var);
|
||||
|
||||
//Note: No error conditions relating to passing arugments can be tested
|
||||
// because these are not functions but statements, it will result in syntax error.
|
||||
echo "Done\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing unset(), empty() & isset() with scalar variables ***
|
||||
-- Iteration 1 --
|
||||
@@ -1185,11 +1186,11 @@ bool(true)
|
||||
|
||||
*** Testing unset(), emtpy() & isset() with resource variables ***
|
||||
-- Iteration 1 --
|
||||
resource(5) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
resource(5) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1198,11 +1199,11 @@ bool(false)
|
||||
Notice: Undefined variable: resource in %s on line %d
|
||||
NULL
|
||||
-- Iteration 2 --
|
||||
resource(6) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
resource(6) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1217,7 +1218,7 @@ bool(false)
|
||||
bool(true)
|
||||
|
||||
*** Testing unset(), empty() & isset() with objects ***
|
||||
object(Point)#1 (3) {
|
||||
object(Point)#%d (3) {
|
||||
["x"]=>
|
||||
int(30)
|
||||
["y"]=>
|
||||
@@ -1239,7 +1240,7 @@ bool(false)
|
||||
|
||||
Notice: Undefined variable: lable in %s on line %d
|
||||
bool(true)
|
||||
object(Point)#1 (3) {
|
||||
object(Point)#%d (3) {
|
||||
["x"]=>
|
||||
int(30)
|
||||
["y"]=>
|
||||
@@ -1247,7 +1248,7 @@ object(Point)#1 (3) {
|
||||
["lable"]=>
|
||||
string(6) "Point1"
|
||||
}
|
||||
object(Point)#1 (2) {
|
||||
object(Point)#%d (2) {
|
||||
["y"]=>
|
||||
int(40)
|
||||
["lable"]=>
|
||||
@@ -1255,7 +1256,7 @@ object(Point)#1 (2) {
|
||||
}
|
||||
bool(false)
|
||||
bool(true)
|
||||
object(Point)#1 (0) {
|
||||
object(Point)#%d (0) {
|
||||
}
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1276,7 +1277,7 @@ array(3) {
|
||||
[2]=>
|
||||
string(9) "testPoint"
|
||||
}
|
||||
object(Point)#1 (3) {
|
||||
object(Point)#%d (3) {
|
||||
["x"]=>
|
||||
int(5)
|
||||
["y"]=>
|
||||
@@ -1329,4 +1330,4 @@ bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
int(10)
|
||||
Done
|
||||
===DONE===
|
||||
@@ -41,12 +41,14 @@ $db = new hariCow;
|
||||
|
||||
var_dump($db);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: db in %sbug30162.php on line 35
|
||||
NULL
|
||||
object(hariCow)#1 (2) {
|
||||
object(hariCow)#%d (2) {
|
||||
["x"]=>
|
||||
string(1) "x"
|
||||
["y"]=>
|
||||
string(1) "y"
|
||||
}
|
||||
===DONE===
|
||||
@@ -0,0 +1,82 @@
|
||||
--TEST--
|
||||
Bug #39018 (Error control operator '@' fails to suppress "Uninitialized string offset")
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$a = 'foo';
|
||||
$a[11111111111];
|
||||
|
||||
$a = '';
|
||||
|
||||
$a[0];
|
||||
|
||||
print $a[0]; // 12
|
||||
|
||||
$a[-11111111111111111111111];
|
||||
|
||||
print $a[-11111111111111111111111]; // 16
|
||||
|
||||
$a[-0];
|
||||
|
||||
$x = 'test';
|
||||
|
||||
@$x[4];
|
||||
|
||||
@$y = $x[4];
|
||||
|
||||
@('a' == $x[4]);
|
||||
|
||||
$x[4] == 'a'; // 28
|
||||
|
||||
@$x[4] == 'a';
|
||||
|
||||
(@$x[4]) == 'a';
|
||||
|
||||
($x[4]) == 'a'; // 34
|
||||
|
||||
(@($x[4])) == 'a';
|
||||
|
||||
(($x[4])) == 'a'; // 38
|
||||
|
||||
@($x[4]) == 'a';
|
||||
|
||||
($x[4]) == 'a'; // 42
|
||||
|
||||
@($x[4] == 'a');
|
||||
|
||||
($x[4] == 'a'); // 46
|
||||
|
||||
$y = 'foobar';
|
||||
|
||||
$y[12.2];
|
||||
|
||||
print $y[12.2]; // 52
|
||||
|
||||
$y[3.5];
|
||||
|
||||
print $y[3.5]; // 56
|
||||
|
||||
print "\nDone\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Notice: Uninitialized string offset: 0 in %s on line 12
|
||||
|
||||
Notice: Uninitialized string offset: -%d in %s on line 16
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 28
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 34
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 38
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 42
|
||||
|
||||
Notice: Uninitialized string offset: 4 in %s on line 46
|
||||
|
||||
Notice: Uninitialized string offset: 12 in %s on line 52
|
||||
b
|
||||
Done
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #39018 [2] (Error control operator '@' fails to suppress "Uninitialized string offset")
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$foo = 'test';
|
||||
$x = @$foo[6];
|
||||
|
||||
print @($foo[100] + $foo[130]);
|
||||
|
||||
print "\nDone\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
Done
|
||||
@@ -6,4 +6,6 @@ Bug #39304 (Segmentation fault with list unpacking of string offset)
|
||||
list($a, $b) = $s[0];
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3
|
||||
Notice: Uninitialized string offset: 0 in %s on line %d
|
||||
|
||||
Fatal error: Cannot use string offset as an array in %sbug39304.php on line %d
|
||||
@@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
bug #42143 (The constant NAN is reported as 0 on Windows build)
|
||||
--CREDITS--
|
||||
Venkat Raman Don
|
||||
--FILE--
|
||||
<?php
|
||||
echo "Testing NAN:\n";
|
||||
echo "NAN= ";
|
||||
var_dump(NAN);
|
||||
var_dump(tan(-1) == 123);
|
||||
var_dump(cos(-100) == "PHP String");
|
||||
var_dump(deg2rad(-5.6) == null);
|
||||
var_dump(sqrt(-0.1) == false);
|
||||
var_dump(sqrt(cos(M_PI)) == 0.1);
|
||||
var_dump(NAN);
|
||||
var_dump(is_nan(sqrt(-1.005)) == false);
|
||||
var_dump(is_nan(floor(1)) == true);
|
||||
var_dump(log10(-1) == log(-1));
|
||||
var_dump(log10(-1) != log10(-1));
|
||||
var_dump(is_finite(log10(-1)) == false);
|
||||
var_dump(NAN == NAN);
|
||||
?>
|
||||
--EXPECT--
|
||||
Testing NAN:
|
||||
NAN= float(NAN)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
float(NAN)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Bug #45805 (Crash on throwing exception from error handler)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('reflection') or die('skip'); ?>
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
class PHPUnit_Util_ErrorHandler
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #45877 (Array key '2147483647' left as string)
|
||||
--INI--
|
||||
precision=20
|
||||
--FILE--
|
||||
<?php
|
||||
$keys = array(PHP_INT_MAX,
|
||||
(string) PHP_INT_MAX,
|
||||
(string) (-PHP_INT_MAX - 1),
|
||||
-PHP_INT_MAX - 1,
|
||||
(string) (PHP_INT_MAX + 1));
|
||||
|
||||
var_dump(array_fill_keys($keys, 1));
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
[%d7]=>
|
||||
int(1)
|
||||
[-%d8]=>
|
||||
int(1)
|
||||
["%d8"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -27,16 +27,12 @@ new foo;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[-866368000]=>
|
||||
int(1)
|
||||
[-835511808]=>
|
||||
int(2)
|
||||
[-835350528]=>
|
||||
int(3)
|
||||
}
|
||||
int(2)
|
||||
array(1) {
|
||||
[-835350528]=>
|
||||
[-2147483648]=>
|
||||
int(3)
|
||||
}
|
||||
int(3)
|
||||
array(1) {
|
||||
[-2147483648]=>
|
||||
int(3)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Bug #47704 (crashes on some "bad" operations with string offsets)
|
||||
--FILE--
|
||||
<?php
|
||||
$s = "abd";
|
||||
$s[0]->a += 1;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use string offset as an object in %sbug47704.php on line %d
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
function __call($name, $args)
|
||||
{
|
||||
echo("magic method called: $name\n");
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
function getFoo()
|
||||
{
|
||||
parent::getFoo();
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$a->getFoo();
|
||||
|
||||
$b = new B();
|
||||
$b->getFoo();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
magic method called: getFoo
|
||||
magic method called: getFoo
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$arr[PHP_INT_MAX] = 1;
|
||||
$arr[] = 2;
|
||||
|
||||
var_dump($arr);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Cannot add element to the array as the next element is already occupied in %s on line 4
|
||||
array(1) {
|
||||
[%d]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #47981 (error handler not called regardless)
|
||||
--INI--
|
||||
error_reporting=0
|
||||
--FILE--
|
||||
<?php
|
||||
function errh($errno, $errstr) {
|
||||
var_dump($errstr);
|
||||
}
|
||||
set_error_handler("errh");
|
||||
|
||||
interface a{}
|
||||
class b implements a { function f($a=1) {}}
|
||||
class c extends b {function f() {}}
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(62) "Declaration of c::f() should be compatible with that of b::f()"
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #48228 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function do_throw() {
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
class aa
|
||||
{
|
||||
function check()
|
||||
{
|
||||
}
|
||||
|
||||
function dosome()
|
||||
{
|
||||
$this->check(do_throw());
|
||||
}
|
||||
}
|
||||
$l_aa=new aa();
|
||||
|
||||
$l_aa->dosome();
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %s
|
||||
Stack trace:
|
||||
#0 %s(%d): do_throw()
|
||||
#1 %s(%d): aa->dosome()
|
||||
#2 {main}
|
||||
thrown in %s
|
||||
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #48248 (SIGSEGV when access to private property via &__get)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
public function & __get($name)
|
||||
{
|
||||
return $this->test;
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
private $test;
|
||||
}
|
||||
|
||||
$b = new B;
|
||||
var_dump($b->test);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined property: B::$test in %s on line %d
|
||||
|
||||
Notice: Only variable references should be returned by reference in %s on line %d
|
||||
NULL
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #48408 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
class B{
|
||||
public function process($x){
|
||||
return $x;
|
||||
}
|
||||
}
|
||||
class C{
|
||||
public function generate($x){
|
||||
throw new Exception;
|
||||
}
|
||||
}
|
||||
$b = new B;
|
||||
$c = new C;
|
||||
try{
|
||||
$b->process($c->generate(0));
|
||||
}
|
||||
catch(Exception $e){
|
||||
$c->generate(0);
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %s
|
||||
Stack trace:
|
||||
#0 %s(%d): C->generate(0)
|
||||
#1 {main}
|
||||
thrown in %s
|
||||
@@ -0,0 +1,67 @@
|
||||
--TEST--
|
||||
Bug #48409 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class ABCException extends Exception {}
|
||||
|
||||
class BBB
|
||||
{
|
||||
public function xyz($d, $x)
|
||||
{
|
||||
if ($x == 34) {
|
||||
throw new ABCException;
|
||||
}
|
||||
return array('foo' => 'xyz');
|
||||
}
|
||||
}
|
||||
|
||||
class CCC
|
||||
{
|
||||
public function process($p)
|
||||
{
|
||||
return $p;
|
||||
}
|
||||
}
|
||||
|
||||
class AAA
|
||||
{
|
||||
public function func()
|
||||
{
|
||||
$b = new BBB;
|
||||
$c = new CCC;
|
||||
$i = 34;
|
||||
$item = array('foo' => 'bar');
|
||||
try {
|
||||
$c->process($b->xyz($item['foo'], $i));
|
||||
}
|
||||
catch(ABCException $e) {
|
||||
$b->xyz($item['foo'], $i);
|
||||
}
|
||||
} // end func();
|
||||
}
|
||||
|
||||
class Runner
|
||||
{
|
||||
public function run($x)
|
||||
{
|
||||
try {
|
||||
$x->func();
|
||||
}
|
||||
catch(ABCException $e) {
|
||||
throw new Exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$runner = new Runner;
|
||||
$runner->run(new AAA);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
die('Exception thrown');
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Exception thrown
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #48428 (crash when exception is thrown while passing function arguments)
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
function x() { throw new Exception("ERROR"); }
|
||||
x(x());
|
||||
} catch(Exception $e) {
|
||||
echo($e -> getMessage());
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
ERROR
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = create_function('', 'return 1; }');
|
||||
$y = create_function('', 'function a() { }; return 2;');
|
||||
$z = create_function('', '{');
|
||||
$w = create_function('', 'return 3;');
|
||||
|
||||
var_dump(
|
||||
$x,
|
||||
$y(),
|
||||
$z,
|
||||
$w(),
|
||||
$y != $z
|
||||
);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Parse error: syntax error, unexpected '}' in %s(%d) : runtime-created function on line 1
|
||||
|
||||
Parse error: syntax error, unexpected $end in %s(%d) : runtime-created function on line 1
|
||||
bool(false)
|
||||
int(2)
|
||||
bool(false)
|
||||
int(3)
|
||||
bool(true)
|
||||
@@ -0,0 +1,51 @@
|
||||
--TEST--
|
||||
Bug #48770 (call_user_func_array() fails to call parent from inheriting class)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public function func($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
private function func2($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
protected function func3($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
private function func22($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
public function func($str) {
|
||||
static $avoid_crash = 0;
|
||||
|
||||
if ($avoid_crash++ == 1) {
|
||||
print "This method shouldn't be called when using parent::func!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
call_user_func_array(array($this, 'parent::func'), array($str));
|
||||
}
|
||||
private function func2($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
protected function func3($str) {
|
||||
var_dump(__METHOD__ .': '. $str);
|
||||
}
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function func($str) {
|
||||
parent::func($str);
|
||||
}
|
||||
}
|
||||
|
||||
$c = new C;
|
||||
$c->func('This should work!');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
%unicode|string%(26) "A::func: This should work!"
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #49269 (Ternary operator fails on Iterator object when used inside foreach declaration).
|
||||
--FILE--
|
||||
<?php
|
||||
class TestObject implements Iterator
|
||||
{
|
||||
public $n = 0;
|
||||
function valid()
|
||||
{
|
||||
return ($this->n < 3);
|
||||
}
|
||||
function current() {return $this->n;}
|
||||
function next() {$this->n++;}
|
||||
function key() { }
|
||||
function rewind() {$this->n = 0;}
|
||||
}
|
||||
|
||||
|
||||
$array_object = new TestObject();
|
||||
|
||||
foreach ((true ? $array_object : $array_object) as $item) echo "$item\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
1
|
||||
2
|
||||
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #49472 (Constants defined in Interfaces can be overridden)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface ia {
|
||||
const c = 'Sea';
|
||||
const y = 2;
|
||||
}
|
||||
|
||||
class Foo implements ia {
|
||||
}
|
||||
|
||||
class FooBar extends Foo implements ia {
|
||||
const x = 1;
|
||||
const c = 'Ocean';
|
||||
|
||||
public function show() {
|
||||
return ia::c;
|
||||
}
|
||||
}
|
||||
|
||||
new FooBar;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot inherit previously-inherited or override constant c from interface ia in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #50005 (Throwing through Reflection modified Exception object makes segmentation fault)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a extends exception {
|
||||
public function __construct() {
|
||||
$this->file = null;
|
||||
}
|
||||
}
|
||||
|
||||
throw new a;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'a' in :%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in Unknown on line %d
|
||||
@@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
Bug #50174 (Incorrectly matched docComment)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class TestClass
|
||||
{
|
||||
/** const comment */
|
||||
const C = 0;
|
||||
|
||||
function x() {}
|
||||
}
|
||||
|
||||
$rm = new ReflectionMethod('TestClass', 'x');
|
||||
var_dump($rm->getDocComment());
|
||||
|
||||
class TestClass2
|
||||
{
|
||||
/** const comment */
|
||||
const C = 0;
|
||||
|
||||
public $x;
|
||||
}
|
||||
|
||||
$rp = new ReflectionProperty('TestClass2', 'x');
|
||||
var_dump($rp->getDocComment());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #50255 (isset() and empty() silently casts array to object)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$arr = array('foo' => 'bar');
|
||||
|
||||
print "isset\n";
|
||||
var_dump(isset($arr->foo));
|
||||
var_dump(isset($arr->bar));
|
||||
var_dump(isset($arr['foo']));
|
||||
var_dump(isset($arr['bar']));
|
||||
print "empty\n";
|
||||
var_dump(empty($arr->foo));
|
||||
var_dump(empty($arr->bar));
|
||||
var_dump(empty($arr['foo']));
|
||||
var_dump(empty($arr['bar']));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
isset
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
empty
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -16,5 +16,5 @@ class test implements test1, test2 {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot inherit previously-inherited constant FOO from interface test2 in %s on line %d
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface test2 in %s on line %d
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Testing Exception's methods
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$x = new Exception;
|
||||
$x->gettraceasstring(1);
|
||||
$x->gettraceasstring();
|
||||
$x->__tostring(1);
|
||||
$x->gettrace(1);
|
||||
$x->getline(1);
|
||||
$x->getfile(1);
|
||||
$x->getmessage(1);
|
||||
$x->getcode(1);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Wrong parameter count for Exception::getTraceAsString() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::__toString() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getTrace() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getLine() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getFile() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getMessage() in %s on line %d
|
||||
|
||||
Warning: Wrong parameter count for Exception::getCode() in %s on line %d
|
||||
@@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
function_exists function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() : basic functionality ***\n";
|
||||
|
||||
echo "Internal function: ";
|
||||
var_dump(function_exists('function_exists'));
|
||||
|
||||
echo "User defined function: ";
|
||||
function f() {}
|
||||
var_dump(function_exists('f'));
|
||||
|
||||
echo "Case sensitivity: ";
|
||||
var_dump(function_exists('F'));
|
||||
|
||||
echo "Non existent function: ";
|
||||
var_dump(function_exists('g'));
|
||||
|
||||
echo "Method: ";
|
||||
Class C {
|
||||
static function f() {}
|
||||
}
|
||||
var_dump(function_exists('C::f'));
|
||||
?>
|
||||
===Done===
|
||||
--EXPECT--
|
||||
*** Testing function_exists() : basic functionality ***
|
||||
Internal function: bool(true)
|
||||
User defined function: bool(true)
|
||||
Case sensitivity: bool(true)
|
||||
Non existent function: bool(false)
|
||||
Method: bool(false)
|
||||
===Done===
|
||||
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
Test function_exists() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() : error conditions ***\n";
|
||||
|
||||
$arg_0 = "ABC";
|
||||
$extra_arg = 1;
|
||||
|
||||
echo "\nToo many arguments\n";
|
||||
var_dump(function_exists($arg_0, $extra_arg));
|
||||
|
||||
echo "\nToo few arguments\n";
|
||||
var_dump(function_exists());
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing function_exists() : error conditions ***
|
||||
|
||||
Too many arguments
|
||||
|
||||
Warning: Wrong parameter count for function_exists() in %s on line %d
|
||||
NULL
|
||||
|
||||
Too few arguments
|
||||
|
||||
Warning: Wrong parameter count for function_exists() in %s on line %d
|
||||
NULL
|
||||
===Done===
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
--TEST--
|
||||
Test function_exists() function : usage variations - test values for $str argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/*
|
||||
* proto bool function_exists(string function_name)
|
||||
* Function is implemented in Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing function_exists() function: with unexpected inputs for 'str' argument ***\n";
|
||||
|
||||
//get an unset variable
|
||||
$unset_var = 'string_val';
|
||||
unset($unset_var);
|
||||
|
||||
//defining a class
|
||||
class sample {
|
||||
public function __toString() {
|
||||
return "sample object";
|
||||
}
|
||||
}
|
||||
|
||||
//getting the resource
|
||||
$file_handle = fopen(__FILE__, "r");
|
||||
|
||||
// array with different values for $str
|
||||
$inputs = array (
|
||||
|
||||
// integer values
|
||||
0,
|
||||
1,
|
||||
255,
|
||||
256,
|
||||
PHP_INT_MAX,
|
||||
-PHP_INT_MAX,
|
||||
|
||||
// float values
|
||||
10.5,
|
||||
-20.5,
|
||||
10.1234567e10,
|
||||
|
||||
// array values
|
||||
array(),
|
||||
array(0),
|
||||
array(1, 2),
|
||||
|
||||
// boolean values
|
||||
true,
|
||||
false,
|
||||
TRUE,
|
||||
FALSE,
|
||||
|
||||
// null values
|
||||
NULL,
|
||||
null,
|
||||
|
||||
// objects
|
||||
new sample(),
|
||||
|
||||
// resource
|
||||
$file_handle,
|
||||
|
||||
// undefined variable
|
||||
@$undefined_var,
|
||||
|
||||
// unset variable
|
||||
@$unset_var
|
||||
);
|
||||
|
||||
// loop through with each element of the $inputs array to test function_exists() function
|
||||
$count = 1;
|
||||
foreach($inputs as $input) {
|
||||
echo "-- Iteration $count --\n";
|
||||
var_dump( function_exists($input) );
|
||||
$count ++;
|
||||
}
|
||||
|
||||
fclose($file_handle); //closing the file handle
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing function_exists() function: with unexpected inputs for 'str' argument ***
|
||||
-- Iteration 1 --
|
||||
bool(false)
|
||||
-- Iteration 2 --
|
||||
bool(false)
|
||||
-- Iteration 3 --
|
||||
bool(false)
|
||||
-- Iteration 4 --
|
||||
bool(false)
|
||||
-- Iteration 5 --
|
||||
bool(false)
|
||||
-- Iteration 6 --
|
||||
bool(false)
|
||||
-- Iteration 7 --
|
||||
bool(false)
|
||||
-- Iteration 8 --
|
||||
bool(false)
|
||||
-- Iteration 9 --
|
||||
bool(false)
|
||||
-- Iteration 10 --
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 11 --
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 12 --
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 13 --
|
||||
bool(false)
|
||||
-- Iteration 14 --
|
||||
bool(false)
|
||||
-- Iteration 15 --
|
||||
bool(false)
|
||||
-- Iteration 16 --
|
||||
bool(false)
|
||||
-- Iteration 17 --
|
||||
bool(false)
|
||||
-- Iteration 18 --
|
||||
bool(false)
|
||||
-- Iteration 19 --
|
||||
bool(false)
|
||||
-- Iteration 20 --
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
bool(false)
|
||||
===Done===
|
||||
@@ -33,7 +33,7 @@ new C;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(5) {
|
||||
array(6) {
|
||||
["aaa"]=>
|
||||
int(7)
|
||||
["ccc"]=>
|
||||
@@ -42,6 +42,8 @@ array(5) {
|
||||
int(1)
|
||||
["aa"]=>
|
||||
int(4)
|
||||
["bb"]=>
|
||||
int(5)
|
||||
["cc"]=>
|
||||
int(6)
|
||||
}
|
||||
@@ -44,5 +44,7 @@ array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
array(0) {
|
||||
array(1) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
--TEST--
|
||||
get_defined_functions() function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : array get_defined_functions ( void )
|
||||
* Description: Gets an array of all defined functions.
|
||||
* Source code: Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
echo "*** Testing get_defined_functions() : basic functionality ***\n";
|
||||
|
||||
function foo() {}
|
||||
|
||||
// mixed case function
|
||||
function HelloWorld() {}
|
||||
|
||||
Class C {
|
||||
function f1() {}
|
||||
static function f2() {}
|
||||
}
|
||||
|
||||
$func = get_defined_functions();
|
||||
|
||||
if (!is_array($func)) {
|
||||
echo "TEST FAILED: return type not an array\n";
|
||||
}
|
||||
|
||||
|
||||
if (!is_array($func["internal"])) {
|
||||
echo "TEST FAILED: no element in result array with key 'internal'\n";
|
||||
}
|
||||
|
||||
$internal = $func["internal"];
|
||||
|
||||
//check for a few core functions
|
||||
if (!in_array("cos", $internal) || !in_array("strlen", $internal)) {
|
||||
echo "TEST FAILED: missing elements from 'internal' array\n";
|
||||
var_dump($internal);
|
||||
}
|
||||
|
||||
if (!is_array($func["user"])) {
|
||||
echo "TEST FAILED: no element in result array with key 'user'\n";
|
||||
}
|
||||
|
||||
$user = $func["user"];
|
||||
if (count($user) == 2 && in_array("foo", $user) && in_array("helloworld", $user)) {
|
||||
echo "TEST PASSED\n";
|
||||
} else {
|
||||
echo "TEST FAILED: missing elements from 'user' array\n";
|
||||
var_dump($user);
|
||||
}
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECT--
|
||||
*** Testing get_defined_functions() : basic functionality ***
|
||||
TEST PASSED
|
||||
===Done===
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Test get_defined_functions() function : error conditions
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : array get_defined_functions ( void )
|
||||
* Description: Gets an array of all defined functions.
|
||||
* Source code: Zend/zend_builtin_functions.c
|
||||
*/
|
||||
|
||||
|
||||
echo "*** Testing get_defined_functions() : error conditions ***\n";
|
||||
|
||||
|
||||
echo "\n-- Testing get_defined_functions() function with more than expected no. of arguments --\n";
|
||||
$extra_arg = 10;
|
||||
var_dump( get_defined_functions($extra_arg) );
|
||||
|
||||
?>
|
||||
===Done===
|
||||
--EXPECTF--
|
||||
*** Testing get_defined_functions() : error conditions ***
|
||||
|
||||
-- Testing get_defined_functions() function with more than expected no. of arguments --
|
||||
|
||||
Warning: Wrong parameter count for get_defined_functions() in %s on line %d
|
||||
NULL
|
||||
|
||||
===Done===
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Check if get_required_files works
|
||||
--CREDITS--
|
||||
Sebastian Schürmann
|
||||
sschuermann@chip.de
|
||||
Testfest 2009 Munich
|
||||
--FILE--
|
||||
<?php
|
||||
$files = get_required_files();
|
||||
var_dump($files);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
[0]=>
|
||||
%string|unicode%(%d)%s
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Crash when function parameter modified via unexpected reference
|
||||
--FILE--
|
||||
<?php
|
||||
function my_errorhandler($errno,$errormsg) {
|
||||
global $my_var;
|
||||
$my_var = 0;
|
||||
return true;
|
||||
}
|
||||
set_error_handler("my_errorhandler");
|
||||
$my_var = str_repeat("A",64);
|
||||
$data = call_user_func_array("explode",array(new StdClass(), &$my_var));
|
||||
$my_var=array(1,2,3);
|
||||
$data = call_user_func_array("implode",array(&$my_var, new StdClass()));
|
||||
echo "Done.\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Done.
|
||||
@@ -1,7 +1,5 @@
|
||||
--TEST--
|
||||
unset() CV 7 (indirect unset() of global variable in import_request_variables())
|
||||
--SKIPIF--
|
||||
<?php if (php_sapi_name()=='cli') echo 'skip'; ?>
|
||||
--GET--
|
||||
x=2
|
||||
--FILE--
|
||||
|
||||
+2
-2
@@ -835,7 +835,7 @@ void zend_deactivate_modules(TSRMLS_D)
|
||||
EG(opline_ptr) = NULL; /* we're no longer executing anything */
|
||||
|
||||
zend_try {
|
||||
zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
|
||||
zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
|
||||
} zend_end_try();
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
|
||||
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
|
||||
#endif
|
||||
|
||||
|
||||
+19
-1
@@ -178,6 +178,12 @@ char *alloca ();
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
|
||||
#else
|
||||
# define __restrict__
|
||||
#endif
|
||||
#define restrict __restrict__
|
||||
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
|
||||
# define do_alloca(p) alloca(p)
|
||||
# define free_alloca(p)
|
||||
@@ -249,6 +255,18 @@ char *alloca ();
|
||||
#define LONG_MIN (- LONG_MAX - 1)
|
||||
#endif
|
||||
|
||||
#if SIZEOF_LONG == 4
|
||||
#define MAX_LENGTH_OF_LONG 11
|
||||
static const char long_min_digits[] = "2147483648";
|
||||
#elif SIZEOF_LONG == 8
|
||||
#define MAX_LENGTH_OF_LONG 20
|
||||
static const char long_min_digits[] = "9223372036854775808";
|
||||
#else
|
||||
#error "Unknown SIZEOF_LONG"
|
||||
#endif
|
||||
|
||||
#define MAX_LENGTH_OF_DOUBLE 32
|
||||
|
||||
#undef SUCCESS
|
||||
#undef FAILURE
|
||||
#define SUCCESS 0
|
||||
@@ -262,7 +280,7 @@ char *alloca ();
|
||||
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC
|
||||
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC
|
||||
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) && __GNUC__ >= 3
|
||||
# define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn));
|
||||
#else
|
||||
|
||||
+10
-11
@@ -901,21 +901,21 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
|
||||
|
||||
zend_hash_get_current_key_ex(&class_type->default_static_members, &str_index, &str_length, &num_index, 0, &pos);
|
||||
if ((*p)->is_ref &&
|
||||
class_type->parent &&
|
||||
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
|
||||
*p == *q &&
|
||||
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
|
||||
class_type->parent &&
|
||||
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
|
||||
*p == *q &&
|
||||
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
|
||||
(*q)->refcount++;
|
||||
(*q)->is_ref = 1;
|
||||
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)q, sizeof(zval*), NULL);
|
||||
} else {
|
||||
zval *q;
|
||||
zval *r;
|
||||
|
||||
ALLOC_ZVAL(q);
|
||||
*q = **p;
|
||||
INIT_PZVAL(q);
|
||||
zval_copy_ctor(q);
|
||||
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&q, sizeof(zval*), NULL);
|
||||
ALLOC_ZVAL(r);
|
||||
*r = **p;
|
||||
INIT_PZVAL(r);
|
||||
zval_copy_ctor(r);
|
||||
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&r, sizeof(zval*), NULL);
|
||||
}
|
||||
zend_hash_move_forward_ex(&class_type->default_static_members, &pos);
|
||||
}
|
||||
@@ -1782,7 +1782,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
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);
|
||||
|
||||
+10
-1
@@ -148,7 +148,12 @@ static zend_mm_segment* zend_mm_mem_mmap_realloc(zend_mm_storage *storage, zend_
|
||||
{
|
||||
zend_mm_segment *ret;
|
||||
#ifdef HAVE_MREMAP
|
||||
#if defined(__NetBSD__)
|
||||
/* NetBSD 5 supports mremap but takes an extra newp argument */
|
||||
ret = (zend_mm_segment*)mremap(segment, segment->size, segment, size, MREMAP_MAYMOVE);
|
||||
#else
|
||||
ret = (zend_mm_segment*)mremap(segment, segment->size, size, MREMAP_MAYMOVE);
|
||||
#endif
|
||||
if (ret == MAP_FAILED) {
|
||||
#endif
|
||||
ret = storage->handlers->_alloc(storage, size);
|
||||
@@ -2472,7 +2477,11 @@ ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC)
|
||||
if (real_usage) {
|
||||
return AG(mm_heap)->real_size;
|
||||
} else {
|
||||
return AG(mm_heap)->size;
|
||||
size_t usage = AG(mm_heap)->size;
|
||||
#if ZEND_MM_CACHE
|
||||
usage -= AG(mm_heap)->cached;
|
||||
#endif
|
||||
return usage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ inline static void * __zend_malloc(size_t len)
|
||||
inline static void * __zend_calloc(size_t nmemb, size_t len)
|
||||
{
|
||||
void *tmp = _safe_malloc(nmemb, len, 0);
|
||||
memset(tmp, 0, len);
|
||||
memset(tmp, 0, nmemb * len);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ static ZEND_FUNCTION(zend_version);
|
||||
static ZEND_FUNCTION(func_num_args);
|
||||
static ZEND_FUNCTION(func_get_arg);
|
||||
static ZEND_FUNCTION(func_get_args);
|
||||
static ZEND_NAMED_FUNCTION(zend_if_strlen);
|
||||
static ZEND_FUNCTION(strlen);
|
||||
static ZEND_FUNCTION(strcmp);
|
||||
static ZEND_FUNCTION(strncmp);
|
||||
static ZEND_FUNCTION(strcasecmp);
|
||||
@@ -93,7 +93,7 @@ static zend_function_entry builtin_functions[] = {
|
||||
ZEND_FE(func_num_args, NULL)
|
||||
ZEND_FE(func_get_arg, NULL)
|
||||
ZEND_FE(func_get_args, NULL)
|
||||
{ "strlen", zend_if_strlen, NULL },
|
||||
ZEND_FE(strlen, NULL)
|
||||
ZEND_FE(strcmp, NULL)
|
||||
ZEND_FE(strncmp, NULL)
|
||||
ZEND_FE(strcasecmp, NULL)
|
||||
@@ -275,7 +275,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
|
||||
/* {{{ proto int strlen(string str)
|
||||
Get string length */
|
||||
ZEND_NAMED_FUNCTION(zend_if_strlen)
|
||||
ZEND_FUNCTION(strlen)
|
||||
{
|
||||
zval **str;
|
||||
|
||||
@@ -461,6 +461,7 @@ ZEND_FUNCTION(define)
|
||||
zend_bool non_cs = 0;
|
||||
int case_sensitive = CONST_CS;
|
||||
zend_constant c;
|
||||
char *p;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|b", &name, &name_len, &val, &non_cs) == FAILURE) {
|
||||
return;
|
||||
@@ -470,6 +471,34 @@ ZEND_FUNCTION(define)
|
||||
case_sensitive = 0;
|
||||
}
|
||||
|
||||
/* class constant, check if there is name and make sure class is valid & exists */
|
||||
if ((p = zend_memnstr(name, "::", sizeof("::") - 1, name + name_len))) {
|
||||
char *class_name;
|
||||
int found;
|
||||
zend_class_entry **ce;
|
||||
ALLOCA_FLAG(use_heap)
|
||||
|
||||
if (p == (name + name_len - sizeof("::") + 1)) {
|
||||
zend_error(E_WARNING, "Class constant must have a name");
|
||||
RETURN_FALSE;
|
||||
} else if (p == name) {
|
||||
zend_error(E_WARNING, "Missing class name");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
class_name = do_alloca_with_limit((p - name + 1), use_heap);
|
||||
zend_str_tolower_copy(class_name, name, (p - name));
|
||||
|
||||
found = zend_hash_find(EG(class_table), class_name, p - name + 1, (void **) &ce);
|
||||
|
||||
if (found != SUCCESS) {
|
||||
zend_error(E_WARNING, "Class '%s' does not exist", class_name);
|
||||
free_alloca_with_limit(class_name, use_heap);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
free_alloca_with_limit(class_name, use_heap);
|
||||
}
|
||||
|
||||
repeat:
|
||||
switch (Z_TYPE_P(val)) {
|
||||
case IS_LONG:
|
||||
@@ -706,27 +735,22 @@ 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, h;
|
||||
ulong num_index;
|
||||
int prop_name_len = 0;
|
||||
zval *prop_copy;
|
||||
zend_property_info *property_info;
|
||||
zval zprop_name;
|
||||
|
||||
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);
|
||||
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) {
|
||||
|
||||
ZVAL_STRINGL(&zprop_name, prop_name, prop_name_len, 0);
|
||||
property_info = zend_get_property_info(ce, &zprop_name, 1 TSRMLS_CC);
|
||||
|
||||
if (!property_info || property_info == &EG(std_property_info)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1492,6 +1516,7 @@ ZEND_FUNCTION(create_function)
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_STRINGL(function_name, function_name_length, 0);
|
||||
} else {
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -1594,15 +1619,15 @@ ZEND_FUNCTION(get_loaded_extensions)
|
||||
Return an array containing the names and values of all defined constants */
|
||||
ZEND_FUNCTION(get_defined_constants)
|
||||
{
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
zend_bool categorize = 0;
|
||||
|
||||
if (argc != 0 && argc != 1) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &categorize) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
if (argc) {
|
||||
if (categorize) {
|
||||
HashPosition pos;
|
||||
zend_constant *val;
|
||||
int module_number;
|
||||
@@ -1617,7 +1642,8 @@ ZEND_FUNCTION(get_defined_constants)
|
||||
module_names[0] = "internal";
|
||||
zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
|
||||
while (zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) != FAILURE) {
|
||||
module_names[i++] = module->name;
|
||||
module_names[module->module_number] = module->name;
|
||||
i++;
|
||||
zend_hash_move_forward_ex(&module_registry, &pos);
|
||||
}
|
||||
module_names[i] = "user";
|
||||
|
||||
+23
-11
@@ -1536,11 +1536,8 @@ void zend_do_begin_class_member_function_call(znode *class_name, znode *method_n
|
||||
memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == 0) {
|
||||
zval_dtor(&opline->op2.u.constant);
|
||||
SET_UNUSED(opline->op2);
|
||||
efree(lcname);
|
||||
} else {
|
||||
efree(opline->op2.u.constant.value.str.val);
|
||||
opline->op2.u.constant.value.str.val = lcname;
|
||||
}
|
||||
efree(lcname);
|
||||
}
|
||||
|
||||
zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *));
|
||||
@@ -2138,7 +2135,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
|
||||
}
|
||||
} else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */
|
||||
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
|
||||
if (!zend_do_perform_implementation_check(child, parent)) {
|
||||
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
|
||||
}
|
||||
@@ -2336,20 +2333,28 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval **parent_constant, zend_hash_key *hash_key, zend_class_entry *iface)
|
||||
{
|
||||
zval **old_constant;
|
||||
|
||||
if (zend_hash_quick_find(child_constants_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void**)&old_constant) == SUCCESS) {
|
||||
if (*old_constant != *parent_constant) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited constant %s from interface %s", hash_key->arKey, iface->name);
|
||||
if (*old_constant != *parent_constant) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s from interface %s", hash_key->arKey, iface->name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int do_interface_constant_check(zval **val, int num_args, va_list args, zend_hash_key *key) /* {{{ */
|
||||
{
|
||||
zend_class_entry **iface = va_arg(args, zend_class_entry**);
|
||||
|
||||
do_inherit_constant_check(&(*iface)->constants_table, val, key, *iface);
|
||||
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC)
|
||||
{
|
||||
@@ -2369,7 +2374,10 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ignore) {
|
||||
if (ignore) {
|
||||
/* Check for attempt to redeclare interface constants */
|
||||
zend_hash_apply_with_arguments(&ce->constants_table, (apply_func_args_t) do_interface_constant_check, 1, &iface);
|
||||
} else {
|
||||
if (ce->num_interfaces >= current_iface_num) {
|
||||
if (ce->type == ZEND_INTERNAL_CLASS) {
|
||||
ce->interfaces = (zend_class_entry **) realloc(ce->interfaces, sizeof(zend_class_entry *) * (++current_iface_num));
|
||||
@@ -3106,6 +3114,12 @@ void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC)
|
||||
zend_error(E_COMPILE_ERROR, "Cannot redefine class constant %s::%s", CG(active_class_entry)->name, var_name->u.constant.value.str.val);
|
||||
}
|
||||
FREE_PNODE(var_name);
|
||||
|
||||
if (CG(doc_comment)) {
|
||||
efree(CG(doc_comment));
|
||||
CG(doc_comment) = NULL;
|
||||
CG(doc_comment_len) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4195,8 +4209,6 @@ again:
|
||||
case T_END_HEREDOC:
|
||||
efree(Z_STRVAL(zendlval->u.constant));
|
||||
break;
|
||||
case EOF:
|
||||
return EOF;
|
||||
}
|
||||
|
||||
INIT_PZVAL(&zendlval->u.constant);
|
||||
|
||||
@@ -428,9 +428,14 @@ static int _build_trace_string(zval **frame, int num_args, va_list args, zend_ha
|
||||
ZEND_METHOD(exception, getTraceAsString)
|
||||
{
|
||||
zval *trace;
|
||||
char *res = estrdup(""), **str = &res, *s_tmp;
|
||||
char *res, **str, *s_tmp;
|
||||
int res_len = 0, *len = &res_len, num = 0;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
res = estrdup("");
|
||||
str = &res;
|
||||
|
||||
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_arguments(Z_ARRVAL_P(trace), (apply_func_args_t)_build_trace_string, 3, str, len, &num);
|
||||
|
||||
@@ -465,6 +470,8 @@ ZEND_METHOD(exception, __toString)
|
||||
int len;
|
||||
zend_fcall_info fci;
|
||||
zval fname;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
_default_exception_get_entry(getThis(), "message", sizeof("message")-1, &message TSRMLS_CC);
|
||||
_default_exception_get_entry(getThis(), "file", sizeof("file")-1, &file TSRMLS_CC);
|
||||
|
||||
+4
-1
@@ -183,7 +183,6 @@ static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_
|
||||
if (T->str_offset.str->type != IS_STRING
|
||||
|| ((int)T->str_offset.offset < 0)
|
||||
|| (T->str_offset.str->value.str.len <= (int)T->str_offset.offset)) {
|
||||
zend_error(E_NOTICE, "Uninitialized string offset: %d", T->str_offset.offset);
|
||||
ptr->value.str.val = STR_EMPTY_ALLOC();
|
||||
ptr->value.str.len = 0;
|
||||
} else {
|
||||
@@ -1133,6 +1132,10 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container
|
||||
break;
|
||||
}
|
||||
if (result) {
|
||||
if ((Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) &&
|
||||
(type == BP_VAR_R || type == BP_VAR_IS)) {
|
||||
zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
|
||||
}
|
||||
container = *container_ptr;
|
||||
result->str_offset.str = container;
|
||||
PZVAL_LOCK(container);
|
||||
|
||||
@@ -169,6 +169,27 @@ static inline int zend_ptr_stack_get_arg(int requested_arg, void **data TSRMLS_D
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc)
|
||||
{
|
||||
void *a, *b;
|
||||
|
||||
zend_ptr_stack_2_pop(stack, &a, &b);
|
||||
|
||||
*object = (zval *) a;
|
||||
*fbc = (zend_function *) b;
|
||||
}
|
||||
|
||||
static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc)
|
||||
{
|
||||
void *a, *b, *c;
|
||||
|
||||
zend_ptr_stack_3_pop(stack, &a, &b, &c);
|
||||
|
||||
*called_scope = (zend_class_entry *) a;
|
||||
*object = (zval *) b;
|
||||
*fbc = (zend_function *) c;
|
||||
}
|
||||
|
||||
void execute_new_code(TSRMLS_D);
|
||||
|
||||
|
||||
|
||||
+15
-5
@@ -835,11 +835,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
efree(function_name_lc);
|
||||
}
|
||||
} else if (calling_scope) {
|
||||
char *function_name_lc = zend_str_tolower_dup(fname, fname_len);
|
||||
EX(function_state).function = zend_std_get_static_method(calling_scope, fname, fname_len TSRMLS_CC);
|
||||
|
||||
EX(function_state).function =
|
||||
zend_std_get_static_method(calling_scope, function_name_lc, fname_len TSRMLS_CC);
|
||||
efree(function_name_lc);
|
||||
if (check_scope_or_static && EX(function_state).function
|
||||
&& !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)
|
||||
&& !instanceof_function(check_scope_or_static, calling_scope TSRMLS_CC)) {
|
||||
@@ -924,6 +921,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
for (i=0; i<fci->param_count; i++) {
|
||||
zval *param;
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION
|
||||
&& !ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
|
||||
&& PZVAL_IS_REF(*fci->params[i])) {
|
||||
SEPARATE_ZVAL(fci->params[i]);
|
||||
}
|
||||
|
||||
if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i+1)
|
||||
&& !PZVAL_IS_REF(*fci->params[i])) {
|
||||
if ((*fci->params[i])->refcount>1) {
|
||||
@@ -1209,13 +1212,16 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSR
|
||||
zval *local_retval_ptr=NULL;
|
||||
zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
|
||||
zend_op **original_opline_ptr = EG(opline_ptr);
|
||||
int orig_interactive = CG(interactive);
|
||||
|
||||
EG(return_value_ptr_ptr) = &local_retval_ptr;
|
||||
EG(active_op_array) = new_op_array;
|
||||
EG(no_extensions)=1;
|
||||
CG(interactive) = 0;
|
||||
|
||||
zend_execute(new_op_array TSRMLS_CC);
|
||||
|
||||
CG(interactive) = orig_interactive;
|
||||
if (local_retval_ptr) {
|
||||
if (retval_ptr) {
|
||||
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
|
||||
@@ -1262,6 +1268,7 @@ void execute_new_code(TSRMLS_D)
|
||||
zend_op *opline, *end;
|
||||
zend_op *ret_opline;
|
||||
zval *local_retval=NULL;
|
||||
int orig_interactive;
|
||||
|
||||
if (!(CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE)
|
||||
|| CG(active_op_array)->backpatch_count>0
|
||||
@@ -1311,7 +1318,10 @@ void execute_new_code(TSRMLS_D)
|
||||
|
||||
EG(return_value_ptr_ptr) = &local_retval;
|
||||
EG(active_op_array) = CG(active_op_array);
|
||||
orig_interactive = CG(interactive);
|
||||
CG(interactive) = 0;
|
||||
zend_execute(CG(active_op_array) TSRMLS_CC);
|
||||
CG(interactive) = orig_interactive;
|
||||
if (local_retval) {
|
||||
zval_ptr_dtor(&local_retval);
|
||||
}
|
||||
@@ -1501,7 +1511,7 @@ void zend_unset_timeout(TSRMLS_D)
|
||||
}
|
||||
#else
|
||||
# ifdef HAVE_SETITIMER
|
||||
{
|
||||
if (EG(timeout_seconds)) {
|
||||
struct itimerval no_timeout;
|
||||
|
||||
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
|
||||
|
||||
+2
-2
@@ -376,7 +376,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
|
||||
UPDATE_DATA(ht, p, pData, nDataSize);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
if ((long)h >= (long)ht->nNextFreeElement) {
|
||||
ht->nNextFreeElement = h + 1;
|
||||
ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX;
|
||||
}
|
||||
if (pDest) {
|
||||
*pDest = p->pData;
|
||||
@@ -404,7 +404,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
|
||||
if ((long)h >= (long)ht->nNextFreeElement) {
|
||||
ht->nNextFreeElement = h + 1;
|
||||
ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX;
|
||||
}
|
||||
ht->nNumOfElements++;
|
||||
ZEND_HASH_IF_FULL_DO_RESIZE(ht);
|
||||
|
||||
+36
-35
@@ -298,40 +298,41 @@ END_EXTERN_C()
|
||||
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
|
||||
|
||||
|
||||
#define HANDLE_NUMERIC(key, length, func) { \
|
||||
register char *tmp=key; \
|
||||
\
|
||||
if (*tmp=='-') { \
|
||||
tmp++; \
|
||||
} \
|
||||
if ((*tmp>='0' && *tmp<='9')) do { /* possibly a numeric index */ \
|
||||
char *end=key+length-1; \
|
||||
long idx; \
|
||||
\
|
||||
if (*tmp++=='0' && length>2) { /* don't accept numbers with leading zeros */ \
|
||||
break; \
|
||||
} \
|
||||
while (tmp<end) { \
|
||||
if (!(*tmp>='0' && *tmp<='9')) { \
|
||||
break; \
|
||||
} \
|
||||
tmp++; \
|
||||
} \
|
||||
if (tmp==end && *tmp=='\0') { /* a numeric index */ \
|
||||
if (*key=='-') { \
|
||||
idx = strtol(key, NULL, 10); \
|
||||
if (idx!=LONG_MIN) { \
|
||||
return func; \
|
||||
} \
|
||||
} else { \
|
||||
idx = strtol(key, NULL, 10); \
|
||||
if (idx!=LONG_MAX) { \
|
||||
return func; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} while (0); \
|
||||
}
|
||||
#define HANDLE_NUMERIC(key, length, func) do { \
|
||||
register const char *tmp = key; \
|
||||
\
|
||||
if (*tmp == '-') { \
|
||||
tmp++; \
|
||||
} \
|
||||
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
|
||||
const char *end = key + length - 1; \
|
||||
long idx; \
|
||||
\
|
||||
if ((*end != '\0') /* not a null terminated string */ \
|
||||
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
|
||||
|| (end - tmp > MAX_LENGTH_OF_LONG - 1) /* number too long */ \
|
||||
|| (SIZEOF_LONG == 4 && \
|
||||
end - tmp == MAX_LENGTH_OF_LONG - 1 && \
|
||||
*tmp > '2')) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
idx = (*tmp - '0'); \
|
||||
while (++tmp != end && *tmp >= '0' && *tmp <= '9') { \
|
||||
idx = (idx * 10) + (*tmp - '0'); \
|
||||
} \
|
||||
if (tmp == end) { \
|
||||
if (*key == '-') { \
|
||||
idx = -idx; \
|
||||
if (idx > 0) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
} else if (idx < 0) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
return func; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
static inline int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) \
|
||||
@@ -343,7 +344,7 @@ static inline int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLeng
|
||||
|
||||
static inline int zend_symtable_del(HashTable *ht, char *arKey, uint nKeyLength)
|
||||
{
|
||||
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
|
||||
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx));
|
||||
return zend_hash_del(ht, arKey, nKeyLength);
|
||||
}
|
||||
|
||||
|
||||
+2
-23
@@ -148,19 +148,11 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
zend_printf("<span style=\"color: %s\">", last_color);
|
||||
}
|
||||
}
|
||||
switch (token_type) {
|
||||
case T_END_HEREDOC:
|
||||
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
|
||||
break;
|
||||
default:
|
||||
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
|
||||
break;
|
||||
}
|
||||
|
||||
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
|
||||
|
||||
if (token.type == IS_STRING) {
|
||||
switch (token_type) {
|
||||
case EOF:
|
||||
goto done;
|
||||
case T_OPEN_TAG:
|
||||
case T_OPEN_TAG_WITH_ECHO:
|
||||
case T_CLOSE_TAG:
|
||||
@@ -178,19 +170,6 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
|
||||
token.type = 0;
|
||||
}
|
||||
|
||||
/* handler for trailing comments, see bug #42767 */
|
||||
if (LANG_SCNG(yy_leng) && LANG_SCNG(_yy_more_len)) {
|
||||
if (last_color != syntax_highlighter_ini->highlight_comment) {
|
||||
if (last_color != syntax_highlighter_ini->highlight_html) {
|
||||
zend_printf("</span>");
|
||||
}
|
||||
if (syntax_highlighter_ini->highlight_comment != syntax_highlighter_ini->highlight_html) {
|
||||
zend_printf("<span style=\"color: %s\">", syntax_highlighter_ini->highlight_comment);
|
||||
}
|
||||
}
|
||||
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(_yy_more_len) TSRMLS_CC);
|
||||
}
|
||||
done:
|
||||
if (last_color != syntax_highlighter_ini->highlight_html) {
|
||||
zend_printf("</span>\n");
|
||||
}
|
||||
|
||||
+12
-3
@@ -46,15 +46,21 @@ static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number
|
||||
|
||||
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
int result = FAILURE;
|
||||
|
||||
if (ini_entry->modified) {
|
||||
if (ini_entry->on_modify) {
|
||||
zend_try {
|
||||
/* even if on_modify bails out, we have to continue on with restoring,
|
||||
since there can be allocated variables that would be freed on MM shutdown
|
||||
and would lead to memory corruption later ini entry is modified again */
|
||||
ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC);
|
||||
result = ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC);
|
||||
} zend_end_try();
|
||||
}
|
||||
if (stage == ZEND_INI_STAGE_RUNTIME && result == FAILURE) {
|
||||
/* runtime failure is OK */
|
||||
return 1;
|
||||
}
|
||||
if (ini_entry->value != ini_entry->orig_value) {
|
||||
efree(ini_entry->value);
|
||||
}
|
||||
@@ -310,8 +316,11 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) /*
|
||||
}
|
||||
|
||||
if (EG(modified_ini_directives)) {
|
||||
zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC);
|
||||
zend_hash_del(EG(modified_ini_directives), name, name_length);
|
||||
if (zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC) == 0) {
|
||||
zend_hash_del(EG(modified_ini_directives), name, name_length);
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
|
||||
@@ -2033,7 +2033,9 @@ wrong_label:
|
||||
|
||||
<ST_COMMENT,ST_DOC_COMMENT><<EOF>> {
|
||||
zend_error(E_COMPILE_WARNING,"Unterminated comment starting line %d", CG(comment_start_line));
|
||||
return 0;
|
||||
yyless(yyleng - 1);
|
||||
BEGIN(ST_IN_SCRIPTING);
|
||||
return T_COMMENT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+80
-80
@@ -37,8 +37,8 @@ static zend_encoding* zend_multibyte_detect_utf_encoding(char *script, int scrip
|
||||
/*
|
||||
* encodings
|
||||
*/
|
||||
const char *ucs2_aliases[] = {"ISO-10646-UCS-2", "UCS2" , "UNICODE", NULL};
|
||||
zend_encoding encoding_ucs2 = {
|
||||
static const char *ucs2_aliases[] = {"ISO-10646-UCS-2", "UCS2" , "UNICODE", NULL};
|
||||
static zend_encoding encoding_ucs2 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UCS-2",
|
||||
@@ -46,7 +46,7 @@ zend_encoding encoding_ucs2 = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_ucs2be = {
|
||||
static zend_encoding encoding_ucs2be = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UCS-2BE",
|
||||
@@ -54,7 +54,7 @@ zend_encoding encoding_ucs2be = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_ucs2le = {
|
||||
static zend_encoding encoding_ucs2le = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UCS-2LE",
|
||||
@@ -62,8 +62,8 @@ zend_encoding encoding_ucs2le = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *ucs4_aliases[] = {"ISO-10646-UCS-4", "UCS4", NULL};
|
||||
zend_encoding encoding_ucs4 = {
|
||||
static const char *ucs4_aliases[] = {"ISO-10646-UCS-4", "UCS4", NULL};
|
||||
static zend_encoding encoding_ucs4 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UCS-4",
|
||||
@@ -71,7 +71,7 @@ zend_encoding encoding_ucs4 = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_ucs4be = {
|
||||
static zend_encoding encoding_ucs4be = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UCS-4BE",
|
||||
@@ -79,7 +79,7 @@ zend_encoding encoding_ucs4be = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_ucs4le = {
|
||||
static zend_encoding encoding_ucs4le = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UCS-4LE",
|
||||
@@ -87,8 +87,8 @@ zend_encoding encoding_ucs4le = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *utf32_aliases[] = {"utf32", NULL};
|
||||
zend_encoding encoding_utf32 = {
|
||||
static const char *utf32_aliases[] = {"utf32", NULL};
|
||||
static zend_encoding encoding_utf32 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-32",
|
||||
@@ -96,7 +96,7 @@ zend_encoding encoding_utf32 = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_utf32be = {
|
||||
static zend_encoding encoding_utf32be = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-32BE",
|
||||
@@ -104,7 +104,7 @@ zend_encoding encoding_utf32be = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_utf32le = {
|
||||
static zend_encoding encoding_utf32le = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-32LE",
|
||||
@@ -112,8 +112,8 @@ zend_encoding encoding_utf32le = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *utf16_aliases[] = {"utf16", NULL};
|
||||
zend_encoding encoding_utf16 = {
|
||||
static const char *utf16_aliases[] = {"utf16", NULL};
|
||||
static zend_encoding encoding_utf16 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-16",
|
||||
@@ -121,7 +121,7 @@ zend_encoding encoding_utf16 = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_utf16be = {
|
||||
static zend_encoding encoding_utf16be = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-16BE",
|
||||
@@ -129,7 +129,7 @@ zend_encoding encoding_utf16be = {
|
||||
0
|
||||
};
|
||||
|
||||
zend_encoding encoding_utf16le = {
|
||||
static zend_encoding encoding_utf16le = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-16LE",
|
||||
@@ -137,8 +137,8 @@ zend_encoding encoding_utf16le = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *utf8_aliases[] = {"utf8", NULL};
|
||||
zend_encoding encoding_utf8 = {
|
||||
static const char *utf8_aliases[] = {"utf8", NULL};
|
||||
static zend_encoding encoding_utf8 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UTF-8",
|
||||
@@ -146,8 +146,8 @@ zend_encoding encoding_utf8 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL};
|
||||
zend_encoding encoding_ascii = {
|
||||
static const char *ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL};
|
||||
static zend_encoding encoding_ascii = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ASCII",
|
||||
@@ -155,8 +155,8 @@ zend_encoding encoding_ascii = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *euc_jp_aliases[] = {"EUC", "EUC_JP", "eucJP", "x-euc-jp", NULL};
|
||||
zend_encoding encoding_euc_jp = {
|
||||
static const char *euc_jp_aliases[] = {"EUC", "EUC_JP", "eucJP", "x-euc-jp", NULL};
|
||||
static zend_encoding encoding_euc_jp = {
|
||||
NULL,
|
||||
NULL,
|
||||
"EUC-JP",
|
||||
@@ -164,8 +164,8 @@ zend_encoding encoding_euc_jp = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *sjis_aliases[] = {"x-sjis", "SJIS", "SHIFT-JIS", NULL};
|
||||
zend_encoding encoding_sjis = {
|
||||
static const char *sjis_aliases[] = {"x-sjis", "SJIS", "SHIFT-JIS", NULL};
|
||||
static zend_encoding encoding_sjis = {
|
||||
sjis_input_filter,
|
||||
sjis_output_filter,
|
||||
"Shift_JIS",
|
||||
@@ -173,8 +173,8 @@ zend_encoding encoding_sjis = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *eucjp_win_aliases[] = {"eucJP-open", NULL};
|
||||
zend_encoding encoding_eucjp_win = {
|
||||
static const char *eucjp_win_aliases[] = {"eucJP-open", NULL};
|
||||
static zend_encoding encoding_eucjp_win = {
|
||||
NULL,
|
||||
NULL,
|
||||
"eucJP-win",
|
||||
@@ -182,8 +182,8 @@ zend_encoding encoding_eucjp_win = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *sjis_win_aliases[] = {"SJIS-open", "MS_Kanji", "Windows-31J", "CP932", NULL};
|
||||
zend_encoding encoding_sjis_win = {
|
||||
static const char *sjis_win_aliases[] = {"SJIS-open", "MS_Kanji", "Windows-31J", "CP932", NULL};
|
||||
static zend_encoding encoding_sjis_win = {
|
||||
/* sjis-filters does not care about diffs of Shift_JIS and CP932 */
|
||||
sjis_input_filter,
|
||||
sjis_output_filter,
|
||||
@@ -192,8 +192,8 @@ zend_encoding encoding_sjis_win = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *jis_aliases[] = {"ISO-2022-JP", NULL};
|
||||
zend_encoding encoding_jis = {
|
||||
static const char *jis_aliases[] = {"ISO-2022-JP", NULL};
|
||||
static zend_encoding encoding_jis = {
|
||||
NULL,
|
||||
NULL,
|
||||
"JIS",
|
||||
@@ -201,8 +201,8 @@ zend_encoding encoding_jis = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *euc_cn_aliases[] = {"CN-GB", "EUC_CN", "eucCN", "x-euc-cn", "gb2312", NULL};
|
||||
zend_encoding encoding_euc_cn = {
|
||||
static const char *euc_cn_aliases[] = {"CN-GB", "EUC_CN", "eucCN", "x-euc-cn", "gb2312", NULL};
|
||||
static zend_encoding encoding_euc_cn = {
|
||||
NULL,
|
||||
NULL,
|
||||
"EUC-CN",
|
||||
@@ -210,8 +210,8 @@ zend_encoding encoding_euc_cn = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *cp936_aliases[] = {"CP-936", NULL};
|
||||
zend_encoding encoding_cp936 = {
|
||||
static const char *cp936_aliases[] = {"CP-936", NULL};
|
||||
static zend_encoding encoding_cp936 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"CP936",
|
||||
@@ -219,8 +219,8 @@ zend_encoding encoding_cp936 = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *hz_aliases[] = {"HZ-GB-2312", NULL};
|
||||
zend_encoding encoding_hz = {
|
||||
static const char *hz_aliases[] = {"HZ-GB-2312", NULL};
|
||||
static zend_encoding encoding_hz = {
|
||||
NULL,
|
||||
NULL,
|
||||
"HZ",
|
||||
@@ -228,8 +228,8 @@ zend_encoding encoding_hz = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *euc_tw_aliases[] = {"EUC_TW", "eucTW", "x-euc-tw", NULL};
|
||||
zend_encoding encoding_euc_tw = {
|
||||
static const char *euc_tw_aliases[] = {"EUC_TW", "eucTW", "x-euc-tw", NULL};
|
||||
static zend_encoding encoding_euc_tw = {
|
||||
NULL,
|
||||
NULL,
|
||||
"EUC-TW",
|
||||
@@ -237,8 +237,8 @@ zend_encoding encoding_euc_tw = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *big5_aliases[] = {"BIG5", "CN-BIG5", "BIG-FIVE", "BIGFIVE", "CP950", NULL};
|
||||
zend_encoding encoding_big5 = {
|
||||
static const char *big5_aliases[] = {"BIG5", "CN-BIG5", "BIG-FIVE", "BIGFIVE", "CP950", NULL};
|
||||
static zend_encoding encoding_big5 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"BIG-5",
|
||||
@@ -246,8 +246,8 @@ zend_encoding encoding_big5 = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *euc_kr_aliases[] = {"EUC_KR", "eucKR", "x-euc-kr", NULL};
|
||||
zend_encoding encoding_euc_kr = {
|
||||
static const char *euc_kr_aliases[] = {"EUC_KR", "eucKR", "x-euc-kr", NULL};
|
||||
static zend_encoding encoding_euc_kr = {
|
||||
NULL,
|
||||
NULL,
|
||||
"EUC-KR",
|
||||
@@ -255,8 +255,8 @@ zend_encoding encoding_euc_kr = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *uhc_aliases[] = {"CP949", NULL};
|
||||
zend_encoding encoding_uhc = {
|
||||
static const char *uhc_aliases[] = {"CP949", NULL};
|
||||
static zend_encoding encoding_uhc = {
|
||||
NULL,
|
||||
NULL,
|
||||
"UHC",
|
||||
@@ -264,7 +264,7 @@ zend_encoding encoding_uhc = {
|
||||
1
|
||||
};
|
||||
|
||||
zend_encoding encoding_2022kr = {
|
||||
static zend_encoding encoding_2022kr = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-2022-KR",
|
||||
@@ -272,8 +272,8 @@ zend_encoding encoding_2022kr = {
|
||||
0
|
||||
};
|
||||
|
||||
const char *cp1252_aliases[] = {"cp1252", NULL};
|
||||
zend_encoding encoding_cp1252 = {
|
||||
static const char *cp1252_aliases[] = {"cp1252", NULL};
|
||||
static zend_encoding encoding_cp1252 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"Windows-1252",
|
||||
@@ -281,8 +281,8 @@ zend_encoding encoding_cp1252 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_1_aliases[] = {"ISO_8859-1", "latin1", NULL};
|
||||
zend_encoding encoding_8859_1 = {
|
||||
static const char *iso_8859_1_aliases[] = {"ISO_8859-1", "latin1", NULL};
|
||||
static zend_encoding encoding_8859_1 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-1",
|
||||
@@ -290,8 +290,8 @@ zend_encoding encoding_8859_1 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_2_aliases[] = {"ISO_8859-2", "latin2", NULL};
|
||||
zend_encoding encoding_8859_2 = {
|
||||
static const char *iso_8859_2_aliases[] = {"ISO_8859-2", "latin2", NULL};
|
||||
static zend_encoding encoding_8859_2 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-2",
|
||||
@@ -299,8 +299,8 @@ zend_encoding encoding_8859_2 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_3_aliases[] = {"ISO_8859-3", "latin3", NULL};
|
||||
zend_encoding encoding_8859_3 = {
|
||||
static const char *iso_8859_3_aliases[] = {"ISO_8859-3", "latin3", NULL};
|
||||
static zend_encoding encoding_8859_3 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-3",
|
||||
@@ -308,8 +308,8 @@ zend_encoding encoding_8859_3 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_4_aliases[] = {"ISO_8859-4", "latin4", NULL};
|
||||
zend_encoding encoding_8859_4 = {
|
||||
static const char *iso_8859_4_aliases[] = {"ISO_8859-4", "latin4", NULL};
|
||||
static zend_encoding encoding_8859_4 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-4",
|
||||
@@ -317,8 +317,8 @@ zend_encoding encoding_8859_4 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_5_aliases[] = {"ISO_8859-5", "cyrillic", NULL};
|
||||
zend_encoding encoding_8859_5 = {
|
||||
static const char *iso_8859_5_aliases[] = {"ISO_8859-5", "cyrillic", NULL};
|
||||
static zend_encoding encoding_8859_5 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-5",
|
||||
@@ -326,8 +326,8 @@ zend_encoding encoding_8859_5 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_6_aliases[] = {"ISO_8859-6", "arabic", NULL};
|
||||
zend_encoding encoding_8859_6 = {
|
||||
static const char *iso_8859_6_aliases[] = {"ISO_8859-6", "arabic", NULL};
|
||||
static zend_encoding encoding_8859_6 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-6",
|
||||
@@ -335,8 +335,8 @@ zend_encoding encoding_8859_6 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_7_aliases[] = {"ISO_8859-7", "greek", NULL};
|
||||
zend_encoding encoding_8859_7 = {
|
||||
static const char *iso_8859_7_aliases[] = {"ISO_8859-7", "greek", NULL};
|
||||
static zend_encoding encoding_8859_7 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-7",
|
||||
@@ -344,8 +344,8 @@ zend_encoding encoding_8859_7 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_8_aliases[] = {"ISO_8859-8", "hebrew", NULL};
|
||||
zend_encoding encoding_8859_8 = {
|
||||
static const char *iso_8859_8_aliases[] = {"ISO_8859-8", "hebrew", NULL};
|
||||
static zend_encoding encoding_8859_8 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-8",
|
||||
@@ -353,8 +353,8 @@ zend_encoding encoding_8859_8 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_9_aliases[] = {"ISO_8859-9", "latin5", NULL};
|
||||
zend_encoding encoding_8859_9 = {
|
||||
static const char *iso_8859_9_aliases[] = {"ISO_8859-9", "latin5", NULL};
|
||||
static zend_encoding encoding_8859_9 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-9",
|
||||
@@ -362,8 +362,8 @@ zend_encoding encoding_8859_9 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_10_aliases[] = {"ISO_8859-10", "latin6", NULL};
|
||||
zend_encoding encoding_8859_10 = {
|
||||
static const char *iso_8859_10_aliases[] = {"ISO_8859-10", "latin6", NULL};
|
||||
static zend_encoding encoding_8859_10 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-10",
|
||||
@@ -371,8 +371,8 @@ zend_encoding encoding_8859_10 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_13_aliases[] = {"ISO_8859-13", NULL};
|
||||
zend_encoding encoding_8859_13 = {
|
||||
static const char *iso_8859_13_aliases[] = {"ISO_8859-13", NULL};
|
||||
static zend_encoding encoding_8859_13 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-13",
|
||||
@@ -380,8 +380,8 @@ zend_encoding encoding_8859_13 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_14_aliases[] = {"ISO_8859-14", "latin8", NULL};
|
||||
zend_encoding encoding_8859_14 = {
|
||||
static const char *iso_8859_14_aliases[] = {"ISO_8859-14", "latin8", NULL};
|
||||
static zend_encoding encoding_8859_14 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-14",
|
||||
@@ -389,8 +389,8 @@ zend_encoding encoding_8859_14 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *iso_8859_15_aliases[] = {"ISO_8859-15", NULL};
|
||||
zend_encoding encoding_8859_15 = {
|
||||
static const char *iso_8859_15_aliases[] = {"ISO_8859-15", NULL};
|
||||
static zend_encoding encoding_8859_15 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"ISO-8859-15",
|
||||
@@ -398,8 +398,8 @@ zend_encoding encoding_8859_15 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL};
|
||||
zend_encoding encoding_cp1251 = {
|
||||
static const char *cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL};
|
||||
static zend_encoding encoding_cp1251 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"Windows-1251",
|
||||
@@ -407,8 +407,8 @@ zend_encoding encoding_cp1251 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *cp866_aliases[] = {"CP866", "CP-866", "IBM-866", NULL};
|
||||
zend_encoding encoding_cp866 = {
|
||||
static const char *cp866_aliases[] = {"CP866", "CP-866", "IBM-866", NULL};
|
||||
static zend_encoding encoding_cp866 = {
|
||||
NULL,
|
||||
NULL,
|
||||
"CP866",
|
||||
@@ -416,8 +416,8 @@ zend_encoding encoding_cp866 = {
|
||||
1
|
||||
};
|
||||
|
||||
const char *koi8r_aliases[] = {"KOI8-R", "KOI8R", NULL};
|
||||
zend_encoding encoding_koi8r = {
|
||||
static const char *koi8r_aliases[] = {"KOI8-R", "KOI8R", NULL};
|
||||
static zend_encoding encoding_koi8r = {
|
||||
NULL,
|
||||
NULL,
|
||||
"KOI8-R",
|
||||
@@ -425,7 +425,7 @@ zend_encoding encoding_koi8r = {
|
||||
1
|
||||
};
|
||||
|
||||
zend_encoding *zend_encoding_table[] = {
|
||||
static zend_encoding *zend_encoding_table[] = {
|
||||
&encoding_ucs4,
|
||||
&encoding_ucs4be,
|
||||
&encoding_ucs4le,
|
||||
|
||||
+18
-24
@@ -564,8 +564,8 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC
|
||||
zend_guard *guard;
|
||||
|
||||
if (!zobj->ce->__get ||
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) != SUCCESS ||
|
||||
guard->in_get) {
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) != SUCCESS ||
|
||||
(property_info && guard->in_get)) {
|
||||
/* we don't have access controls - will just add it */
|
||||
new_zval = &EG(uninitialized_zval);
|
||||
|
||||
@@ -762,15 +762,15 @@ static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc
|
||||
}
|
||||
|
||||
|
||||
static inline union _zend_function *zend_get_user_call_function(zend_object *zobj, char *method_name, int method_len) /* {{{ */
|
||||
static inline union _zend_function *zend_get_user_call_function(zend_class_entry *ce, const char *method_name, int method_len) /* {{{ */
|
||||
{
|
||||
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
|
||||
call_user_call->type = ZEND_INTERNAL_FUNCTION;
|
||||
call_user_call->module = zobj->ce->module;
|
||||
call_user_call->module = ce->module;
|
||||
call_user_call->handler = zend_std_call_user_call;
|
||||
call_user_call->arg_info = NULL;
|
||||
call_user_call->num_args = 0;
|
||||
call_user_call->scope = zobj->ce;
|
||||
call_user_call->scope = ce;
|
||||
call_user_call->fn_flags = 0;
|
||||
call_user_call->function_name = estrndup(method_name, method_len);
|
||||
call_user_call->pass_rest_by_reference = 0;
|
||||
@@ -796,7 +796,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
|
||||
if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&fbc) == FAILURE) {
|
||||
free_alloca_with_limit(lc_method_name, use_heap);
|
||||
if (zobj->ce->__call) {
|
||||
return zend_get_user_call_function(zobj, method_name, method_len);
|
||||
return zend_get_user_call_function(zobj->ce, method_name, method_len);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -814,7 +814,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
|
||||
fbc = updated_fbc;
|
||||
} else {
|
||||
if (zobj->ce->__call) {
|
||||
fbc = zend_get_user_call_function(zobj, method_name, method_len);
|
||||
fbc = zend_get_user_call_function(zobj->ce, method_name, method_len);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
@@ -840,7 +840,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
|
||||
*/
|
||||
if (!zend_check_protected(zend_get_function_root_class(fbc), EG(scope))) {
|
||||
if (zobj->ce->__call) {
|
||||
fbc = zend_get_user_call_function(zobj, method_name, method_len);
|
||||
fbc = zend_get_user_call_function(zobj->ce, method_name, method_len);
|
||||
} else {
|
||||
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
|
||||
}
|
||||
@@ -856,27 +856,19 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
|
||||
/* This is not (yet?) in the API, but it belongs in the built-in objects callbacks */
|
||||
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC)
|
||||
{
|
||||
zend_function *fbc;
|
||||
char *lc_function_name;
|
||||
zend_function *fbc;
|
||||
|
||||
lc_function_name = zend_str_tolower_dup(function_name_strval, function_name_strlen);
|
||||
|
||||
if (zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)==FAILURE) {
|
||||
efree(lc_function_name);
|
||||
|
||||
if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &fbc)==FAILURE) {
|
||||
if (ce->__call &&
|
||||
EG(This) &&
|
||||
Z_OBJ_HT_P(EG(This))->get_class_entry &&
|
||||
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
|
||||
|
||||
call_user_call->type = ZEND_INTERNAL_FUNCTION;
|
||||
call_user_call->module = ce->module;
|
||||
call_user_call->handler = zend_std_call_user_call;
|
||||
call_user_call->arg_info = NULL;
|
||||
call_user_call->num_args = 0;
|
||||
call_user_call->scope = ce;
|
||||
call_user_call->fn_flags = 0;
|
||||
call_user_call->function_name = estrndup(function_name_strval, function_name_strlen);
|
||||
call_user_call->pass_rest_by_reference = 0;
|
||||
call_user_call->return_reference = ZEND_RETURN_VALUE;
|
||||
|
||||
return (union _zend_function *)call_user_call;
|
||||
return zend_get_user_call_function(ce, function_name_strval, function_name_strlen);
|
||||
} else {
|
||||
char *class_name = ce->name;
|
||||
|
||||
@@ -886,6 +878,8 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
|
||||
zend_error(E_ERROR, "Call to undefined method %s::%s()", class_name, function_name_strval);
|
||||
}
|
||||
}
|
||||
efree(lc_function_name);
|
||||
|
||||
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
|
||||
/* No further checks necessary, most common case */
|
||||
} else if (fbc->op_array.fn_flags & ZEND_ACC_PRIVATE) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
|
||||
|
||||
ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC)
|
||||
{
|
||||
zend_function *destructor = object->ce->destructor;
|
||||
zend_function *destructor = object ? object->ce->destructor : NULL;
|
||||
|
||||
if (destructor) {
|
||||
zval *obj;
|
||||
|
||||
@@ -1202,6 +1202,12 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
|
||||
}
|
||||
if (result==op1) { /* special case, perform operations on result */
|
||||
uint res_len = op1->value.str.len + op2->value.str.len;
|
||||
|
||||
if (Z_STRLEN_P(result) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) {
|
||||
efree(Z_STRVAL_P(result));
|
||||
ZVAL_EMPTY_STRING(result);
|
||||
zend_error(E_ERROR, "String size overflow");
|
||||
}
|
||||
|
||||
result->value.str.val = erealloc(result->value.str.val, res_len+1);
|
||||
|
||||
|
||||
@@ -36,18 +36,6 @@
|
||||
#include "ext/bcmath/libbcmath/src/bcmath.h"
|
||||
#endif
|
||||
|
||||
#if SIZEOF_LONG == 4
|
||||
#define MAX_LENGTH_OF_LONG 11
|
||||
static const char long_min_digits[] = "2147483648";
|
||||
#elif SIZEOF_LONG == 8
|
||||
#define MAX_LENGTH_OF_LONG 20
|
||||
static const char long_min_digits[] = "9223372036854775808";
|
||||
#else
|
||||
#error "Unknown SIZEOF_LONG"
|
||||
#endif
|
||||
|
||||
#define MAX_LENGTH_OF_DOUBLE 32
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
|
||||
+20
-20
@@ -26,8 +26,7 @@
|
||||
#include "zend_constants.h"
|
||||
#include "zend_list.h"
|
||||
|
||||
|
||||
ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
|
||||
{
|
||||
switch (zvalue->type & ~IS_CONSTANT_INDEX) {
|
||||
case IS_STRING:
|
||||
@@ -69,9 +68,9 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
|
||||
{
|
||||
switch (zvalue->type & ~IS_CONSTANT_INDEX) {
|
||||
case IS_STRING:
|
||||
@@ -93,15 +92,15 @@ ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void zval_add_ref(zval **p)
|
||||
ZEND_API void zval_add_ref(zval **p) /* {{{ */
|
||||
{
|
||||
(*p)->refcount++;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
|
||||
{
|
||||
switch (zvalue->type) {
|
||||
case IS_RESOURCE: {
|
||||
@@ -143,43 +142,44 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API int zend_print_variable(zval *var)
|
||||
ZEND_API int zend_print_variable(zval *var) /* {{{ */
|
||||
{
|
||||
return zend_print_zval(var, 0);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)
|
||||
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue) /* {{{ */
|
||||
{
|
||||
zval_copy_ctor(zvalue);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void _zval_dtor_wrapper(zval *zvalue)
|
||||
ZEND_API void _zval_dtor_wrapper(zval *zvalue) /* {{{ */
|
||||
{
|
||||
zval_dtor(zvalue);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue)
|
||||
ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue) /* {{{ */
|
||||
{
|
||||
zval_internal_dtor(zvalue);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr)
|
||||
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr) /* {{{ */
|
||||
{
|
||||
zval_ptr_dtor(zval_ptr);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr)
|
||||
ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr) /* {{{ */
|
||||
{
|
||||
zval_internal_ptr_dtor(zval_ptr);
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,20 +29,20 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC);
|
||||
|
||||
static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
{
|
||||
if (zvalue->type <= IS_BOOL) {
|
||||
return;
|
||||
}
|
||||
_zval_dtor_func(zvalue ZEND_FILE_LINE_CC);
|
||||
if (zvalue->type <= IS_BOOL) {
|
||||
return;
|
||||
}
|
||||
_zval_dtor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
|
||||
}
|
||||
|
||||
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
|
||||
|
||||
static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
{
|
||||
if (zvalue->type <= IS_BOOL) {
|
||||
return;
|
||||
}
|
||||
_zval_copy_ctor_func(zvalue ZEND_FILE_LINE_CC);
|
||||
if (zvalue->type <= IS_BOOL) {
|
||||
return;
|
||||
}
|
||||
_zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+37
-11
@@ -294,6 +294,10 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (OP1_TYPE == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -545,6 +549,10 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (OP1_TYPE == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -637,6 +645,10 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (OP1_TYPE == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -927,6 +939,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
FREE_OP1();
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -1783,7 +1796,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, ANY, CONST|TMP|VAR|UNUSED|CV)
|
||||
|
||||
ce = EX_T(opline->op1.u.var).class_entry;
|
||||
if(OP2_TYPE != IS_UNUSED) {
|
||||
char *function_name_strval;
|
||||
char *function_name_strval = NULL;
|
||||
int function_name_strlen;
|
||||
zend_bool is_const = (OP2_TYPE == IS_CONST);
|
||||
zend_free_op free_op2;
|
||||
@@ -1796,15 +1809,17 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, ANY, CONST|TMP|VAR|UNUSED|CV)
|
||||
|
||||
if (Z_TYPE_P(function_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_ERROR, "Function name must be a string");
|
||||
} else {
|
||||
function_name_strval = Z_STRVAL_P(function_name);
|
||||
function_name_strlen = Z_STRLEN_P(function_name);
|
||||
}
|
||||
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
|
||||
function_name_strlen = function_name->value.str.len;
|
||||
}
|
||||
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
if (function_name_strval) {
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!is_const) {
|
||||
efree(function_name_strval);
|
||||
FREE_OP2();
|
||||
}
|
||||
} else {
|
||||
@@ -2070,7 +2085,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
|
||||
EG(This) = current_this;
|
||||
EG(scope) = current_scope;
|
||||
}
|
||||
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
|
||||
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
|
||||
|
||||
zend_ptr_stack_clear_multiple(TSRMLS_C);
|
||||
|
||||
@@ -2357,6 +2372,10 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
|
||||
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
varptr->refcount++;
|
||||
@@ -3182,15 +3201,22 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
|
||||
ALLOC_ZVAL(tmp);
|
||||
INIT_PZVAL_COPY(tmp, array_ptr);
|
||||
array_ptr = tmp;
|
||||
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (ce && ce->get_iterator) {
|
||||
array_ptr->refcount--;
|
||||
}
|
||||
}
|
||||
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (!ce || !ce->get_iterator) {
|
||||
array_ptr->refcount++;
|
||||
}
|
||||
} else {
|
||||
if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
|
||||
if (OP1_TYPE == IS_CONST ||
|
||||
((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
|
||||
!array_ptr->is_ref &&
|
||||
array_ptr->refcount > 1) {
|
||||
array_ptr->refcount > 1)) {
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
@@ -3203,7 +3229,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
|
||||
}
|
||||
}
|
||||
|
||||
if (OP1_TYPE != IS_TMP_VAR && ce && ce->get_iterator) {
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
|
||||
|
||||
if (iter && !EG(exception)) {
|
||||
@@ -3506,7 +3532,7 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST|
|
||||
zend_free_op free_op2;
|
||||
zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -3842,7 +3868,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
|
||||
}
|
||||
zval_ptr_dtor(&EX(object));
|
||||
}
|
||||
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
|
||||
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
|
||||
}
|
||||
|
||||
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
|
||||
|
||||
+257
-51
@@ -302,7 +302,7 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
|
||||
EG(This) = current_this;
|
||||
EG(scope) = current_scope;
|
||||
}
|
||||
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
|
||||
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
|
||||
|
||||
zend_ptr_stack_clear_multiple(TSRMLS_C);
|
||||
|
||||
@@ -562,7 +562,7 @@ static int ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
zval_ptr_dtor(&EX(object));
|
||||
}
|
||||
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
|
||||
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
|
||||
}
|
||||
|
||||
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
|
||||
@@ -667,7 +667,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
|
||||
|
||||
ce = EX_T(opline->op1.u.var).class_entry;
|
||||
if(IS_CONST != IS_UNUSED) {
|
||||
char *function_name_strval;
|
||||
char *function_name_strval = NULL;
|
||||
int function_name_strlen;
|
||||
zend_bool is_const = (IS_CONST == IS_CONST);
|
||||
|
||||
@@ -680,15 +680,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
|
||||
|
||||
if (Z_TYPE_P(function_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_ERROR, "Function name must be a string");
|
||||
} else {
|
||||
function_name_strval = Z_STRVAL_P(function_name);
|
||||
function_name_strlen = Z_STRLEN_P(function_name);
|
||||
}
|
||||
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
|
||||
function_name_strlen = function_name->value.str.len;
|
||||
}
|
||||
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
if (function_name_strval) {
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!is_const) {
|
||||
efree(function_name_strval);
|
||||
|
||||
}
|
||||
} else {
|
||||
@@ -878,7 +880,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
|
||||
ce = EX_T(opline->op1.u.var).class_entry;
|
||||
if(IS_TMP_VAR != IS_UNUSED) {
|
||||
char *function_name_strval;
|
||||
char *function_name_strval = NULL;
|
||||
int function_name_strlen;
|
||||
zend_bool is_const = (IS_TMP_VAR == IS_CONST);
|
||||
zend_free_op free_op2;
|
||||
@@ -891,15 +893,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
|
||||
if (Z_TYPE_P(function_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_ERROR, "Function name must be a string");
|
||||
} else {
|
||||
function_name_strval = Z_STRVAL_P(function_name);
|
||||
function_name_strlen = Z_STRLEN_P(function_name);
|
||||
}
|
||||
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
|
||||
function_name_strlen = function_name->value.str.len;
|
||||
}
|
||||
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
if (function_name_strval) {
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!is_const) {
|
||||
efree(function_name_strval);
|
||||
zval_dtor(free_op2.var);
|
||||
}
|
||||
} else {
|
||||
@@ -1049,7 +1053,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
|
||||
ce = EX_T(opline->op1.u.var).class_entry;
|
||||
if(IS_VAR != IS_UNUSED) {
|
||||
char *function_name_strval;
|
||||
char *function_name_strval = NULL;
|
||||
int function_name_strlen;
|
||||
zend_bool is_const = (IS_VAR == IS_CONST);
|
||||
zend_free_op free_op2;
|
||||
@@ -1062,15 +1066,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
|
||||
if (Z_TYPE_P(function_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_ERROR, "Function name must be a string");
|
||||
} else {
|
||||
function_name_strval = Z_STRVAL_P(function_name);
|
||||
function_name_strlen = Z_STRLEN_P(function_name);
|
||||
}
|
||||
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
|
||||
function_name_strlen = function_name->value.str.len;
|
||||
}
|
||||
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
if (function_name_strval) {
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!is_const) {
|
||||
efree(function_name_strval);
|
||||
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
|
||||
}
|
||||
} else {
|
||||
@@ -1219,7 +1225,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_
|
||||
|
||||
ce = EX_T(opline->op1.u.var).class_entry;
|
||||
if(IS_UNUSED != IS_UNUSED) {
|
||||
char *function_name_strval;
|
||||
char *function_name_strval = NULL;
|
||||
int function_name_strlen;
|
||||
zend_bool is_const = (IS_UNUSED == IS_CONST);
|
||||
|
||||
@@ -1232,15 +1238,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_
|
||||
|
||||
if (Z_TYPE_P(function_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_ERROR, "Function name must be a string");
|
||||
} else {
|
||||
function_name_strval = Z_STRVAL_P(function_name);
|
||||
function_name_strlen = Z_STRLEN_P(function_name);
|
||||
}
|
||||
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
|
||||
function_name_strlen = function_name->value.str.len;
|
||||
}
|
||||
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
if (function_name_strval) {
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!is_const) {
|
||||
efree(function_name_strval);
|
||||
|
||||
}
|
||||
} else {
|
||||
@@ -1322,7 +1330,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
|
||||
|
||||
ce = EX_T(opline->op1.u.var).class_entry;
|
||||
if(IS_CV != IS_UNUSED) {
|
||||
char *function_name_strval;
|
||||
char *function_name_strval = NULL;
|
||||
int function_name_strlen;
|
||||
zend_bool is_const = (IS_CV == IS_CONST);
|
||||
|
||||
@@ -1335,15 +1343,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
|
||||
|
||||
if (Z_TYPE_P(function_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_ERROR, "Function name must be a string");
|
||||
} else {
|
||||
function_name_strval = Z_STRVAL_P(function_name);
|
||||
function_name_strlen = Z_STRLEN_P(function_name);
|
||||
}
|
||||
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
|
||||
function_name_strlen = function_name->value.str.len;
|
||||
}
|
||||
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
if (function_name_strval) {
|
||||
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!is_const) {
|
||||
efree(function_name_strval);
|
||||
|
||||
}
|
||||
} else {
|
||||
@@ -1521,6 +1531,7 @@ static int zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLE
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -2220,15 +2231,22 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
ALLOC_ZVAL(tmp);
|
||||
INIT_PZVAL_COPY(tmp, array_ptr);
|
||||
array_ptr = tmp;
|
||||
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (ce && ce->get_iterator) {
|
||||
array_ptr->refcount--;
|
||||
}
|
||||
}
|
||||
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (!ce || !ce->get_iterator) {
|
||||
array_ptr->refcount++;
|
||||
}
|
||||
} else {
|
||||
if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
|
||||
if (IS_CONST == IS_CONST ||
|
||||
((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
|
||||
!array_ptr->is_ref &&
|
||||
array_ptr->refcount > 1) {
|
||||
array_ptr->refcount > 1)) {
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
@@ -2241,7 +2259,7 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_CONST != IS_TMP_VAR && ce && ce->get_iterator) {
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
|
||||
|
||||
if (iter && !EG(exception)) {
|
||||
@@ -4094,6 +4112,7 @@ static int zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_OPCODE_HANDLER_
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
zval_dtor(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -4795,15 +4814,22 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
ALLOC_ZVAL(tmp);
|
||||
INIT_PZVAL_COPY(tmp, array_ptr);
|
||||
array_ptr = tmp;
|
||||
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (ce && ce->get_iterator) {
|
||||
array_ptr->refcount--;
|
||||
}
|
||||
}
|
||||
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (!ce || !ce->get_iterator) {
|
||||
array_ptr->refcount++;
|
||||
}
|
||||
} else {
|
||||
if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
|
||||
if (IS_TMP_VAR == IS_CONST ||
|
||||
((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
|
||||
!array_ptr->is_ref &&
|
||||
array_ptr->refcount > 1) {
|
||||
array_ptr->refcount > 1)) {
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
@@ -4816,7 +4842,7 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_TMP_VAR != IS_TMP_VAR && ce && ce->get_iterator) {
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
|
||||
|
||||
if (iter && !EG(exception)) {
|
||||
@@ -7142,6 +7168,7 @@ static int zend_fetch_var_address_helper_SPEC_VAR(int type, ZEND_OPCODE_HANDLER_
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -7560,6 +7587,10 @@ static int ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
varptr->refcount++;
|
||||
@@ -7944,15 +7975,22 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
ALLOC_ZVAL(tmp);
|
||||
INIT_PZVAL_COPY(tmp, array_ptr);
|
||||
array_ptr = tmp;
|
||||
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (ce && ce->get_iterator) {
|
||||
array_ptr->refcount--;
|
||||
}
|
||||
}
|
||||
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (!ce || !ce->get_iterator) {
|
||||
array_ptr->refcount++;
|
||||
}
|
||||
} else {
|
||||
if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
|
||||
if (IS_VAR == IS_CONST ||
|
||||
((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
|
||||
!array_ptr->is_ref &&
|
||||
array_ptr->refcount > 1) {
|
||||
array_ptr->refcount > 1)) {
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
@@ -7965,7 +8003,7 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_VAR != IS_TMP_VAR && ce && ce->get_iterator) {
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
|
||||
|
||||
if (iter && !EG(exception)) {
|
||||
@@ -8553,6 +8591,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*binary_op)(zval
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -8803,6 +8845,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZE
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -8895,6 +8941,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, Z
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -9700,7 +9750,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(int prop_dim,
|
||||
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -10070,6 +10120,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*binary_op)(zval *
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -10321,6 +10375,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t incdec_op, ZEND
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -10413,6 +10471,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t incdec_op, ZEN
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -11221,7 +11283,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(int prop_dim, ZE
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -11591,6 +11653,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*binary_op)(zval *
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -11842,6 +11908,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t incdec_op, ZEND
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -11934,6 +12004,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t incdec_op, ZEN
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -12790,7 +12864,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(int prop_dim, ZE
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -12926,6 +13000,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*binary_op)(zva
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -13607,6 +13685,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*binary_op)(zval *r
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -13857,6 +13939,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t incdec_op, ZEND_
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -13949,6 +14035,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t incdec_op, ZEND
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_VAR == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -14800,7 +14890,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int prop_dim, ZEN
|
||||
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -15017,6 +15107,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int (*binary_op)(z
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -15266,6 +15360,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op,
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -15358,6 +15456,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -15907,7 +16009,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CONST(int prop_di
|
||||
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -16041,6 +16143,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*binary_op)(zva
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -16291,6 +16397,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op, Z
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -16383,6 +16493,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op,
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -16888,7 +17002,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP(int prop_dim,
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -17022,6 +17136,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*binary_op)(zva
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -17272,6 +17390,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_t incdec_op, Z
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -17364,6 +17486,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec_t incdec_op,
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -17869,7 +17995,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR(int prop_dim,
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -18003,6 +18129,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int (*binary_op)(
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -18269,6 +18399,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*binary_op)(zval
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -18518,6 +18652,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, ZE
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -18610,6 +18748,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, Z
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_UNUSED == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -19114,7 +19256,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV(int prop_dim,
|
||||
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -19461,6 +19603,7 @@ static int zend_fetch_var_address_helper_SPEC_CV(int type, ZEND_OPCODE_HANDLER_A
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -19874,6 +20017,10 @@ static int ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
varptr->refcount++;
|
||||
@@ -20250,15 +20397,22 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
ALLOC_ZVAL(tmp);
|
||||
INIT_PZVAL_COPY(tmp, array_ptr);
|
||||
array_ptr = tmp;
|
||||
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (ce && ce->get_iterator) {
|
||||
array_ptr->refcount--;
|
||||
}
|
||||
}
|
||||
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
|
||||
ce = Z_OBJCE_P(array_ptr);
|
||||
if (!ce || !ce->get_iterator) {
|
||||
array_ptr->refcount++;
|
||||
}
|
||||
} else {
|
||||
if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
|
||||
if (IS_CV == IS_CONST ||
|
||||
((IS_CV == IS_CV || IS_CV == IS_VAR) &&
|
||||
!array_ptr->is_ref &&
|
||||
array_ptr->refcount > 1) {
|
||||
array_ptr->refcount > 1)) {
|
||||
zval *tmp;
|
||||
|
||||
ALLOC_ZVAL(tmp);
|
||||
@@ -20271,7 +20425,7 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_CV != IS_TMP_VAR && ce && ce->get_iterator) {
|
||||
if (ce && ce->get_iterator) {
|
||||
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
|
||||
|
||||
if (iter && !EG(exception)) {
|
||||
@@ -20711,6 +20865,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*binary_op)(zval
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -20960,6 +21118,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEN
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -21052,6 +21214,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZE
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -21852,7 +22018,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(int prop_dim, Z
|
||||
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -22220,6 +22386,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*binary_op)(zval *r
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -22470,6 +22640,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t incdec_op, ZEND_
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -22562,6 +22736,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t incdec_op, ZEND
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -23365,7 +23543,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int prop_dim, ZEN
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -23733,6 +23911,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*binary_op)(zval *r
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -23983,6 +24165,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t incdec_op, ZEND_
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -24075,6 +24261,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t incdec_op, ZEND
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -24925,7 +25115,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int prop_dim, ZEN
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -25059,6 +25249,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*binary_op)(zval
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -25739,6 +25933,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binary_op)(zval *re
|
||||
zval **retval = &EX_T(result->u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
EX_T(result->u.var).var.ptr_ptr = NULL;
|
||||
make_real_object(object_ptr TSRMLS_CC);
|
||||
object = *object_ptr;
|
||||
@@ -25988,6 +26186,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_O
|
||||
zval **retval = &EX_T(opline->result.u.var).var.ptr;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -26080,6 +26282,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_
|
||||
zval *retval = &EX_T(opline->result.u.var).tmp_var;
|
||||
int have_get_ptr = 0;
|
||||
|
||||
if (IS_CV == IS_VAR && !object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
|
||||
}
|
||||
|
||||
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
|
||||
object = *object_ptr;
|
||||
|
||||
@@ -26925,7 +27131,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int prop_dim, ZEND
|
||||
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
|
||||
+33
-13
@@ -920,7 +920,7 @@ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx[, zend_ext]]]]])
|
||||
dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
|
||||
dnl
|
||||
dnl Includes an extension in the build.
|
||||
dnl
|
||||
@@ -968,12 +968,15 @@ dnl ---------------------------------------------- Shared module
|
||||
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
|
||||
dnl ---------------------------------------------- CLI static module
|
||||
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
|
||||
if test "$PHP_SAPI" = "cgi"; then
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
|
||||
EXT_STATIC="$EXT_STATIC $1"
|
||||
else
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
|
||||
fi
|
||||
case "$PHP_SAPI" in
|
||||
cgi|embed[)]
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
|
||||
EXT_STATIC="$EXT_STATIC $1"
|
||||
;;
|
||||
*[)]
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
|
||||
;;
|
||||
esac
|
||||
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
|
||||
fi
|
||||
PHP_ADD_BUILD_DIR($ext_builddir)
|
||||
@@ -1685,7 +1688,7 @@ dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
|
||||
dnl
|
||||
AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
|
||||
AC_MSG_CHECKING([for broken libc stdio])
|
||||
AC_CACHE_VAL(have_broken_glibc_fopen_append,[
|
||||
AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
int main(int argc, char *argv[])
|
||||
@@ -1711,8 +1714,8 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
],
|
||||
[have_broken_glibc_fopen_append=no],
|
||||
[have_broken_glibc_fopen_append=yes ],
|
||||
[_cv_have_broken_glibc_fopen_append=no],
|
||||
[_cv_have_broken_glibc_fopen_append=yes ],
|
||||
AC_TRY_COMPILE([
|
||||
#include <features.h>
|
||||
],[
|
||||
@@ -1720,11 +1723,11 @@ AC_TRY_COMPILE([
|
||||
choke me
|
||||
#endif
|
||||
],
|
||||
[have_broken_glibc_fopen_append=yes],
|
||||
[have_broken_glibc_fopen_append=no ])
|
||||
[_cv_have_broken_glibc_fopen_append=yes],
|
||||
[_cv_have_broken_glibc_fopen_append=no ])
|
||||
)])
|
||||
|
||||
if test "$have_broken_glibc_fopen_append" = "yes"; then
|
||||
if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
|
||||
else
|
||||
@@ -2766,6 +2769,23 @@ AC_DEFUN([PHP_DETECT_ICC],
|
||||
)
|
||||
])
|
||||
|
||||
dnl PHP_DETECT_SUNCC
|
||||
dnl Detect if the systems default compiler is suncc.
|
||||
dnl We also set some usefull CFLAGS if the user didn't set any
|
||||
AC_DEFUN([PHP_DETECT_SUNCC],[
|
||||
SUNCC="no"
|
||||
AC_MSG_CHECKING([for suncc])
|
||||
AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
|
||||
SUNCC="no"
|
||||
AC_MSG_RESULT([no]),
|
||||
SUNCC="yes"
|
||||
GCC="no"
|
||||
test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
|
||||
GCC=""
|
||||
AC_MSG_RESULT([yes])
|
||||
)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_CRYPT_R_STYLE
|
||||
dnl detect the style of crypt_r() is any is available
|
||||
|
||||
+18
-10
@@ -1,7 +1,7 @@
|
||||
# +----------------------------------------------------------------------+
|
||||
# | PHP Version 5 |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | Copyright (c) 1997-2007 The PHP Group |
|
||||
# | Copyright (c) 1997-2006 The PHP Group |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | This source file is subject to version 3.01 of the PHP license, |
|
||||
# | that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -20,9 +20,7 @@
|
||||
# Makefile to generate build tools
|
||||
#
|
||||
|
||||
ZENDDIR = Zend
|
||||
|
||||
SUBDIRS = $(ZENDDIR) TSRM
|
||||
SUBDIRS = Zend TSRM
|
||||
|
||||
STAMP = buildmk.stamp
|
||||
|
||||
@@ -33,11 +31,10 @@ all: $(STAMP) $(ALWAYS)
|
||||
@$(MAKE) -s -f build/build2.mk
|
||||
|
||||
generated_lists:
|
||||
@echo makefile_am_files = $(ZENDDIR)/Makefile.am \
|
||||
TSRM/Makefile.am > $@
|
||||
@echo config_h_files = $(ZENDDIR)/acconfig.h TSRM/acconfig.h >> $@
|
||||
@echo config_m4_files = $(ZENDDIR)/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \
|
||||
$(ZENDDIR)/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@
|
||||
@echo makefile_am_files = Zend/Makefile.am TSRM/Makefile.am > $@
|
||||
@echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
|
||||
@echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \
|
||||
Zend/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@
|
||||
|
||||
$(STAMP): build/buildcheck.sh
|
||||
@build/buildcheck.sh $(STAMP)
|
||||
@@ -67,7 +64,18 @@ snapshot:
|
||||
|
||||
cvsclean-work:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[\r\n]/ /g'` *.o *.a .libs || true); \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[[:space:]]/ /g'` *.o *.a *.lo *.la *.gcno *.gcda .libs || true); \
|
||||
done
|
||||
|
||||
svnclean-work:
|
||||
@for i in `find . -type d -not -path '*/.svn/*' | grep -v '.svn'`; do \
|
||||
(cd $$i 2>/dev/null && rm -rf `svn propget svn:ignore . | grep -v config.nice` *.o *.a *.lo *.la *.gcno *.gcda .libs || true); \
|
||||
done
|
||||
|
||||
gitclean-work:
|
||||
@if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \
|
||||
(echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \
|
||||
fi; \
|
||||
git clean -X -f -d;
|
||||
|
||||
.PHONY: $(ALWAYS) snapshot
|
||||
+2
-2
@@ -48,9 +48,9 @@ fi
|
||||
|
||||
if test "$1" = "2" && test "$2" -ge "50"; then
|
||||
echo "buildconf: Your version of autoconf likely contains buggy cache code."
|
||||
echo " Running cvsclean for you."
|
||||
echo " Running vcsclean for you."
|
||||
echo " To avoid this, install autoconf-2.13."
|
||||
./cvsclean
|
||||
./vcsclean
|
||||
stamp=
|
||||
fi
|
||||
|
||||
|
||||
Vendored
+899
-793
File diff suppressed because it is too large.
Load diff
@@ -51,8 +51,6 @@ function do_deps(mod_idx, module_name, mod_name_len, dep, ext, val, depid
|
||||
do_deps(depidx);
|
||||
}
|
||||
}
|
||||
|
||||
#printf(" phpext_%s_ptr,\n", module_name);
|
||||
printf(" phpext_%s_ptr,@NEWLINE@", module_name);
|
||||
delete mods[mod_idx];
|
||||
}
|
||||
@@ -79,8 +77,7 @@ END {
|
||||
out_count = 0;
|
||||
|
||||
while (count(mods)) {
|
||||
# count down, since we need to assemble it in reverse order
|
||||
for (i = mod_count-1; i >= 0; --i) {
|
||||
for (i = 0; i <= mod_count - 1; i++) {
|
||||
if (i in mods) {
|
||||
do_deps(i);
|
||||
}
|
||||
|
||||
@@ -32,38 +32,11 @@ if test "$dev" = "0" -a "$devok" = "0"; then
|
||||
echo "use buildconf --force to override this check."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$ZENDDIR"; then
|
||||
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
|
||||
v=5
|
||||
else
|
||||
v=4
|
||||
fi
|
||||
|
||||
if test "$v" = "5"; then
|
||||
if test -r "Zend/OBJECTS2_HOWTO"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine1 2>/dev/null
|
||||
mv ZendEngine2 Zend
|
||||
fi
|
||||
else
|
||||
if test -r "Zend/zend_execute_globals.h"; then
|
||||
:
|
||||
else
|
||||
mv Zend ZendEngine2 2>/dev/null
|
||||
mv ZendEngine1 Zend
|
||||
fi
|
||||
fi
|
||||
|
||||
ZENDDIR=Zend
|
||||
echo "using default Zend directory"
|
||||
fi
|
||||
|
||||
rm -f generated_lists
|
||||
|
||||
if test "$debug" = "yes"; then
|
||||
${MAKE:-make} -s -f build/build.mk ZENDDIR="$ZENDDIR" SUPPRESS_WARNINGS=""
|
||||
${MAKE:-make} -s -f build/build.mk SUPPRESS_WARNINGS=""
|
||||
else
|
||||
${MAKE:-make} -s -f build/build.mk ZENDDIR="$ZENDDIR"
|
||||
${MAKE:-make} -s -f build/build.mk
|
||||
fi
|
||||
Vendored
+80
-20
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-08-03'
|
||||
timestamp='2008-01-23'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -55,8 +56,8 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -106,7 +107,7 @@ set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:SolidBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
@@ -527,7 +532,7 @@ EOF
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[45])
|
||||
*:AIX:*:[456])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
@@ -764,12 +769,19 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
i*:MINGW*:*)
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
@@ -779,9 +791,18 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit ;;
|
||||
*:Interix*:[3456]*)
|
||||
case ${UNAME_MACHINE} in
|
||||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
EM64T | authenticamd)
|
||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
IA64)
|
||||
echo ia64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
esac ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit ;;
|
||||
@@ -815,6 +836,16 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
@@ -851,7 +882,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
@@ -870,7 +905,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
@@ -919,9 +958,15 @@ EOF
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
@@ -964,7 +1009,7 @@ EOF
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
@@ -974,7 +1019,11 @@ EOF
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^LIBC/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${LIBC}" != x && {
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit
|
||||
@@ -1176,6 +1225,15 @@ EOF
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-7:SUPER-UX:*:*)
|
||||
echo sx7-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-8:SUPER-UX:*:*)
|
||||
echo sx8-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-8R:SUPER-UX:*:*)
|
||||
echo sx8r-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@@ -1185,7 +1243,6 @@ EOF
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
@@ -1264,6 +1321,9 @@ EOF
|
||||
i*86:skyos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
||||
exit ;;
|
||||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@@ -1424,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
and
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
||||
Vendored
+116
-37
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-07-08'
|
||||
timestamp='2008-01-16'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -71,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -119,8 +120,9 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||||
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -171,6 +173,10 @@ case $os in
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -187,6 +193,10 @@ case $os in
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -231,15 +241,16 @@ case $basic_machine in
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -257,28 +268,27 @@ case $basic_machine in
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| ms1 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -286,6 +296,9 @@ case $basic_machine in
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
@@ -305,18 +318,18 @@ case $basic_machine in
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| avr-* | avr32-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
@@ -336,30 +349,33 @@ case $basic_machine in
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| ms1-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
# Recognize the basic CPU types without company name, with glob match.
|
||||
xtensa*)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -431,6 +447,14 @@ case $basic_machine in
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
blackfin)
|
||||
basic_machine=bfin-unknown
|
||||
os=-linux
|
||||
;;
|
||||
blackfin-*)
|
||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
@@ -463,8 +487,8 @@ case $basic_machine in
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16c)
|
||||
basic_machine=cr16c-unknown
|
||||
cr16)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -656,6 +680,14 @@ case $basic_machine in
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
;;
|
||||
m68knommu-*)
|
||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
@@ -671,6 +703,10 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
basic_machine=arm-unknown
|
||||
os=-mingw32ce
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
@@ -696,6 +732,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@@ -794,6 +833,14 @@ case $basic_machine in
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
parisc)
|
||||
basic_machine=hppa-unknown
|
||||
os=-linux
|
||||
;;
|
||||
parisc-*)
|
||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
@@ -803,6 +850,12 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
@@ -859,6 +912,10 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -885,6 +942,10 @@ case $basic_machine in
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sde)
|
||||
basic_machine=mipsisa32-sde
|
||||
os=-elf
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
@@ -896,6 +957,9 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh5el)
|
||||
basic_machine=sh5le-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
@@ -985,6 +1049,10 @@ case $basic_machine in
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -1101,7 +1169,7 @@ case $basic_machine in
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -1174,21 +1242,23 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1340,6 +1410,12 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
@@ -1349,9 +1425,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
@@ -1377,6 +1453,9 @@ case $basic_machine in
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
|
||||
+57
-38
@@ -31,7 +31,7 @@ dnl Basic autoconf + automake initialization, generation of config.nice.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
AC_PREREQ(2.13)
|
||||
AC_INIT(README.CVS-RULES)
|
||||
AC_INIT(README.SVN-RULES)
|
||||
|
||||
PHP_CONFIG_NICE(config.nice)
|
||||
|
||||
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=2
|
||||
PHP_RELEASE_VERSION=9
|
||||
PHP_EXTRA_VERSION="RC3"
|
||||
PHP_RELEASE_VERSION=12
|
||||
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`
|
||||
|
||||
@@ -122,26 +122,12 @@ 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 -------------------------------------------------------------------------
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC([cc gcc])
|
||||
PHP_DETECT_ICC
|
||||
PHP_DETECT_SUNCC
|
||||
AC_PROG_CC_C_O
|
||||
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
|
||||
dnl AC_PROG_CC_STDC
|
||||
@@ -170,7 +156,7 @@ 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!])
|
||||
AC_MSG_ERROR([bison is required to build PHP/Zend when building a SVN checkout!])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -187,6 +173,11 @@ case $host_cpu in
|
||||
CFLAGS="$CFLAGS -ieee"
|
||||
fi
|
||||
;;
|
||||
sparc*)
|
||||
if test "$SUNCC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -xmemalign=8s"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case $host_alias in
|
||||
@@ -206,7 +197,14 @@ case $host_alias in
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
|
||||
|
||||
macosx_major=`sw_vers -productVersion | cut -d . -f 1`
|
||||
macosx_minor=`sw_vers -productVersion | cut -d . -f 2`
|
||||
|
||||
if test "$macosx_major" -ge "10" && test "$macosx_minor" -lt "6" ; then
|
||||
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
|
||||
fi
|
||||
|
||||
php_multiple_shlib_versions_ok=yes
|
||||
;;
|
||||
*beos*)
|
||||
@@ -361,7 +359,6 @@ dnl in -lc, -lbind and -lresolv
|
||||
PHP_CHECK_FUNC(inet_aton, resolv, bind)
|
||||
PHP_CHECK_FUNC(dn_skipname, resolv, bind)
|
||||
|
||||
|
||||
dnl Then headers.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -381,6 +378,7 @@ sys/time.h \
|
||||
netinet/in.h \
|
||||
alloca.h \
|
||||
arpa/inet.h \
|
||||
arpa/nameser_compat.h \
|
||||
arpa/nameser.h \
|
||||
assert.h \
|
||||
crypt.h \
|
||||
@@ -589,11 +587,13 @@ tzset \
|
||||
unlockpt \
|
||||
unsetenv \
|
||||
usleep \
|
||||
nanosleep \
|
||||
utime \
|
||||
vsnprintf \
|
||||
)
|
||||
|
||||
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
|
||||
AC_CACHE_CHECK([for nanosleep], ac_cv_func_nanosleep, [PHP_CHECK_FUNC_LIB(nanosleep, rt)])
|
||||
|
||||
dnl Check for getaddrinfo, should be a better way, but...
|
||||
dnl Also check for working getaddrinfo
|
||||
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
|
||||
@@ -685,7 +685,7 @@ if test "$PHP_GCOV" = "yes"; then
|
||||
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
|
||||
fi
|
||||
|
||||
ltp_version_list="1.5 1.6"
|
||||
ltp_version_list="1.5 1.6 1.7"
|
||||
|
||||
AC_CHECK_PROG(LTP, lcov, lcov)
|
||||
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
|
||||
@@ -745,8 +745,17 @@ if test "$PHP_DEBUG" = "yes"; then
|
||||
changequote([,])
|
||||
dnl add -O0 only if GCC or ICC is used
|
||||
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -O0"
|
||||
CXXFLAGS="$CXXFLAGS -O0"
|
||||
CFLAGS="$CFLAGS -g -O0"
|
||||
CXXFLAGS="$CXXFLAGS -g -O0"
|
||||
fi
|
||||
if test "$SUNCC" = "yes"; then
|
||||
if test -n "$auto_cflags"; then
|
||||
CFLAGS="-g"
|
||||
CXXFLAGS="-g"
|
||||
else
|
||||
CFLAGS="$CFLAGS -g"
|
||||
CXXFLAGS="$CFLAGS -g"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
PHP_DEBUG=0
|
||||
@@ -951,6 +960,7 @@ case $php_build_target in
|
||||
esac
|
||||
|
||||
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
|
||||
|
||||
dnl this has to be here to prevent the openssl crypt() from
|
||||
dnl overriding the system provided crypt().
|
||||
@@ -1131,6 +1141,7 @@ EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`
|
||||
EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR`
|
||||
EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir`
|
||||
EXPANDED_BINDIR=`eval echo $bindir`
|
||||
EXPANDED_SBINDIR=`eval echo $sbindir`
|
||||
EXPANDED_LIBDIR=$libdir
|
||||
EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
|
||||
EXPANDED_DATADIR=$datadir
|
||||
@@ -1146,6 +1157,7 @@ AC_SUBST(INCLUDE_PATH)
|
||||
AC_SUBST(EXPANDED_PEAR_INSTALLDIR)
|
||||
AC_SUBST(EXPANDED_EXTENSION_DIR)
|
||||
AC_SUBST(EXPANDED_BINDIR)
|
||||
AC_SUBST(EXPANDED_SBINDIR)
|
||||
AC_SUBST(EXPANDED_LIBDIR)
|
||||
AC_SUBST(EXPANDED_DATADIR)
|
||||
AC_SUBST(EXPANDED_SYSCONFDIR)
|
||||
@@ -1190,12 +1202,14 @@ if test "$PHP_CLI" != "no"; then
|
||||
PHP_INSTALL_CLI_TARGET="install-cli"
|
||||
PHP_ADD_SOURCES(sapi/cli, php_cli.c php_cli_readline.c getopt.c,, cli)
|
||||
PHP_INSTALLED_SAPIS="cli $PHP_SAPI"
|
||||
PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
|
||||
else
|
||||
PHP_INSTALLED_SAPIS="$PHP_SAPI"
|
||||
fi
|
||||
|
||||
PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
|
||||
|
||||
PHP_SUBST(PHP_EXECUTABLE)
|
||||
PHP_SUBST(PHP_CLI_TARGET)
|
||||
PHP_SUBST(PHP_SAPI_OBJS)
|
||||
PHP_SUBST(PHP_CLI_OBJS)
|
||||
@@ -1212,6 +1226,7 @@ PHP_SUBST_OLD(php_abs_top_builddir)
|
||||
PHP_SUBST_OLD(php_abs_top_srcdir)
|
||||
|
||||
PHP_SUBST(bindir)
|
||||
PHP_SUBST(sbindir)
|
||||
PHP_SUBST(exec_prefix)
|
||||
PHP_SUBST_OLD(program_prefix)
|
||||
PHP_SUBST_OLD(program_suffix)
|
||||
@@ -1304,6 +1319,14 @@ PHP_CONFIGURE_PART(Configuring libtool)
|
||||
|
||||
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
|
||||
|
||||
dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
|
||||
dnl This hack works around it. Ugly.
|
||||
case $host_alias in
|
||||
*darwin9*|*darwin10*)
|
||||
ac_cv_exeext=
|
||||
;;
|
||||
esac
|
||||
|
||||
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], [], [
|
||||
@@ -1327,15 +1350,6 @@ SHARED_LIBTOOL='$(LIBTOOL)'
|
||||
|
||||
CC=$old_CC
|
||||
|
||||
dnl Finish the Darwin hack
|
||||
if test "$php_did_darwin9_cheat" -eq 1; then
|
||||
if test "$PHP_DEBUG" = "1"; 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
|
||||
@@ -1542,13 +1556,18 @@ X
|
||||
fi
|
||||
|
||||
if test "$PHP_SIGCHILD" != "yes"; then
|
||||
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
|
||||
cat <<X
|
||||
+--------------------------------------------------------------------+
|
||||
| Notice: |
|
||||
| If you encounter <defunc> processes when using a local Oracle-DB |
|
||||
| please recompile PHP and specify --enable-sigchild when configuring|
|
||||
| (This problem has been reported under Linux using Oracle >= 8.1.5) |
|
||||
| If you encounter <defunc> processes when using a local Oracle |
|
||||
| database, set the value BEQUEATH_DETACH=YES in Oracle Net's |
|
||||
| sqlnet.ora file on the PHP host, or set the environment variable |
|
||||
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
|
||||
| still occurs, then recompile PHP and specify --enable-sigchild |
|
||||
| when configuring. |
|
||||
X
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
+3
-11
@@ -21,8 +21,6 @@
|
||||
#ifndef PHP_BCMATH_H
|
||||
#define PHP_BCMATH_H
|
||||
|
||||
#if HAVE_BCMATH
|
||||
|
||||
#include "libbcmath/src/bcmath.h"
|
||||
|
||||
extern zend_module_entry bcmath_module_entry;
|
||||
@@ -50,18 +48,12 @@ ZEND_BEGIN_MODULE_GLOBALS(bcmath)
|
||||
long bc_precision;
|
||||
ZEND_END_MODULE_GLOBALS(bcmath)
|
||||
|
||||
#if ZTS
|
||||
#define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
|
||||
#ifdef ZTS
|
||||
# define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
|
||||
#else
|
||||
#define BCG(v) (bcmath_globals.v)
|
||||
# define BCG(v) (bcmath_globals.v)
|
||||
#endif
|
||||
|
||||
ZEND_EXTERN_MODULE_GLOBALS(bcmath)
|
||||
|
||||
#else
|
||||
|
||||
#define phpext_bcmath_ptr NULL
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* PHP_BCMATH_H */
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
bcdiv — Divide two arbitrary precision numbers
|
||||
--CREDITS--
|
||||
TestFest2009
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcdiv('10.99', '0');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: bcdiv(): Division by zero in %s.php on line %d
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
bcdiv — Divide two arbitrary precision numbers
|
||||
--CREDITS--
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcdiv('1', '2', '3', '4');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Wrong parameter count for bcdiv() in %s.php on line %d
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
bcmod — Get modulus of an arbitrary precision number
|
||||
--CREDITS--
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcmod('1', '2', '3');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Wrong parameter count for bcmod() in %s.php on line %d
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus
|
||||
--CREDITS--
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcpowmod('1');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: bcpowmod() expects at least 3 parameters, 1 given in %s.php on line %d
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus
|
||||
--CREDITS--
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcpowmod('1', '2');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: bcpowmod() expects at least 3 parameters, 2 given in %s.php on line %d
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus
|
||||
--CREDITS--
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcpowmod('1', '2', '3', '4', '5');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: bcpowmod() expects at most 4 parameters, 5 given in %s.php on line %d
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
bcsqrt — Get the square root of an arbitrary precision number
|
||||
--CREDITS--
|
||||
Antoni Torrents
|
||||
antoni@solucionsinternet.com
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo bcsqrt('-9');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: bcsqrt(): Square root of negative number in %s.php on line %d
|
||||
@@ -309,7 +309,7 @@ ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj
|
||||
}
|
||||
} else if (typelibname) {
|
||||
/* Fetch the typelibrary and use that to look things up */
|
||||
typelib = php_com_load_typelib(typelibname, obj->code_page TSRMLS_CC);
|
||||
typelib = php_com_load_typelib(typelibname, CP_THREAD_ACP TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!gotguid && dispname && typelib) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #45280 (Reflection of instantiated COM classes causes PHP to crash)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("reflection")){ echo "skip, no reflection support present"; }
|
||||
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$dict = new COM("Scripting.Dictionary");
|
||||
|
||||
ob_start();
|
||||
ReflectionObject::export($dict);
|
||||
ob_get_clean();
|
||||
|
||||
echo 'done';
|
||||
?>
|
||||
--EXPECT--
|
||||
done
|
||||
+70
-65
@@ -7,7 +7,7 @@ PHP_ARG_WITH(curl, for cURL support,
|
||||
|
||||
dnl Temporary option while we develop this aspect of the extension
|
||||
PHP_ARG_WITH(curlwrappers, if we should use cURL for url streams,
|
||||
[ --with-curlwrappers Use cURL for url streams], no, no)
|
||||
[ --with-curlwrappers EXPERIMENTAL: Use cURL for url streams], no, no)
|
||||
|
||||
if test "$PHP_CURL" != "no"; then
|
||||
if test -r $PHP_CURL/include/curl/easy.h; then
|
||||
@@ -48,74 +48,79 @@ if test "$PHP_CURL" != "no"; then
|
||||
else
|
||||
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for SSL support in libcurl])
|
||||
CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
|
||||
if test "$CURL_SSL" = "SSL"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="`$CURL_CONFIG --cflags`"
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_MSG_CHECKING([for openssl support in libcurl])
|
||||
AC_TRY_RUN([
|
||||
#include <curl/curl.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
if (data && data->ssl_version && *data->ssl_version) {
|
||||
const char *ptr = data->ssl_version;
|
||||
while(*ptr == ' ') ++ptr;
|
||||
return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADERS([openssl/crypto.h], [
|
||||
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
|
||||
])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for gnutls support in libcurl])
|
||||
AC_TRY_RUN([
|
||||
#include <curl/curl.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
if (data && data->ssl_version && *data->ssl_version) {
|
||||
const char *ptr = data->ssl_version;
|
||||
while(*ptr == ' ') ++ptr;
|
||||
return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADER([gcrypt.h], [
|
||||
AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
|
||||
])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
PHP_ADD_INCLUDE($CURL_DIR/include)
|
||||
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
|
||||
|
||||
AC_MSG_CHECKING([for SSL support in libcurl])
|
||||
CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
|
||||
if test "$CURL_SSL" = "SSL"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="`$CURL_CONFIG --cflags`"
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_MSG_CHECKING([for openssl support in libcurl])
|
||||
AC_TRY_RUN([
|
||||
#include <curl/curl.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
|
||||
if (data && data->ssl_version && *data->ssl_version) {
|
||||
const char *ptr = data->ssl_version;
|
||||
|
||||
while(*ptr == ' ') ++ptr;
|
||||
return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADERS([openssl/crypto.h], [
|
||||
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
|
||||
])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for gnutls support in libcurl])
|
||||
AC_TRY_RUN([
|
||||
#include <curl/curl.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
|
||||
if (data && data->ssl_version && *data->ssl_version) {
|
||||
const char *ptr = data->ssl_version;
|
||||
|
||||
while(*ptr == ' ') ++ptr;
|
||||
return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADER([gcrypt.h], [
|
||||
AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
|
||||
])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
PHP_CHECK_LIBRARY(curl,curl_easy_perform,
|
||||
[
|
||||
|
||||
+336
-188
@@ -147,6 +147,7 @@ static struct gcry_thread_cbs php_curl_gnutls_tsl = {
|
||||
#endif
|
||||
/* }}} */
|
||||
|
||||
static void _php_curl_close_ex(php_curl *ch TSRMLS_DC);
|
||||
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
|
||||
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
|
||||
@@ -157,36 +158,51 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
|
||||
|
||||
#if defined(PHP_WIN32) || defined(__GNUC__)
|
||||
#define php_curl_ret(__ret) RETVAL_FALSE; return __ret;
|
||||
# define php_curl_ret(__ret) RETVAL_FALSE; return __ret;
|
||||
#else
|
||||
#define php_curl_ret(__ret) RETVAL_FALSE; return;
|
||||
# define php_curl_ret(__ret) RETVAL_FALSE; return;
|
||||
#endif
|
||||
|
||||
#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len, __ret) \
|
||||
if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
|
||||
strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \
|
||||
{ \
|
||||
php_url *tmp_url; \
|
||||
\
|
||||
if (!(tmp_url = php_url_parse_ex(str, len))) { \
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL '%s'", str); \
|
||||
php_curl_ret(__ret); \
|
||||
} \
|
||||
\
|
||||
if (tmp_url->host || !php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL '%s' contains unencoded control characters", str); \
|
||||
php_url_free(tmp_url); \
|
||||
php_curl_ret(__ret); \
|
||||
} \
|
||||
\
|
||||
if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
|
||||
(PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
|
||||
) { \
|
||||
php_url_free(tmp_url); \
|
||||
php_curl_ret(__ret); \
|
||||
} \
|
||||
php_url_free(tmp_url); \
|
||||
static int php_curl_option_url(php_curl *ch, const char *url, const int len) /* {{{ */
|
||||
{
|
||||
CURLcode error = CURLE_OK;
|
||||
#if LIBCURL_VERSION_NUM < 0x071100
|
||||
char *copystr = NULL;
|
||||
#endif
|
||||
TSRMLS_FETCH();
|
||||
|
||||
/* Disable file:// if open_basedir or safe_mode are used */
|
||||
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071304
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_PROTOCOLS, CURLPROTO_ALL & ~CURLPROTO_FILE);
|
||||
#else
|
||||
php_url *uri;
|
||||
|
||||
if (!(uri = php_url_parse_ex(url, len))) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL '%s'", url);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (uri->scheme && !strncasecmp("file", uri->scheme, sizeof("file"))) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol 'file' disabled in cURL");
|
||||
php_url_free(uri);
|
||||
return 0;
|
||||
}
|
||||
php_url_free(uri);
|
||||
#endif
|
||||
}
|
||||
/* Strings passed to libcurl as 'char *' arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
|
||||
#if LIBCURL_VERSION_NUM >= 0x071100
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_URL, url);
|
||||
#else
|
||||
copystr = estrndup(url, len);
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_URL, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
#endif
|
||||
|
||||
return (error == CURLE_OK ? 1 : 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ arginfo */
|
||||
static
|
||||
@@ -279,14 +295,13 @@ ZEND_END_ARG_INFO()
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_info_read, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, mh)
|
||||
ZEND_ARG_INFO(0, msgs_in_queue)
|
||||
ZEND_ARG_INFO(1, msgs_in_queue)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
|
||||
ZEND_ARG_INFO(0, mh)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ curl_functions[]
|
||||
@@ -352,8 +367,12 @@ PHP_MINFO_FUNCTION(curl)
|
||||
PHP_MINIT_FUNCTION(curl)
|
||||
{
|
||||
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
|
||||
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl", module_number);
|
||||
|
||||
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number);
|
||||
|
||||
/* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
|
||||
or curl src/docs/libcurl/symbols-in-versions for a (almost) complete list
|
||||
of options and which version they were introduced */
|
||||
|
||||
/* Constants for curl_setopt() */
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
|
||||
@@ -421,7 +440,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
|
||||
#if CURLOPT_PASSWDFUNCTION != 0
|
||||
#if CURLOPT_PASSWDFUNCTION != 0
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
|
||||
#endif
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
|
||||
@@ -467,14 +486,14 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
|
||||
|
||||
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
|
||||
/* http authentication options */
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
|
||||
/* http authentication options */
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
|
||||
REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH & CURLOPT_FTP_CREATE_MISSING_DIRS are available since curl 7.10.7 */
|
||||
@@ -520,7 +539,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_KERBEROS4);
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_SSL);
|
||||
REGISTER_CURL_CONSTANT(CURL_VERSION_LIBZ);
|
||||
|
||||
|
||||
/* version constants */
|
||||
REGISTER_CURL_CONSTANT(CURLVERSION_NOW);
|
||||
|
||||
@@ -594,8 +613,8 @@ PHP_MINIT_FUNCTION(curl)
|
||||
#if LIBCURL_VERSION_NUM >= 0x070b00
|
||||
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
|
||||
#endif
|
||||
|
||||
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4);
|
||||
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
|
||||
|
||||
REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
|
||||
@@ -605,7 +624,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_NONE);
|
||||
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_0);
|
||||
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_1);
|
||||
|
||||
|
||||
REGISTER_CURL_CONSTANT(CURLM_CALL_MULTI_PERFORM);
|
||||
REGISTER_CURL_CONSTANT(CURLM_OK);
|
||||
REGISTER_CURL_CONSTANT(CURLM_BAD_HANDLE);
|
||||
@@ -630,16 +649,34 @@ PHP_MINIT_FUNCTION(curl)
|
||||
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x071304
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
|
||||
REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_HTTP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_HTTPS);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_FTP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_FTPS);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_SCP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_SFTP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_TELNET);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_LDAP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_LDAPS);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_DICT);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_FILE);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_TFTP);
|
||||
REGISTER_CURL_CONSTANT(CURLPROTO_ALL);
|
||||
#endif
|
||||
|
||||
#ifdef PHP_CURL_NEED_OPENSSL_TSL
|
||||
if (!CRYPTO_get_id_callback()) {
|
||||
int i, c = CRYPTO_num_locks();
|
||||
|
||||
|
||||
php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T));
|
||||
|
||||
|
||||
for (i = 0; i < c; ++i) {
|
||||
php_curl_openssl_tsl[i] = tsrm_mutex_alloc();
|
||||
}
|
||||
|
||||
|
||||
CRYPTO_set_id_callback(php_curl_ssl_id);
|
||||
CRYPTO_set_locking_callback(php_curl_ssl_lock);
|
||||
}
|
||||
@@ -647,7 +684,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
#ifdef PHP_CURL_NEED_GNUTLS_TSL
|
||||
gcry_control(GCRYCTL_SET_THREAD_CBS, &php_curl_gnutls_tsl);
|
||||
#endif
|
||||
|
||||
|
||||
if (curl_global_init(CURL_GLOBAL_SSL) != CURLE_OK) {
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -659,17 +696,28 @@ PHP_MINIT_FUNCTION(curl)
|
||||
char **p = (char **)info->protocols;
|
||||
|
||||
while (*p != NULL) {
|
||||
php_register_url_stream_wrapper(*p++, &php_curl_wrapper TSRMLS_CC);
|
||||
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
|
||||
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
|
||||
php_unregister_url_stream_wrapper(*p TSRMLS_CC);
|
||||
php_register_url_stream_wrapper(*p, &php_curl_wrapper TSRMLS_CC);
|
||||
}
|
||||
(void) *p++;
|
||||
}
|
||||
}
|
||||
# else
|
||||
php_unregister_url_stream_wrapper("http");
|
||||
php_register_url_stream_wrapper("http", &php_curl_wrapper TSRMLS_CC);
|
||||
php_unregister_url_stream_wrapper("https");
|
||||
php_register_url_stream_wrapper("https", &php_curl_wrapper TSRMLS_CC);
|
||||
php_unregister_url_stream_wrapper("ftp");
|
||||
php_register_url_stream_wrapper("ftp", &php_curl_wrapper TSRMLS_CC);
|
||||
php_unregister_url_stream_wrapper("ftps");
|
||||
php_register_url_stream_wrapper("ftps", &php_curl_wrapper TSRMLS_CC);
|
||||
php_unregister_url_stream_wrapper("ldap");
|
||||
php_register_url_stream_wrapper("ldap", &php_curl_wrapper TSRMLS_CC);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -688,14 +736,14 @@ PHP_MSHUTDOWN_FUNCTION(curl)
|
||||
#ifdef PHP_CURL_NEED_OPENSSL_TSL
|
||||
if (php_curl_openssl_tsl) {
|
||||
int i, c = CRYPTO_num_locks();
|
||||
|
||||
|
||||
CRYPTO_set_id_callback(NULL);
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
|
||||
|
||||
for (i = 0; i < c; ++i) {
|
||||
tsrm_mutex_free(php_curl_openssl_tsl[i]);
|
||||
}
|
||||
|
||||
|
||||
free(php_curl_openssl_tsl);
|
||||
php_curl_openssl_tsl = NULL;
|
||||
}
|
||||
@@ -717,7 +765,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
fprintf(stderr, "curl_write() called\n");
|
||||
fprintf(stderr, "data = %s, size = %d, nmemb = %d, ctx = %x\n", data, size, nmemb, ctx);
|
||||
#endif
|
||||
|
||||
|
||||
switch (t->method) {
|
||||
case PHP_CURL_STDOUT:
|
||||
PHPWRITE(data, length);
|
||||
@@ -741,7 +789,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
ZVAL_RESOURCE(handle, ch->id);
|
||||
zend_list_addref(ch->id);
|
||||
argv[0] = &handle;
|
||||
|
||||
|
||||
MAKE_STD_ZVAL(zdata);
|
||||
ZVAL_STRINGL(zdata, data, length, 1);
|
||||
argv[1] = &zdata;
|
||||
@@ -832,7 +880,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
|
||||
ch->in_callback = 0;
|
||||
if (error == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
|
||||
#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
|
||||
length = CURL_READFUNC_ABORT;
|
||||
#endif
|
||||
@@ -863,7 +911,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
||||
php_curl_write *t = ch->handlers->write_header;
|
||||
size_t length = size * nmemb;
|
||||
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
|
||||
|
||||
|
||||
switch (t->method) {
|
||||
case PHP_CURL_STDOUT:
|
||||
/* Handle special case write when we're returning the entire transfer
|
||||
@@ -939,7 +987,7 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
|
||||
|
||||
if (type == CURLINFO_HEADER_OUT) {
|
||||
if (ch->header.str_len) {
|
||||
efree(ch->header.str);
|
||||
efree(ch->header.str);
|
||||
}
|
||||
if (buf_len > 0) {
|
||||
ch->header.str = estrndup(buf, buf_len);
|
||||
@@ -985,7 +1033,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string", Z_STRVAL_P(func));
|
||||
}
|
||||
|
||||
|
||||
zval_ptr_dtor(&argv[0]);
|
||||
zval_ptr_dtor(&argv[1]);
|
||||
zval_ptr_dtor(&argv[2]);
|
||||
@@ -1002,7 +1050,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
static void curl_free_string(void **string)
|
||||
{
|
||||
efree(*string);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
@@ -1027,7 +1075,7 @@ static void curl_free_slist(void **slist)
|
||||
PHP_FUNCTION(curl_version)
|
||||
{
|
||||
curl_version_info_data *d;
|
||||
long uversion = CURLVERSION_NOW;
|
||||
long uversion = CURLVERSION_NOW;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &uversion) == FAILURE) {
|
||||
return;
|
||||
@@ -1057,7 +1105,8 @@ PHP_FUNCTION(curl_version)
|
||||
array_init(protocol_list);
|
||||
|
||||
while (*p != NULL) {
|
||||
add_next_index_string(protocol_list, *p++, 1);
|
||||
add_next_index_string(protocol_list, *p, 1);
|
||||
p++;
|
||||
}
|
||||
CAAZ("protocols", protocol_list);
|
||||
}
|
||||
@@ -1076,9 +1125,9 @@ static void alloc_curl_handle(php_curl **ch)
|
||||
|
||||
(*ch)->in_callback = 0;
|
||||
(*ch)->header.str_len = 0;
|
||||
|
||||
|
||||
memset(&(*ch)->err, 0, sizeof((*ch)->err));
|
||||
|
||||
|
||||
#if LIBCURL_VERSION_NUM < 0x071101
|
||||
zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
|
||||
#endif
|
||||
@@ -1091,10 +1140,11 @@ static void alloc_curl_handle(php_curl **ch)
|
||||
Initialize a cURL session */
|
||||
PHP_FUNCTION(curl_init)
|
||||
{
|
||||
zval **url;
|
||||
php_curl *ch;
|
||||
CURL *cp;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
php_curl *ch;
|
||||
zval **url;
|
||||
zval *clone;
|
||||
CURL *cp;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
|
||||
if (argc < 0 || argc > 1 || zend_get_parameters_ex(argc, &url) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1102,7 +1152,6 @@ PHP_FUNCTION(curl_init)
|
||||
|
||||
if (argc > 0) {
|
||||
convert_to_string_ex(url);
|
||||
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(url), Z_STRLEN_PP(url), (void) NULL);
|
||||
}
|
||||
|
||||
cp = curl_easy_init();
|
||||
@@ -1115,7 +1164,7 @@ PHP_FUNCTION(curl_init)
|
||||
TSRMLS_SET_CTX(ch->thread_ctx);
|
||||
|
||||
ch->cp = cp;
|
||||
|
||||
|
||||
ch->handlers->write->method = PHP_CURL_STDOUT;
|
||||
ch->handlers->write->type = PHP_CURL_ASCII;
|
||||
ch->handlers->read->method = PHP_CURL_DIRECT;
|
||||
@@ -1123,6 +1172,9 @@ PHP_FUNCTION(curl_init)
|
||||
|
||||
ch->uses = 0;
|
||||
|
||||
MAKE_STD_ZVAL(clone);
|
||||
ch->clone = clone;
|
||||
|
||||
curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str);
|
||||
@@ -1140,15 +1192,10 @@ PHP_FUNCTION(curl_init)
|
||||
#endif
|
||||
|
||||
if (argc > 0) {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071100
|
||||
curl_easy_setopt(ch->cp, CURLOPT_URL, Z_STRVAL_PP(url));
|
||||
#else
|
||||
char *urlcopy;
|
||||
|
||||
urlcopy = estrndup(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
|
||||
curl_easy_setopt(ch->cp, CURLOPT_URL, urlcopy);
|
||||
zend_llist_add_element(&ch->to_free.str, &urlcopy);
|
||||
#endif
|
||||
if (!php_curl_option_url(ch, Z_STRVAL_PP(url), Z_STRLEN_PP(url))) {
|
||||
_php_curl_close_ex(ch TSRMLS_CC);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, ch, le_curl);
|
||||
@@ -1160,14 +1207,14 @@ PHP_FUNCTION(curl_init)
|
||||
Copy a cURL handle along with all of it's preferences */
|
||||
PHP_FUNCTION(curl_copy_handle)
|
||||
{
|
||||
zval **zid;
|
||||
CURL *cp;
|
||||
php_curl *ch;
|
||||
php_curl *dupch;
|
||||
CURL *cp;
|
||||
zval **zid;
|
||||
php_curl *ch, *dupch;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
|
||||
|
||||
cp = curl_easy_duphandle(ch->cp);
|
||||
@@ -1180,10 +1227,23 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
TSRMLS_SET_CTX(dupch->thread_ctx);
|
||||
|
||||
dupch->cp = cp;
|
||||
dupch->uses = 0;
|
||||
if (ch->handlers->write->stream) {
|
||||
zval_add_ref(dupch->handlers->write->stream);
|
||||
dupch->handlers->write->stream = ch->handlers->write->stream;
|
||||
}
|
||||
dupch->handlers->write->method = ch->handlers->write->method;
|
||||
dupch->handlers->write->type = ch->handlers->write->type;
|
||||
if (ch->handlers->read->stream) {
|
||||
zval_add_ref(ch->handlers->read->stream);
|
||||
}
|
||||
dupch->handlers->read->stream = ch->handlers->read->stream;
|
||||
dupch->handlers->read->method = ch->handlers->read->method;
|
||||
dupch->handlers->write_header->method = ch->handlers->write_header->method;
|
||||
if (ch->handlers->write_header->stream) {
|
||||
zval_add_ref(ch->handlers->write_header->stream);
|
||||
}
|
||||
dupch->handlers->write_header->stream = ch->handlers->write_header->stream;
|
||||
|
||||
dupch->handlers->write->fp = ch->handlers->write->fp;
|
||||
dupch->handlers->write_header->fp = ch->handlers->write_header->fp;
|
||||
@@ -1222,6 +1282,10 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
|
||||
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
|
||||
|
||||
/* Keep track of cloned copies to avoid invoking curl destructors for every clone */
|
||||
ch->clone->refcount++;
|
||||
dupch->clone = ch->clone;
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, dupch, le_curl);
|
||||
dupch->id = Z_LVAL_P(return_value);
|
||||
}
|
||||
@@ -1302,8 +1366,20 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
case CURLOPT_COOKIESESSION:
|
||||
#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
|
||||
case CURLOPT_TCP_NODELAY:
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x71304
|
||||
case CURLOPT_REDIR_PROTOCOLS:
|
||||
case CURLOPT_PROTOCOLS:
|
||||
#endif
|
||||
convert_to_long_ex(zvalue);
|
||||
#if LIBCURL_VERSION_NUM >= 0x71304
|
||||
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
|
||||
((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
|
||||
break;
|
||||
case CURLOPT_FOLLOWLOCATION:
|
||||
@@ -1329,47 +1405,50 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
case CURLOPT_COOKIE:
|
||||
case CURLOPT_REFERER:
|
||||
case CURLOPT_INTERFACE:
|
||||
case CURLOPT_KRB4LEVEL:
|
||||
case CURLOPT_KRB4LEVEL:
|
||||
case CURLOPT_EGDSOCKET:
|
||||
case CURLOPT_CAINFO:
|
||||
case CURLOPT_CAINFO:
|
||||
case CURLOPT_CAPATH:
|
||||
case CURLOPT_SSL_CIPHER_LIST:
|
||||
case CURLOPT_SSL_CIPHER_LIST:
|
||||
case CURLOPT_SSLKEY:
|
||||
case CURLOPT_SSLKEYTYPE:
|
||||
case CURLOPT_SSLKEYPASSWD:
|
||||
case CURLOPT_SSLENGINE:
|
||||
case CURLOPT_SSLKEYTYPE:
|
||||
case CURLOPT_SSLKEYPASSWD:
|
||||
case CURLOPT_SSLENGINE:
|
||||
case CURLOPT_SSLENGINE_DEFAULT:
|
||||
case CURLOPT_SSLCERTTYPE:
|
||||
case CURLOPT_ENCODING: {
|
||||
case CURLOPT_ENCODING:
|
||||
{
|
||||
#if LIBCURL_VERSION_NUM < 0x071100
|
||||
char *copystr = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
convert_to_string_ex(zvalue);
|
||||
|
||||
if (option == CURLOPT_URL) {
|
||||
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 1);
|
||||
}
|
||||
|
||||
if (!php_curl_option_url(ch, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue))) {
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071100
|
||||
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
|
||||
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
|
||||
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
|
||||
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
|
||||
#else
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
#endif
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CURLOPT_FILE:
|
||||
case CURLOPT_INFILE:
|
||||
case CURLOPT_INFILE:
|
||||
case CURLOPT_WRITEHEADER:
|
||||
case CURLOPT_STDERR: {
|
||||
FILE *fp = NULL;
|
||||
int type;
|
||||
void * what;
|
||||
|
||||
|
||||
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
|
||||
if (!what) {
|
||||
RETVAL_FALSE;
|
||||
@@ -1389,18 +1468,49 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
error = CURLE_OK;
|
||||
switch (option) {
|
||||
case CURLOPT_FILE:
|
||||
ch->handlers->write->fp = fp;
|
||||
ch->handlers->write->method = PHP_CURL_FILE;
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->write->fp = fp;
|
||||
ch->handlers->write->method = PHP_CURL_FILE;
|
||||
ch->handlers->write->stream = *zvalue;
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case CURLOPT_WRITEHEADER:
|
||||
ch->handlers->write_header->fp = fp;
|
||||
ch->handlers->write_header->method = PHP_CURL_FILE;
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->write_header->fp = fp;
|
||||
ch->handlers->write_header->method = PHP_CURL_FILE;
|
||||
ch->handlers->write_header->stream = *zvalue;
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case CURLOPT_INFILE:
|
||||
zend_list_addref(Z_LVAL_PP(zvalue));
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->read->fp = fp;
|
||||
ch->handlers->read->fd = Z_LVAL_PP(zvalue);
|
||||
ch->handlers->read->stream = *zvalue;
|
||||
break;
|
||||
case CURLOPT_STDERR:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (ch->handlers->std_err) {
|
||||
zval_ptr_dtor(&ch->handlers->std_err);
|
||||
}
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->std_err = *zvalue;
|
||||
zend_list_addref(Z_LVAL_PP(zvalue));
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
/* break omitted intentionally */
|
||||
default:
|
||||
error = curl_easy_setopt(ch->cp, option, fp);
|
||||
break;
|
||||
@@ -1418,7 +1528,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
}
|
||||
break;
|
||||
case CURLOPT_BINARYTRANSFER:
|
||||
convert_to_long_ex(zvalue);
|
||||
convert_to_long_ex(zvalue);
|
||||
|
||||
if (Z_LVAL_PP(zvalue)) {
|
||||
ch->handlers->write->type = PHP_CURL_BINARY;
|
||||
@@ -1476,8 +1586,8 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
uint string_key_len;
|
||||
|
||||
postfields = HASH_OF(*zvalue);
|
||||
if (! postfields) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
|
||||
if (!postfields) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
@@ -1491,48 +1601,45 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
convert_to_string_ex(current);
|
||||
|
||||
zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);
|
||||
|
||||
|
||||
postval = Z_STRVAL_PP(current);
|
||||
|
||||
/* The arguments after _NAMELENGTH and _CONTENTSLENGTH
|
||||
* must be explicitly cast to long in curl_formadd
|
||||
* use since curl needs a long not an int. */
|
||||
if (*postval == '@') {
|
||||
char *type;
|
||||
char *type, *filename;
|
||||
++postval;
|
||||
|
||||
if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + strlen(postval)))) {
|
||||
if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + Z_STRLEN_PP(current)))) {
|
||||
*type = '\0';
|
||||
}
|
||||
if ((filename = php_memnstr(postval, ";filename=", sizeof(";filename=") - 1, postval + Z_STRLEN_PP(current)))) {
|
||||
*filename = '\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,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILENAME, filename ? filename + sizeof(";filename=") - 1 : postval,
|
||||
CURLFORM_CONTENTTYPE, type ? type + sizeof(";type=") - 1 : "application/octet-stream",
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_END);
|
||||
if (type) {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_CONTENTTYPE, type + sizeof(";type=") - 1,
|
||||
CURLFORM_END);
|
||||
*type = ';';
|
||||
} else {
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_END);
|
||||
|
||||
}
|
||||
if (filename) {
|
||||
*filename = ';';
|
||||
}
|
||||
} else {
|
||||
error = curl_formadd(&first, &last,
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
}
|
||||
@@ -1549,6 +1656,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
|
||||
} else {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071101
|
||||
convert_to_string_ex(zvalue);
|
||||
/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have to provide size before */
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, Z_STRLEN_PP(zvalue));
|
||||
error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, Z_STRVAL_PP(zvalue));
|
||||
@@ -1564,7 +1672,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case CURLOPT_HTTPHEADER:
|
||||
case CURLOPT_HTTPHEADER:
|
||||
case CURLOPT_QUOTE:
|
||||
case CURLOPT_HTTP200ALIASES:
|
||||
case CURLOPT_POSTQUOTE: {
|
||||
@@ -1588,7 +1696,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
|
||||
slist = curl_slist_append(slist, Z_STRVAL_PP(current));
|
||||
if (!slist) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
}
|
||||
@@ -1655,7 +1763,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
PHP_FUNCTION(curl_setopt)
|
||||
{
|
||||
zval **zid, **zoption, **zvalue;
|
||||
php_curl *ch;
|
||||
php_curl *ch;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &zid, &zoption, &zvalue) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1679,24 +1787,24 @@ PHP_FUNCTION(curl_setopt_array)
|
||||
{
|
||||
zval *zid, *arr, **entry;
|
||||
php_curl *ch;
|
||||
long option;
|
||||
ulong option;
|
||||
HashPosition pos;
|
||||
char *string_key;
|
||||
int str_key_len;
|
||||
char *string_key;
|
||||
uint str_key_len;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "za", &zid, &arr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
|
||||
|
||||
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(arr), &pos);
|
||||
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **)&entry, &pos) == SUCCESS) {
|
||||
if (zend_hash_get_current_key_ex(Z_ARRVAL_P(arr), &string_key, &str_key_len, &option, 0, &pos) == HASH_KEY_IS_STRING) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent integer values");
|
||||
if (zend_hash_get_current_key_ex(Z_ARRVAL_P(arr), &string_key, &str_key_len, &option, 0, &pos) != HASH_KEY_IS_LONG) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent integer values");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (_php_curl_setopt(ch, option, entry, return_value TSRMLS_CC)) {
|
||||
if (_php_curl_setopt(ch, (long) option, entry, return_value TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
zend_hash_move_forward_ex(Z_ARRVAL_P(arr), &pos);
|
||||
@@ -1705,7 +1813,7 @@ PHP_FUNCTION(curl_setopt_array)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _php_curl_cleanup_handle(ch)
|
||||
/* {{{ _php_curl_cleanup_handle(ch)
|
||||
Cleanup an execution phase */
|
||||
void _php_curl_cleanup_handle(php_curl *ch)
|
||||
{
|
||||
@@ -1726,9 +1834,9 @@ void _php_curl_cleanup_handle(php_curl *ch)
|
||||
Perform a cURL session */
|
||||
PHP_FUNCTION(curl_exec)
|
||||
{
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
CURLcode error;
|
||||
CURLcode error;
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1737,7 +1845,7 @@ PHP_FUNCTION(curl_exec)
|
||||
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
|
||||
|
||||
_php_curl_cleanup_handle(ch);
|
||||
|
||||
|
||||
error = curl_easy_perform(ch->cp);
|
||||
SAVE_CURL_ERROR(ch, error);
|
||||
/* CURLE_PARTIAL_FILE is returned by HEAD requests */
|
||||
@@ -1748,14 +1856,19 @@ PHP_FUNCTION(curl_exec)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ch->uses++;
|
||||
|
||||
if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.len > 0) {
|
||||
--ch->uses;
|
||||
smart_str_0(&ch->handlers->write->buf);
|
||||
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
|
||||
}
|
||||
--ch->uses;
|
||||
|
||||
/* flush the file handle, so any remaining data is synched to disk */
|
||||
if (ch->handlers->write->method == PHP_CURL_FILE && ch->handlers->write->fp) {
|
||||
fflush(ch->handlers->write->fp);
|
||||
}
|
||||
if (ch->handlers->write_header->method == PHP_CURL_FILE && ch->handlers->write_header->fp) {
|
||||
fflush(ch->handlers->write_header->fp);
|
||||
}
|
||||
|
||||
if (ch->handlers->write->method == PHP_CURL_RETURN) {
|
||||
RETURN_EMPTY_STRING();
|
||||
} else {
|
||||
@@ -1768,10 +1881,9 @@ PHP_FUNCTION(curl_exec)
|
||||
Get information regarding a specific transfer */
|
||||
PHP_FUNCTION(curl_getinfo)
|
||||
{
|
||||
zval **zid,
|
||||
**zoption;
|
||||
php_curl *ch;
|
||||
int option, argc = ZEND_NUM_ARGS();
|
||||
zval **zid, **zoption;
|
||||
php_curl *ch;
|
||||
int option, argc = ZEND_NUM_ARGS();
|
||||
|
||||
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &zid, &zoption) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1860,22 +1972,22 @@ PHP_FUNCTION(curl_getinfo)
|
||||
option = Z_LVAL_PP(zoption);
|
||||
switch (option) {
|
||||
case CURLINFO_PRIVATE:
|
||||
case CURLINFO_EFFECTIVE_URL:
|
||||
case CURLINFO_EFFECTIVE_URL:
|
||||
case CURLINFO_CONTENT_TYPE: {
|
||||
char *s_code = NULL;
|
||||
char *s_code = NULL;
|
||||
|
||||
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
|
||||
RETURN_STRING(s_code, 1);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
|
||||
RETURN_STRING(s_code, 1);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CURLINFO_HTTP_CODE:
|
||||
case CURLINFO_HEADER_SIZE:
|
||||
case CURLINFO_REQUEST_SIZE:
|
||||
case CURLINFO_FILETIME:
|
||||
case CURLINFO_SSL_VERIFYRESULT:
|
||||
case CURLINFO_HTTP_CODE:
|
||||
case CURLINFO_HEADER_SIZE:
|
||||
case CURLINFO_REQUEST_SIZE:
|
||||
case CURLINFO_FILETIME:
|
||||
case CURLINFO_SSL_VERIFYRESULT:
|
||||
case CURLINFO_REDIRECT_COUNT: {
|
||||
long code = 0;
|
||||
|
||||
@@ -1886,16 +1998,16 @@ PHP_FUNCTION(curl_getinfo)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CURLINFO_TOTAL_TIME:
|
||||
case CURLINFO_NAMELOOKUP_TIME:
|
||||
case CURLINFO_TOTAL_TIME:
|
||||
case CURLINFO_NAMELOOKUP_TIME:
|
||||
case CURLINFO_CONNECT_TIME:
|
||||
case CURLINFO_PRETRANSFER_TIME:
|
||||
case CURLINFO_SIZE_UPLOAD:
|
||||
case CURLINFO_PRETRANSFER_TIME:
|
||||
case CURLINFO_SIZE_UPLOAD:
|
||||
case CURLINFO_SIZE_DOWNLOAD:
|
||||
case CURLINFO_SPEED_DOWNLOAD:
|
||||
case CURLINFO_SPEED_UPLOAD:
|
||||
case CURLINFO_SPEED_DOWNLOAD:
|
||||
case CURLINFO_SPEED_UPLOAD:
|
||||
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
|
||||
case CURLINFO_CONTENT_LENGTH_UPLOAD:
|
||||
case CURLINFO_CONTENT_LENGTH_UPLOAD:
|
||||
case CURLINFO_STARTTRANSFER_TIME:
|
||||
case CURLINFO_REDIRECT_TIME: {
|
||||
double code = 0.0;
|
||||
@@ -1922,9 +2034,9 @@ PHP_FUNCTION(curl_getinfo)
|
||||
Return a string contain the last error for the current session */
|
||||
PHP_FUNCTION(curl_error)
|
||||
{
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
@@ -1940,8 +2052,8 @@ PHP_FUNCTION(curl_error)
|
||||
Return an integer containing the last error number */
|
||||
PHP_FUNCTION(curl_errno)
|
||||
{
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1957,8 +2069,8 @@ PHP_FUNCTION(curl_errno)
|
||||
Close a cURL session */
|
||||
PHP_FUNCTION(curl_close)
|
||||
{
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
zval **zid;
|
||||
php_curl *ch;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1970,8 +2082,8 @@ PHP_FUNCTION(curl_close)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close cURL handle from a callback");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch->uses) {
|
||||
|
||||
if (ch->uses) {
|
||||
ch->uses--;
|
||||
} else {
|
||||
zend_list_delete(Z_LVAL_PP(zid));
|
||||
@@ -1981,20 +2093,34 @@ PHP_FUNCTION(curl_close)
|
||||
|
||||
/* {{{ _php_curl_close()
|
||||
List destructor for curl handles */
|
||||
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
|
||||
{
|
||||
php_curl *ch = (php_curl *) rsrc->ptr;
|
||||
|
||||
#if PHP_CURL_DEBUG
|
||||
fprintf(stderr, "DTOR CALLED, ch = %x\n", ch);
|
||||
#endif
|
||||
|
||||
|
||||
/* Prevent crash inside cURL if passed file has already been closed */
|
||||
if (ch->handlers->std_err && ch->handlers->std_err->refcount <= 0) {
|
||||
curl_easy_setopt(ch->cp, CURLOPT_STDERR, stderr);
|
||||
}
|
||||
|
||||
curl_easy_cleanup(ch->cp);
|
||||
#if LIBCURL_VERSION_NUM < 0x071101
|
||||
zend_llist_clean(&ch->to_free.str);
|
||||
#endif
|
||||
zend_llist_clean(&ch->to_free.slist);
|
||||
zend_llist_clean(&ch->to_free.post);
|
||||
|
||||
/* cURL destructors should be invoked only by last curl handle */
|
||||
if (ch->clone->refcount <= 1) {
|
||||
zend_llist_clean(&ch->to_free.slist);
|
||||
zend_llist_clean(&ch->to_free.post);
|
||||
FREE_ZVAL(ch->clone);
|
||||
} else {
|
||||
ch->clone->refcount--;
|
||||
ch->to_free.slist.dtor = NULL;
|
||||
ch->to_free.post.dtor = NULL;
|
||||
zend_llist_clean(&ch->to_free.slist);
|
||||
zend_llist_clean(&ch->to_free.post);
|
||||
}
|
||||
|
||||
if (ch->handlers->write->buf.len > 0) {
|
||||
smart_str_free(&ch->handlers->write->buf);
|
||||
@@ -2011,16 +2137,38 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
if (ch->handlers->passwd) {
|
||||
zval_ptr_dtor(&ch->handlers->passwd);
|
||||
}
|
||||
if (ch->handlers->std_err) {
|
||||
zval_ptr_dtor(&ch->handlers->std_err);
|
||||
}
|
||||
if (ch->header.str_len > 0) {
|
||||
efree(ch->header.str);
|
||||
}
|
||||
|
||||
|
||||
if (ch->handlers->write_header->stream) {
|
||||
zval_ptr_dtor(&ch->handlers->write_header->stream);
|
||||
}
|
||||
if (ch->handlers->write->stream) {
|
||||
zval_ptr_dtor(&ch->handlers->write->stream);
|
||||
}
|
||||
if (ch->handlers->read->stream) {
|
||||
zval_ptr_dtor(&ch->handlers->read->stream);
|
||||
}
|
||||
|
||||
efree(ch->handlers->write);
|
||||
efree(ch->handlers->write_header);
|
||||
efree(ch->handlers->read);
|
||||
efree(ch->handlers);
|
||||
efree(ch);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _php_curl_close()
|
||||
List destructor for curl handles */
|
||||
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
php_curl *ch = (php_curl *) rsrc->ptr;
|
||||
_php_curl_close_ex(ch TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif /* HAVE_CURL */
|
||||
|
||||
@@ -86,6 +86,7 @@ typedef struct {
|
||||
smart_str buf;
|
||||
int method;
|
||||
int type;
|
||||
zval *stream;
|
||||
} php_curl_write;
|
||||
|
||||
typedef struct {
|
||||
@@ -94,6 +95,7 @@ typedef struct {
|
||||
FILE *fp;
|
||||
long fd;
|
||||
int method;
|
||||
zval *stream;
|
||||
} php_curl_read;
|
||||
|
||||
typedef struct {
|
||||
@@ -101,6 +103,7 @@ typedef struct {
|
||||
php_curl_write *write_header;
|
||||
php_curl_read *read;
|
||||
zval *passwd;
|
||||
zval *std_err;
|
||||
} php_curl_handlers;
|
||||
|
||||
struct _php_curl_error {
|
||||
@@ -131,6 +134,7 @@ typedef struct {
|
||||
long id;
|
||||
unsigned int uses;
|
||||
zend_bool in_callback;
|
||||
zval *clone;
|
||||
} php_curl;
|
||||
|
||||
typedef struct {
|
||||
|
||||
+56
-19
@@ -48,6 +48,7 @@
|
||||
#include "ext/standard/php_smart_str.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "ext/standard/file.h"
|
||||
#include "ext/standard/php_string.h"
|
||||
#include "php_curl.h"
|
||||
|
||||
static size_t on_data_available(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
@@ -128,7 +129,7 @@ static int on_progress_avail(php_stream *stream, double dltotal, double dlnow, d
|
||||
|
||||
/* our notification system only works in a single direction; we should detect which
|
||||
* direction is important and use the correct values in this call */
|
||||
php_stream_notify_progress(stream->context, dlnow, dltotal);
|
||||
php_stream_notify_progress(stream->context, (size_t) dlnow, (size_t) dltotal);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -166,7 +167,8 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T
|
||||
tv.tv_sec = 15; /* TODO: allow this to be configured from the script */
|
||||
|
||||
/* wait for data */
|
||||
switch (select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
|
||||
switch ((curlstream->maxfd < 0) ? 1 :
|
||||
select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
|
||||
case -1:
|
||||
/* error */
|
||||
return 0;
|
||||
@@ -179,7 +181,8 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T
|
||||
curlstream->mcode = curl_multi_perform(curlstream->multi, &curlstream->pending);
|
||||
} while (curlstream->mcode == CURLM_CALL_MULTI_PERFORM);
|
||||
}
|
||||
} while (curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
|
||||
} while (curlstream->maxfd >= 0 &&
|
||||
curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
|
||||
|
||||
}
|
||||
|
||||
@@ -258,6 +261,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
|
||||
php_stream *stream;
|
||||
php_curl_stream *curlstream;
|
||||
zval *tmp, **ctx_opt = NULL;
|
||||
struct curl_slist *slist = NULL;
|
||||
|
||||
curlstream = emalloc(sizeof(php_curl_stream));
|
||||
memset(curlstream, 0, sizeof(php_curl_stream));
|
||||
@@ -306,6 +310,15 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
|
||||
|
||||
/* TODO: read cookies and options from context */
|
||||
if (context && !strncasecmp(filename, "http", sizeof("http")-1)) {
|
||||
/* Protocol version */
|
||||
if (SUCCESS == php_stream_context_get_option(context, "http", "protocol_version", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_DOUBLE) {
|
||||
if (Z_DVAL_PP(ctx_opt) == 1.1) {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||
} else {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 1);
|
||||
} else {
|
||||
@@ -321,20 +334,34 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
|
||||
if (SUCCESS == php_stream_context_get_option(context, "http", "user_agent", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, Z_STRVAL_PP(ctx_opt));
|
||||
}
|
||||
if (SUCCESS == php_stream_context_get_option(context, "http", "header", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_ARRAY) {
|
||||
HashPosition pos;
|
||||
zval **header = NULL;
|
||||
struct curl_slist *hl = NULL;
|
||||
if (SUCCESS == php_stream_context_get_option(context, "http", "header", &ctx_opt)) {
|
||||
if (Z_TYPE_PP(ctx_opt) == IS_ARRAY) {
|
||||
HashPosition pos;
|
||||
zval **header = NULL;
|
||||
|
||||
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(ctx_opt), &pos);
|
||||
SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(ctx_opt), (void *)&header, &pos);
|
||||
zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos)) {
|
||||
if (Z_TYPE_PP(header) == IS_STRING) {
|
||||
hl = curl_slist_append(hl, Z_STRVAL_PP(header));
|
||||
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(ctx_opt), &pos);
|
||||
SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(ctx_opt), (void *)&header, &pos);
|
||||
zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos)
|
||||
) {
|
||||
if (Z_TYPE_PP(header) == IS_STRING) {
|
||||
slist = curl_slist_append(slist, Z_STRVAL_PP(header));
|
||||
}
|
||||
}
|
||||
} else if (Z_TYPE_PP(ctx_opt) == IS_STRING && Z_STRLEN_PP(ctx_opt)) {
|
||||
char *p, *token, *trimmed, *copy_ctx_opt;
|
||||
|
||||
copy_ctx_opt = php_trim(Z_STRVAL_PP(ctx_opt), Z_STRLEN_PP(ctx_opt), NULL, 0, NULL, 3 TSRMLS_CC);
|
||||
p = php_strtok_r(copy_ctx_opt, "\r\n", &token);
|
||||
while (p) {
|
||||
trimmed = php_trim(p, strlen(p), NULL, 0, NULL, 3 TSRMLS_CC);
|
||||
slist = curl_slist_append(slist, trimmed);
|
||||
efree(trimmed);
|
||||
p = php_strtok_r(NULL, "\r\n", &token);
|
||||
}
|
||||
efree(copy_ctx_opt);
|
||||
}
|
||||
if (hl) {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, hl);
|
||||
if (slist) {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, slist);
|
||||
}
|
||||
}
|
||||
if (SUCCESS == php_stream_context_get_option(context, "http", "method", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
|
||||
@@ -444,8 +471,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
|
||||
#else
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", m);
|
||||
#endif
|
||||
php_stream_close(stream);
|
||||
return NULL;
|
||||
goto exit_fail;
|
||||
}
|
||||
|
||||
/* we have only one curl handle here, even though we use multi syntax,
|
||||
@@ -463,12 +489,23 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
|
||||
}
|
||||
}
|
||||
if (msg_found) {
|
||||
php_stream_close(stream);
|
||||
return NULL;
|
||||
goto exit_fail;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* context headers are not needed anymore */
|
||||
if (slist) {
|
||||
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, NULL);
|
||||
curl_slist_free_all(slist);
|
||||
}
|
||||
return stream;
|
||||
|
||||
exit_fail:
|
||||
php_stream_close(stream);
|
||||
if (slist) {
|
||||
curl_slist_free_all(slist);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static php_stream_wrapper_ops php_curl_wrapper_ops = {
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
--TEST--
|
||||
Bug #45161 (Reusing a curl handle leaks memory)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
exit("skip not for Windows");
|
||||
}
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x071100) {
|
||||
exit("skip: test works only with curl >= 7.17.0");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
Loaded 100 of 2041 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user