mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 10:10:50 +00:00
Compare commits
857
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c89cf742c4 | ||
|
|
6a7f02001d | ||
|
|
ab211d72a3 | ||
|
|
3946b4727b | ||
|
|
3a30d703c0 | ||
|
|
ad86c485cd | ||
|
|
597adbfef1 | ||
|
|
2d2ad8e8d3 | ||
|
|
f2c9167ebb | ||
|
|
0ccb772f10 | ||
|
|
138a1160ab | ||
|
|
e9da49eaf5 | ||
|
|
64de2d2d45 | ||
|
|
1f4fa0ba1f | ||
|
|
1d943ee85e | ||
|
|
5c605854b8 | ||
|
|
11d09ac646 | ||
|
|
269aac9ee9 | ||
|
|
7204e7ba5a | ||
|
|
59dde7cbeb | ||
|
|
11a13337ff | ||
|
|
8649483a69 | ||
|
|
d9b443095f | ||
|
|
9db0be61ad | ||
|
|
29c12bd254 | ||
|
|
ef1f2c1b7b | ||
|
|
1e20b1ed7d | ||
|
|
9d700f942f | ||
|
|
35ca4a5cb4 | ||
|
|
fdb9b9d8c8 | ||
|
|
a1f0e80436 | ||
|
|
1e29c1716d | ||
|
|
7788b67557 | ||
|
|
5baa766b21 | ||
|
|
60d622bdb0 | ||
|
|
63ca897356 | ||
|
|
b584600e1d | ||
|
|
52127174e2 | ||
|
|
a548d2f19b | ||
|
|
edf54b5468 | ||
|
|
8611785073 | ||
|
|
8f6f281866 | ||
|
|
a9f2587716 | ||
|
|
5f7df8099a | ||
|
|
b615180021 | ||
|
|
7a4f2f9a00 | ||
|
|
339414deea | ||
|
|
98f4d8c5f6 | ||
|
|
e8795126ea | ||
|
|
d80a51181a | ||
|
|
cb9be83c31 | ||
|
|
62c865e21f | ||
|
|
1054bfbb0b | ||
|
|
889ba3c824 | ||
|
|
1dd17ad54a | ||
|
|
357cadb362 | ||
|
|
8f16e0b75c | ||
|
|
b0b7f4eed1 | ||
|
|
3e663ebfef | ||
|
|
fd6f77d569 | ||
|
|
dd040e75c3 | ||
|
|
1de0c2f27c | ||
|
|
64af7df7d0 | ||
|
|
40655e4104 | ||
|
|
8cc6227b45 | ||
|
|
13a67db7f5 | ||
|
|
b103a34cda | ||
|
|
c6aef571dd | ||
|
|
00779cc424 | ||
|
|
94cfbb5448 | ||
|
|
193801fbda | ||
|
|
7e071024d3 | ||
|
|
03c3cfbde3 | ||
|
|
978886a3a8 | ||
|
|
708cbe15d1 | ||
|
|
28331f99e2 | ||
|
|
8c4653fbb6 | ||
|
|
5a94926037 | ||
|
|
4a4711eb36 | ||
|
|
3baf31907a | ||
|
|
83a3d76e37 | ||
|
|
bb4e8b10e3 | ||
|
|
bc8c649878 | ||
|
|
9e8d58e54b | ||
|
|
c441dafbf4 | ||
|
|
6744f65d51 | ||
|
|
946190d453 | ||
|
|
236b0c1bde | ||
|
|
9b8fdcf63f | ||
|
|
b781627d85 | ||
|
|
34f0981808 | ||
|
|
dc2a59a970 | ||
|
|
d202354263 | ||
|
|
7be2f35865 | ||
|
|
233c3ade12 | ||
|
|
5273e2163b | ||
|
|
9a859a31ab | ||
|
|
d1e3634d13 | ||
|
|
681859cdc4 | ||
|
|
27f2d54784 | ||
|
|
655610a5bb | ||
|
|
62b1449e47 | ||
|
|
a8fc46afa7 | ||
|
|
3958a09990 | ||
|
|
69663666c1 | ||
|
|
0befe23833 | ||
|
|
0f1e56bc3a | ||
|
|
f2c14fd8b0 | ||
|
|
a000cbd955 | ||
|
|
40f85eb585 | ||
|
|
c857ec6c98 | ||
|
|
02be1a8d19 | ||
|
|
052670121b | ||
|
|
2a93e109e1 | ||
|
|
031e443b44 | ||
|
|
977f7b6716 | ||
|
|
63c1185096 | ||
|
|
d4888d7410 | ||
|
|
14a393d6a2 | ||
|
|
d39fbb1548 | ||
|
|
ff962d9de1 | ||
|
|
4ec1845b52 | ||
|
|
ecf84f8b6b | ||
|
|
1c9c9daa78 | ||
|
|
e1cf7f0ca6 | ||
|
|
2e161037fa | ||
|
|
6d3101b8f4 | ||
|
|
1b07a0988b | ||
|
|
46db94819f | ||
|
|
f9f818959a | ||
|
|
216e57bf23 | ||
|
|
77f40d6d5b | ||
|
|
0d6cdac9ff | ||
|
|
3e51cc7a8c | ||
|
|
d4689143e1 | ||
|
|
ba9ad966c3 | ||
|
|
1af0116cf0 | ||
|
|
abc6363462 | ||
|
|
77fee69a7e | ||
|
|
38b94446a4 | ||
|
|
2a4a4fbcaf | ||
|
|
90f420baa5 | ||
|
|
6eee168067 | ||
|
|
26116d7285 | ||
|
|
eb81041b0a | ||
|
|
1a65748249 | ||
|
|
31683f4bfa | ||
|
|
b47aea1094 | ||
|
|
c36af9e2b5 | ||
|
|
6d48ddaf8f | ||
|
|
77a1339755 | ||
|
|
f4068e65ba | ||
|
|
0d7d139700 | ||
|
|
43a9fd4c4a | ||
|
|
7089db25e0 | ||
|
|
f3213ecacd | ||
|
|
94565fb450 | ||
|
|
0418676cc6 | ||
|
|
5d66c33385 | ||
|
|
c4d4183f96 | ||
|
|
73550dd6b5 | ||
|
|
0dd068331a | ||
|
|
743bb87a57 | ||
|
|
9c3f699ed8 | ||
|
|
0c0fb4be83 | ||
|
|
5db9cbbc40 | ||
|
|
45e379b49d | ||
|
|
45c443576e | ||
|
|
7c28ec2e54 | ||
|
|
8b43d4de96 | ||
|
|
86647d648f | ||
|
|
8bdaeafc23 | ||
|
|
2ce86f5e5a | ||
|
|
9b730870a1 | ||
|
|
a58f8d2a9b | ||
|
|
08e237cc6d | ||
|
|
d4e61a3042 | ||
|
|
7af1de82e3 | ||
|
|
f75a2de1c1 | ||
|
|
c2805b88e5 | ||
|
|
8241ee2226 | ||
|
|
dfd8f3f735 | ||
|
|
6dc4795a66 | ||
|
|
6c7fe8df9f | ||
|
|
fcffdf2285 | ||
|
|
d8794230ed | ||
|
|
7eb1befffe | ||
|
|
ffa42113ff | ||
|
|
3ed933811b | ||
|
|
28306e3439 | ||
|
|
744d8992b3 | ||
|
|
4421fc2204 | ||
|
|
00315b1d42 | ||
|
|
7c40e93b69 | ||
|
|
48952c1b1d | ||
|
|
e0379278af | ||
|
|
50bdcc203b | ||
|
|
2778d2ad59 | ||
|
|
de270b4d6e | ||
|
|
18dc5aaed6 | ||
|
|
39c4c3971d | ||
|
|
766b688c8e | ||
|
|
5c394578de | ||
|
|
981603b55c | ||
|
|
12e8e280c7 | ||
|
|
59f4a9381f | ||
|
|
5ccd0528fe | ||
|
|
d0fea14428 | ||
|
|
ee82eac68a | ||
|
|
ae105adfd9 | ||
|
|
87784c32b3 | ||
|
|
8187dbfa4d | ||
|
|
f17936083a | ||
|
|
304923d187 | ||
|
|
4a3df17f43 | ||
|
|
63fbdfb3e1 | ||
|
|
f506f6254a | ||
|
|
65ef397b3c | ||
|
|
419b7283d3 | ||
|
|
e2fa604b0a | ||
|
|
bd98b8a3e0 | ||
|
|
ba670d01b5 | ||
|
|
ee71417ef0 | ||
|
|
7ac84b8607 | ||
|
|
6c0abfe077 | ||
|
|
9da1ec78c0 | ||
|
|
e3189410c4 | ||
|
|
f29c6b45a8 | ||
|
|
5ef434d175 | ||
|
|
0be31f3f3c | ||
|
|
5ae0fb0628 | ||
|
|
5ce503459d | ||
|
|
87e2a75f70 | ||
|
|
af3aecb688 | ||
|
|
592f5f384e | ||
|
|
a69ea8773d | ||
|
|
cf2c1c59aa | ||
|
|
f56d34a230 | ||
|
|
8448591096 | ||
|
|
079c7f0cd6 | ||
|
|
b289acb3af | ||
|
|
2554f5ca00 | ||
|
|
064bbbb04e | ||
|
|
697b79f6a3 | ||
|
|
26f6c26c8c | ||
|
|
201a2ec1f0 | ||
|
|
8fbb789d04 | ||
|
|
fa7ab79523 | ||
|
|
d1f536595e | ||
|
|
13e939679b | ||
|
|
a628bc8856 | ||
|
|
2e6320425b | ||
|
|
eaa1662a75 | ||
|
|
c04ac43efa | ||
|
|
839abfabcc | ||
|
|
c717b41784 | ||
|
|
745fe9004f | ||
|
|
dd570d65ce | ||
|
|
44b091a30d | ||
|
|
5b0fbbefe1 | ||
|
|
95121ed073 | ||
|
|
f26c177b2d | ||
|
|
9a90cfc99c | ||
|
|
2c92d82a02 | ||
|
|
80907e4a91 | ||
|
|
0d516bf7ec | ||
|
|
cc0b2dd120 | ||
|
|
622504d7a3 | ||
|
|
e002e2ec1c | ||
|
|
3bcef3b39d | ||
|
|
20b39a9806 | ||
|
|
d7ae91bea7 | ||
|
|
cc0b147a2f | ||
|
|
801ce5ee03 | ||
|
|
bb5f5da561 | ||
|
|
390b033755 | ||
|
|
1dc8e72874 | ||
|
|
caf57b0532 | ||
|
|
dece018a41 | ||
|
|
6f1c2f04a0 | ||
|
|
51f63718cf | ||
|
|
82a3271eda | ||
|
|
005ece078a | ||
|
|
5912128780 | ||
|
|
529092df9b | ||
|
|
410fb2b6d4 | ||
|
|
b8af6b08db | ||
|
|
7b624a37bc | ||
|
|
088d2d98b8 | ||
|
|
8cb33d2c04 | ||
|
|
7c51430b37 | ||
|
|
fef277ab76 | ||
|
|
0c685dc3c0 | ||
|
|
f8d7d6fc90 | ||
|
|
1a4c15d5e1 | ||
|
|
e4782cddf4 | ||
|
|
c9fd5b3010 | ||
|
|
c86f396edf | ||
|
|
984b2c84a5 | ||
|
|
65d0aca95c | ||
|
|
20809972dc | ||
|
|
1e0125e9a4 | ||
|
|
f2e8119bf5 | ||
|
|
86ae2781fb | ||
|
|
da11bc2b32 | ||
|
|
905f0d086b | ||
|
|
db0c290db4 | ||
|
|
ab8436fc87 | ||
|
|
6b7d50ead4 | ||
|
|
e660e038a4 | ||
|
|
bab919b91b | ||
|
|
cfcb262dfb | ||
|
|
5331163715 | ||
|
|
66d39db51e | ||
|
|
a4c915c855 | ||
|
|
45353a5c39 | ||
|
|
f66f94b4b0 | ||
|
|
ff7be14077 | ||
|
|
c1fa811b5c | ||
|
|
736e23a4c5 | ||
|
|
42b320bca1 | ||
|
|
23994f9150 | ||
|
|
b42398f850 | ||
|
|
bb084caec1 | ||
|
|
65bec2edc8 | ||
|
|
ea2d2d6bb6 | ||
|
|
f4a29d5432 | ||
|
|
844d6ee35b | ||
|
|
751b0807b1 | ||
|
|
a2581f81d1 | ||
|
|
0f9729404f | ||
|
|
255a7b9cf0 | ||
|
|
c98f8dc302 | ||
|
|
b24c96616a | ||
|
|
1d3604c1b1 | ||
|
|
1d28516b79 | ||
|
|
ee16647cfd | ||
|
|
5d96f54cf9 | ||
|
|
9ce5990880 | ||
|
|
0d1fe9c73b | ||
|
|
aa51dce93a | ||
|
|
0c855571c3 | ||
|
|
c2f8930033 | ||
|
|
2fe13db7ac | ||
|
|
d5bd104d9d | ||
|
|
8a1cd11e0b | ||
|
|
b58a5db130 | ||
|
|
a603c8d71b | ||
|
|
ad7f030c6d | ||
|
|
3dd5e7854c | ||
|
|
c73247fe2c | ||
|
|
0b25a9fb8c | ||
|
|
4490673e0e | ||
|
|
32f4ff69b5 | ||
|
|
d380d052af | ||
|
|
5fe2521143 | ||
|
|
8e0bb2d72c | ||
|
|
0c882b2645 | ||
|
|
b054ae8716 | ||
|
|
5a6c4393cb | ||
|
|
425646f98b | ||
|
|
02967f7040 | ||
|
|
660fac9dc0 | ||
|
|
3e34e202d5 | ||
|
|
aaeded2ac7 | ||
|
|
30ff9a85cf | ||
|
|
58fea2b990 | ||
|
|
dfa693b392 | ||
|
|
d9f3a1305f | ||
|
|
e78105b103 | ||
|
|
e81a660bae | ||
|
|
3b2ca90699 | ||
|
|
5a5f3e6dff | ||
|
|
6db1f40e32 | ||
|
|
dbbd4bf1b8 | ||
|
|
df9e324f35 | ||
|
|
2705adc4b9 | ||
|
|
97c1cc8925 | ||
|
|
7c9ab52ca4 | ||
|
|
6bcf63c567 | ||
|
|
8774eb1ae9 | ||
|
|
24957a15e0 | ||
|
|
cb165e184d | ||
|
|
63ff78e2f3 | ||
|
|
77245e4907 | ||
|
|
bb52c198ce | ||
|
|
0bc875c9ca | ||
|
|
42add0f2e1 | ||
|
|
ab6121f686 | ||
|
|
59ddc3b287 | ||
|
|
6789574da2 | ||
|
|
6194af1343 | ||
|
|
847f462905 | ||
|
|
c21ef044a7 | ||
|
|
a81fccc47d | ||
|
|
dc30b0035d | ||
|
|
fd81f61e0d | ||
|
|
a68454f659 | ||
|
|
b9fabc8ae6 | ||
|
|
bbfe422bd1 | ||
|
|
327109fab1 | ||
|
|
1643c14e5f | ||
|
|
6dc859da75 | ||
|
|
25a7740600 | ||
|
|
ee8d2395e1 | ||
|
|
eb324c4cce | ||
|
|
45dba3ecc7 | ||
|
|
2013cd57cd | ||
|
|
853adf67f9 | ||
|
|
c35249d45e | ||
|
|
0e70b8fea0 | ||
|
|
8f8e19dc7b | ||
|
|
57dbd0837a | ||
|
|
becf94003a | ||
|
|
0644aff586 | ||
|
|
882bd652df | ||
|
|
b1c09efa90 | ||
|
|
1ed9911cfa | ||
|
|
e2c7f9c485 | ||
|
|
8a9ad0081d | ||
|
|
63dcbb73f0 | ||
|
|
2caccf3136 | ||
|
|
e31fd8027f | ||
|
|
f012dee00c | ||
|
|
f6829cf90f | ||
|
|
e3ec29a3f1 | ||
|
|
bb9384cb8a | ||
|
|
33885b64a4 | ||
|
|
fe8771ec81 | ||
|
|
aeae1ce48a | ||
|
|
0c2edc588d | ||
|
|
3f9a50c5bf | ||
|
|
b68b2e029c | ||
|
|
32463e7af9 | ||
|
|
f0570bce0b | ||
|
|
0bf84145b2 | ||
|
|
e12bef98c6 | ||
|
|
d47d025881 | ||
|
|
e2ed7b551f | ||
|
|
83156cf04d | ||
|
|
056197037d | ||
|
|
ff8e1a32f9 | ||
|
|
d5afff5286 | ||
|
|
1a8b3e0923 | ||
|
|
b1407d3709 | ||
|
|
ea4f3ac8a3 | ||
|
|
9de95af3db | ||
|
|
d3aff8310c | ||
|
|
14902c89cc | ||
|
|
8330f31750 | ||
|
|
a109ecaacf | ||
|
|
947cebee3c | ||
|
|
dc75c7c2a1 | ||
|
|
3acbcf448f | ||
|
|
202e7f5b28 | ||
|
|
14d5ba8aec | ||
|
|
fdc2dab50b | ||
|
|
a4bc590ec1 | ||
|
|
c39a2f7143 | ||
|
|
06a116cd53 | ||
|
|
62fb0402db | ||
|
|
99a1f9e0b2 | ||
|
|
d92f11b9d6 | ||
|
|
b99048d5c7 | ||
|
|
9b85655327 | ||
|
|
369a97713c | ||
|
|
aaa295fa35 | ||
|
|
332e1b8482 | ||
|
|
81676a4b6e | ||
|
|
177ed895d3 | ||
|
|
dbdbfe37f2 | ||
|
|
b9580cd54e | ||
|
|
b298641605 | ||
|
|
bfe5708953 | ||
|
|
d3fd30265a | ||
|
|
1dd3064045 | ||
|
|
916ad03b84 | ||
|
|
5c6a2679c8 | ||
|
|
3258e0cef2 | ||
|
|
6c7761c807 | ||
|
|
332c87b12a | ||
|
|
fe13ae813d | ||
|
|
376d5f828d | ||
|
|
5d09ce66a3 | ||
|
|
144419b3a1 | ||
|
|
7a39cd0117 | ||
|
|
09e35a5107 | ||
|
|
7a369dc593 | ||
|
|
2ea3105939 | ||
|
|
9ed8465d1b | ||
|
|
6ff45cf55e | ||
|
|
ad732b6140 | ||
|
|
1ea2e504e3 | ||
|
|
84c1ac4385 | ||
|
|
85a2d87bae | ||
|
|
a91fe5ca49 | ||
|
|
6ca1fdbc25 | ||
|
|
9623aa59eb | ||
|
|
0125436439 | ||
|
|
af81b9d973 | ||
|
|
e9e1ba64e9 | ||
|
|
2bb2bcdcce | ||
|
|
f237b06942 | ||
|
|
9958658fc3 | ||
|
|
527f581a6b | ||
|
|
76a5faaf8f | ||
|
|
0e6b470417 | ||
|
|
295c1cc04e | ||
|
|
df35a307cc | ||
|
|
c6779ec584 | ||
|
|
f87b27a84e | ||
|
|
bbc87a14eb | ||
|
|
c1ee9eeecf | ||
|
|
db4b1f7f46 | ||
|
|
5697c1a9ac | ||
|
|
7f57a366dc | ||
|
|
72c994d464 | ||
|
|
5302a164b1 | ||
|
|
72a009a2f2 | ||
|
|
79cd4dc1c3 | ||
|
|
e3eb1b9bed | ||
|
|
f6966f28d0 | ||
|
|
e207cc58ac | ||
|
|
67f6979df2 | ||
|
|
e468aa44a2 | ||
|
|
fc6d3652f9 | ||
|
|
375bf36e42 | ||
|
|
997925db9f | ||
|
|
fa0e4863a2 | ||
|
|
2e869a00ac | ||
|
|
171184b64d | ||
|
|
bdbcc4b6d3 | ||
|
|
f4cd343b6c | ||
|
|
e5db0d8077 | ||
|
|
68893b0cb4 | ||
|
|
caa0de9205 | ||
|
|
39f1f2fcd3 | ||
|
|
b89ab4a4d5 | ||
|
|
6d9165b332 | ||
|
|
b196fbece9 | ||
|
|
85122b5ae6 | ||
|
|
8ba0f7f275 | ||
|
|
8ae4fa2810 | ||
|
|
b6900cb61d | ||
|
|
9a6012ff21 | ||
|
|
ef0652c7f3 | ||
|
|
54e44a4707 | ||
|
|
602f26dc08 | ||
|
|
68f328560d | ||
|
|
1155200b02 | ||
|
|
a04472df2e | ||
|
|
521048a9ae | ||
|
|
4846f7e349 | ||
|
|
7c21b37a2f | ||
|
|
f8e5189286 | ||
|
|
9926736605 | ||
|
|
0139100668 | ||
|
|
083c7f05ca | ||
|
|
ff9f6404dd | ||
|
|
ee0c90556e | ||
|
|
5516f0a247 | ||
|
|
586ceb9d40 | ||
|
|
08433295c4 | ||
|
|
c6ec417654 | ||
|
|
63f4dc835e | ||
|
|
3e47b3cb7b | ||
|
|
168f127abb | ||
|
|
2e2a566c15 | ||
|
|
9f6936fc0c | ||
|
|
efc78b635b | ||
|
|
017fa36d3f | ||
|
|
c43fe1c6cf | ||
|
|
82264b0b45 | ||
|
|
7a9cd0a4fd | ||
|
|
36e950eb5f | ||
|
|
c8f8766461 | ||
|
|
7a97b74637 | ||
|
|
92642d0189 | ||
|
|
a029117eb5 | ||
|
|
accfde57ca | ||
|
|
94a3bb327e | ||
|
|
d7e424acbe | ||
|
|
979e8b5896 | ||
|
|
3c9eb61d04 | ||
|
|
98505945f2 | ||
|
|
6f128d2dd7 | ||
|
|
00f18d764a | ||
|
|
6928bdc6bf | ||
|
|
2a078d14c9 | ||
|
|
1993c9a384 | ||
|
|
ecf81d1529 | ||
|
|
bf428e90a5 | ||
|
|
7deeb54fe1 | ||
|
|
6d078cea10 | ||
|
|
fdf4c22696 | ||
|
|
be49c27d17 | ||
|
|
0c9f9f8ef9 | ||
|
|
8cc2f5d576 | ||
|
|
3f6b49a340 | ||
|
|
393a686507 | ||
|
|
b8e0f7e78a | ||
|
|
40098256fb | ||
|
|
50a4e50d03 | ||
|
|
99d99a0ba0 | ||
|
|
f075e78ac1 | ||
|
|
477e2b315b | ||
|
|
98599a1c23 | ||
|
|
ea8fc31bf3 | ||
|
|
b84873aa96 | ||
|
|
7cf81e0fe0 | ||
|
|
620b1c63d0 | ||
|
|
2a05dfadb2 | ||
|
|
5a8c9a7d1c | ||
|
|
e1a402b6da | ||
|
|
f9137cddf6 | ||
|
|
07710a5fb9 | ||
|
|
1be447eb95 | ||
|
|
91e99495af | ||
|
|
b260f03830 | ||
|
|
0cd4039af2 | ||
|
|
c7047381f5 | ||
|
|
f422acca26 | ||
|
|
ecc9d28fed | ||
|
|
5e82a38f0a | ||
|
|
63b3528cb1 | ||
|
|
139996e1ac | ||
|
|
f89aae49a7 | ||
|
|
94eb3ed91b | ||
|
|
191bf235ed | ||
|
|
7d889d818a | ||
|
|
d70e63458f | ||
|
|
23d9af29d7 | ||
|
|
73219c9cb0 | ||
|
|
e538e493d7 | ||
|
|
2770262bad | ||
|
|
69158b5e18 | ||
|
|
f0435592a0 | ||
|
|
6eaef0712e | ||
|
|
64f7dafa74 | ||
|
|
16242cd2df | ||
|
|
11d5f9c7c4 | ||
|
|
3447b26334 | ||
|
|
12760053c1 | ||
|
|
52095f58a5 | ||
|
|
b024bedbdb | ||
|
|
5cb0b7609a | ||
|
|
2c841333ee | ||
|
|
474f6eef5e | ||
|
|
eb2659c7b2 | ||
|
|
f871988b88 | ||
|
|
b26d5f6077 | ||
|
|
2ff92b584e | ||
|
|
72fc33ef6a | ||
|
|
433d1a5d02 | ||
|
|
d0796d9d68 | ||
|
|
b89c7fcf8f | ||
|
|
884b06e303 | ||
|
|
e94f26f356 | ||
|
|
b441b275b3 | ||
|
|
f60df047f1 | ||
|
|
ddc1871576 | ||
|
|
24c806c41b | ||
|
|
91e8740fe4 | ||
|
|
9307163e67 | ||
|
|
b17d0085f3 | ||
|
|
0aa09167c1 | ||
|
|
eb3f8fda65 | ||
|
|
32b432f878 | ||
|
|
12bc950491 | ||
|
|
cecbe87656 | ||
|
|
74ae13f933 | ||
|
|
074b4e51f0 | ||
|
|
43cc8937b2 | ||
|
|
366c113156 | ||
|
|
9ee4848c3f | ||
|
|
f5bf263b88 | ||
|
|
3587185a89 | ||
|
|
7985002fc6 | ||
|
|
fa0efe45e0 | ||
|
|
c70e307e77 | ||
|
|
cfd8f6d775 | ||
|
|
30dc58671d | ||
|
|
ba144fd417 | ||
|
|
c932082f7b | ||
|
|
84d594e4b6 | ||
|
|
da068e5291 | ||
|
|
adb1cd835d | ||
|
|
8d377a698a | ||
|
|
f67c0222fe | ||
|
|
47950d10cf | ||
|
|
77951494b7 | ||
|
|
f7e4ff1054 | ||
|
|
d07b041e8a | ||
|
|
1ef91c8494 | ||
|
|
2fe9599880 | ||
|
|
15a715ae73 | ||
|
|
beeddd8873 | ||
|
|
507112e44d | ||
|
|
08d3f07ced | ||
|
|
280e6464e8 | ||
|
|
785b9d76f8 | ||
|
|
21f5a00183 | ||
|
|
c29136bd08 | ||
|
|
6c49087e64 | ||
|
|
402d3eb0e0 | ||
|
|
35990e7c5b | ||
|
|
ec3a713fbb | ||
|
|
b59c171e23 | ||
|
|
6d12620591 | ||
|
|
e1a08e5d55 | ||
|
|
4799047e07 | ||
|
|
aafdc266bf | ||
|
|
619b218e9a | ||
|
|
40085b06f2 | ||
|
|
b121ffae92 | ||
|
|
0cb6cfcd87 | ||
|
|
f22626ba5a | ||
|
|
4903f48eaa | ||
|
|
3373aeff8e | ||
|
|
03547dc13c | ||
|
|
cd836153d6 | ||
|
|
bb2ec1c790 | ||
|
|
b0e393e543 | ||
|
|
e0660a267e | ||
|
|
e3e2a62d44 | ||
|
|
69fbaf7d10 | ||
|
|
4d34ae2946 | ||
|
|
2cfdcd265d | ||
|
|
859a017f95 | ||
|
|
f39d5a2f21 | ||
|
|
1f45d49a0c | ||
|
|
910850be51 | ||
|
|
96df4d2161 | ||
|
|
0e0df5e47c | ||
|
|
bf132de1eb | ||
|
|
ada2b7ca41 | ||
|
|
b24d4ddac9 | ||
|
|
26bcbca33b | ||
|
|
99c6da86f3 | ||
|
|
dc34874dc9 | ||
|
|
5e6724b122 | ||
|
|
79325e3c55 | ||
|
|
fd15282c77 | ||
|
|
336111e4e9 | ||
|
|
7f7c158096 | ||
|
|
3327653e19 | ||
|
|
b33ea59337 | ||
|
|
ea6de20d86 | ||
|
|
96810f0ae6 | ||
|
|
a09eadc95b | ||
|
|
99695744ac | ||
|
|
9f249298fc | ||
|
|
8ff31493b7 | ||
|
|
e041a39e25 | ||
|
|
734dfc8b75 | ||
|
|
374bef4bc4 | ||
|
|
7ea43ee23a | ||
|
|
20296c625d | ||
|
|
793956a0e1 | ||
|
|
a14ef42c0c | ||
|
|
67b4492c47 | ||
|
|
9025c2a891 | ||
|
|
cf2121887c | ||
|
|
b7a47a439b | ||
|
|
2b69d18e49 | ||
|
|
822400d78f | ||
|
|
2a528a158a | ||
|
|
279f8d4822 | ||
|
|
82626c1868 | ||
|
|
510ad20616 | ||
|
|
f393620b9b | ||
|
|
fef2b33e85 | ||
|
|
dd8c8d05e8 | ||
|
|
022d4fc0b6 | ||
|
|
e280715150 | ||
|
|
09fbf87a6c | ||
|
|
af40765f8f | ||
|
|
49c91f6e33 | ||
|
|
649152ca49 | ||
|
|
e56466edc8 | ||
|
|
ee944bd1b5 | ||
|
|
5d238efaa6 | ||
|
|
18ce620bdf | ||
|
|
2198abb1c4 | ||
|
|
b9424cdfaf | ||
|
|
72f910c012 | ||
|
|
b78b25a336 | ||
|
|
5096c8d232 | ||
|
|
59a410cb76 | ||
|
|
09cad322fa | ||
|
|
152d379950 | ||
|
|
c6f777da1f | ||
|
|
3edd2a69f2 | ||
|
|
a3e6be974f | ||
|
|
eaa89d2443 | ||
|
|
19b1e39830 | ||
|
|
c230fa2b76 | ||
|
|
63bfa32aee | ||
|
|
af387e49ba | ||
|
|
90d58d4668 | ||
|
|
39bceffc4a | ||
|
|
a1ac6e1ee3 | ||
|
|
83647013af | ||
|
|
cac7e107c6 | ||
|
|
fdf96bed47 | ||
|
|
77c36cd259 | ||
|
|
9be89ed6f6 | ||
|
|
b9ddb5cba6 | ||
|
|
ba1f56cb6d | ||
|
|
6066b01d1b | ||
|
|
3197e135fa | ||
|
|
11750c315d | ||
|
|
cd0cfdfc39 | ||
|
|
4450386ae0 | ||
|
|
0ecaf04f86 | ||
|
|
78b2aaa954 | ||
|
|
2fc92c9172 | ||
|
|
d0d1e42c75 | ||
|
|
78e0e02179 | ||
|
|
5081b960e5 | ||
|
|
493b67b518 | ||
|
|
16980248cc | ||
|
|
a83c2153f9 | ||
|
|
3b32190c91 | ||
|
|
ff95906878 | ||
|
|
73fcf22627 | ||
|
|
0d98b9a1d9 | ||
|
|
9dfb01d3b1 | ||
|
|
00b9764a41 | ||
|
|
6ed33cd46d | ||
|
|
43a3524f49 | ||
|
|
cc44f5a09c | ||
|
|
8a3b3e9365 | ||
|
|
80b4ee9f44 | ||
|
|
de85bf4060 | ||
|
|
19401951c0 | ||
|
|
ede06426ee | ||
|
|
89c0ba1685 | ||
|
|
f30f2ef733 | ||
|
|
8ab9984707 | ||
|
|
8a61fc9b6e | ||
|
|
1aab36e3f2 | ||
|
|
141ae73099 | ||
|
|
254992907c | ||
|
|
1fd7133d5a | ||
|
|
11b820bda3 | ||
|
|
c6a7e4cad4 | ||
|
|
857aae2bd7 | ||
|
|
7f0be4f49d | ||
|
|
b1080faf44 | ||
|
|
8c4b05ad66 | ||
|
|
c5e61d4bca | ||
|
|
1d44054407 | ||
|
|
1d48a1081c | ||
|
|
440ed3da7f | ||
|
|
b27d339ddb | ||
|
|
2526d4f752 |
No files matched your search
+1
-1
@@ -159,7 +159,7 @@ STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: oci8
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
|
||||
PRIMARY MAINTAINER: Christopher Jones <sixd@php.net>, Antony Dovgal <tony2001@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,7 +70,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
|
||||
/* Gets an object of class specified by my_ce, and an optional double. */
|
||||
zval *obj;
|
||||
double d = 0.5;
|
||||
zend_class_entry my_ce;
|
||||
zend_class_entry *my_ce;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
|
||||
&obj, my_ce, &d) == FAILURE) {
|
||||
return;
|
||||
|
||||
@@ -172,6 +172,21 @@ Items from the NEWS file explained
|
||||
from your error handler in order to populate $php_errormsg. This allows
|
||||
you to fine-grain the levels of the messages stored.
|
||||
|
||||
==============================
|
||||
Regressions introduced/fixed
|
||||
==============================
|
||||
|
||||
- In version 5.2.4 a security fix caused a regression for patterns of
|
||||
the form "/foo/*/bar/*". Since version 5.2.5 instead of raising a warning the
|
||||
glob() function will return false when openbase_dir restrictions are violated.
|
||||
|
||||
#See http://bugs.php.net/bug.php?id=41655
|
||||
|
||||
The warning that used to be raised looked like something as follows:
|
||||
Warning: glob() [function.glob]: Unable to access /foo/*/bar/* in /foo.php on line xxx
|
||||
#See http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.169&r2=1.170
|
||||
|
||||
The patch can safely be applied to PHP 5.2.4 as well.
|
||||
|
||||
==============================
|
||||
Backwards incompatible changes
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| This source file is subject to the TSRM license, that is bundled |
|
||||
| with this package in the file LICENSE |
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Thread Safe Resource Manager |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1999-2007, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
|
||||
| This source file is subject to the TSRM license, that is bundled |
|
||||
| with this package in the file LICENSE |
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2007 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2007 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
+25
-18
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2007 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
@@ -489,6 +489,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
int ret;
|
||||
int use_cache;
|
||||
int use_relative_path = 0;
|
||||
#ifdef TSRM_WIN32
|
||||
int is_unc;
|
||||
#endif
|
||||
TSRMLS_FETCH();
|
||||
|
||||
use_cache = ((use_realpath != CWD_EXPAND) && CWDG(realpath_cache_size_limit));
|
||||
@@ -573,9 +576,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
char *ptr, *path_copy, *free_path;
|
||||
char *tok;
|
||||
int ptr_length;
|
||||
#ifdef TSRM_WIN32
|
||||
int is_unc;
|
||||
#endif
|
||||
no_realpath:
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
@@ -712,22 +712,24 @@ no_realpath:
|
||||
}
|
||||
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
|
||||
}
|
||||
#if defined(TSRM_WIN32) || defined(NETWARE)
|
||||
if (path[path_length-1] == '\\' || path[path_length-1] == '/') {
|
||||
#else
|
||||
if (path[path_length-1] == '/') {
|
||||
#endif
|
||||
state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2);
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
state->cwd[state->cwd_length] = 0;
|
||||
}
|
||||
|
||||
free(free_path);
|
||||
|
||||
if ((use_realpath == CWD_REALPATH) && ret) {
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
return 1;
|
||||
if (use_realpath == CWD_REALPATH) {
|
||||
if (ret) {
|
||||
CWD_STATE_FREE(state);
|
||||
*state = old_state;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
#if defined(TSRM_WIN32) || defined(NETWARE)
|
||||
if (path[path_length-1] == '\\' || path[path_length-1] == '/') {
|
||||
#else
|
||||
if (path[path_length-1] == '/') {
|
||||
#endif
|
||||
state->cwd = (char*)realloc(state->cwd, state->cwd_length + 2);
|
||||
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
|
||||
state->cwd[state->cwd_length] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
|
||||
@@ -738,7 +740,12 @@ no_realpath:
|
||||
}
|
||||
}
|
||||
|
||||
/* Store existent file in realpath cache. */
|
||||
#ifdef TSRM_WIN32
|
||||
if (use_cache && !is_unc) {
|
||||
#else
|
||||
if (use_cache && (use_realpath == CWD_REALPATH)) {
|
||||
#endif
|
||||
realpath_cache_add(path, path_length, state->cwd, state->cwd_length, t TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2007 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2007 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2007 The PHP Group |
|
||||
| Copyright (c) 1997-2008 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 |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -33,7 +33,7 @@ $obj->printVars();
|
||||
===BASE===
|
||||
string(4) "Base"
|
||||
|
||||
Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
|
||||
Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
|
||||
NULL
|
||||
===CHILD===
|
||||
string(4) "Base"
|
||||
|
||||
@@ -52,7 +52,7 @@ $baz->printFoo();
|
||||
--EXPECTF--
|
||||
foo: foo foo2
|
||||
bar: bar
|
||||
Notice: Undefined property: bar::$foo2 in %s on line %d
|
||||
Notice: Undefined property: bar::$foo2 in %s on line %d
|
||||
|
||||
---baz--
|
||||
foo: foo foo2
|
||||
|
||||
@@ -10,4 +10,4 @@ var_dump($a instanceOf A);
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Interface RecurisiveFooFar cannot not implement itself in %sbug30922.php on line %d
|
||||
Fatal error: Interface RecurisiveFooFar cannot implement itself in %sbug30922.php on line %d
|
||||
@@ -6,8 +6,6 @@ error_reporting=4095
|
||||
<?php
|
||||
$a = clone 0;
|
||||
$a[0]->b = 0;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: __clone method called on non-object in %sbug36071.php on line 2
|
||||
ok
|
||||
Fatal error: __clone method called on non-object in %sbug36071.php on line 2
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #38469 Unexpected creation of cycle
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
$a[0] = $a;
|
||||
var_dump($a);
|
||||
$b = array(array());
|
||||
$b[0][0] = $b;
|
||||
var_dump($b);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #40509 key() function changed behaviour if global array is used within function
|
||||
Bug #40509 (key() function changed behaviour if global array is used within function)
|
||||
--FILE--
|
||||
<?php
|
||||
function foo()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #40705 Iterating within function moves original array pointer
|
||||
Bug #40705 (Iterating within function moves original array pointer)
|
||||
--FILE--
|
||||
<?php
|
||||
function doForeach($array)
|
||||
|
||||
@@ -8,5 +8,4 @@ $foo[3]->bar[1] = "bang";
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Cannot use string offset as an array in %s/bug41919.php on line %d
|
||||
ok
|
||||
Fatal error: Cannot use string offset as an object in %s/bug41919.php on line %d
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #41929 Foreach on object does not iterate over all visible properties
|
||||
Bug #41929 (Foreach on object does not iterate over all visible properties)
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #42767 (highlight_string() truncates trailing comments)
|
||||
--FILE--
|
||||
<?php
|
||||
highlight_string('<?php /*some comment..');
|
||||
?>
|
||||
--EXPECT--
|
||||
<code><span style="color: #000000">
|
||||
<span style="color: #0000BB"><?php </span><span style="color: #FF8000">/*some comment..</span>
|
||||
</span>
|
||||
</code>
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #42772 (Storing $this in a static var fails while handling a cast to string)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
static public $foo;
|
||||
function __toString() {
|
||||
self::$foo = $this;
|
||||
return 'foo';
|
||||
}
|
||||
}
|
||||
|
||||
$foo = (string)new Foo();
|
||||
var_dump(Foo::$foo);
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Foo)#1 (0) {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Bug #42817 (clone() on a non-object does not result in a fatal error)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = clone(null);
|
||||
array_push($a->b, $c);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: __clone method called on non-object in %sbug42817.php on line 2
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Bug #42818 ($foo = clone(array()); leaks memory)
|
||||
--FILE--
|
||||
<?php
|
||||
$foo = clone(array());
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: __clone method called on non-object in %sbug42818.php on line 2
|
||||
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Bug #42937 (__call() method not invoked when methods are called on parent from child class)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
function __call($strMethod, $arrArgs) {
|
||||
echo "$strMethod\n";
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
function __call($strMethod, $arrArgs) {
|
||||
echo "$strMethod\n";
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
function test() {
|
||||
self::test1();
|
||||
parent::test2();
|
||||
A::test3();
|
||||
B::test4();
|
||||
C::test5();
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$a->test();
|
||||
|
||||
$b = new B();
|
||||
$b->test();
|
||||
?>
|
||||
--EXPECTF--
|
||||
test
|
||||
test1
|
||||
test2
|
||||
test3
|
||||
test4
|
||||
|
||||
Fatal error: Call to undefined method C::test5() in %sbug42937.php on line 20
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #43128 Very long class name causes segfault
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = str_repeat("a", 10 * 1024 * 1024);
|
||||
|
||||
eval("class $a {}");
|
||||
|
||||
# call_user_func($a); // Warning
|
||||
# $a->$a(); // Fatal error
|
||||
|
||||
if ($a instanceof $a); // Segmentation fault
|
||||
new $a; // Segmentation fault
|
||||
echo "ok\n";
|
||||
--EXPECT--
|
||||
ok
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #43175 (__destruct() throwing an exception with __call() causes segfault)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class foobar {
|
||||
public function __destruct() {
|
||||
throw new Exception();
|
||||
}
|
||||
public function __call($m, $a) {
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
function foobar() {
|
||||
return new foobar();
|
||||
}
|
||||
try {
|
||||
foobar()->unknown();
|
||||
} catch (Exception $e) {
|
||||
echo "__call via traditional factory should be caught\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
__call via traditional factory should be caught
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
--TEST--
|
||||
Bug #43201 (Crash on using unitialized vals and __get/__set)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __get($k) {
|
||||
return null;
|
||||
}
|
||||
function __set($k, $v) {
|
||||
$this->$k = $v;
|
||||
}
|
||||
}
|
||||
|
||||
$c = new Foo();
|
||||
|
||||
$c->arr[0]["k"] = 1;
|
||||
$c->arr[0]["k2"] = $ref;
|
||||
for($cnt=0;$cnt<6;$cnt++) {
|
||||
$ref = chop($undef);
|
||||
$c->arr[$cnt]["k2"] = $ref;
|
||||
}
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 13
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 14
|
||||
|
||||
Notice: Undefined variable: ref in %sbug43201.php on line 14
|
||||
|
||||
Notice: Undefined variable: undef in %sbug43201.php on line 16
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
|
||||
|
||||
Notice: Undefined variable: undef in %sbug43201.php on line 16
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
|
||||
|
||||
Notice: Undefined variable: undef in %sbug43201.php on line 16
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
|
||||
|
||||
Notice: Undefined variable: undef in %sbug43201.php on line 16
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
|
||||
|
||||
Notice: Undefined variable: undef in %sbug43201.php on line 16
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
|
||||
|
||||
Notice: Undefined variable: undef in %sbug43201.php on line 16
|
||||
|
||||
Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
|
||||
ok
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Bug #43450 (Memory leak on some functions with implicit object __toString() call)
|
||||
--SKIPIF--
|
||||
<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL|E_STRICT);
|
||||
|
||||
class Foo
|
||||
{
|
||||
public function __toString()
|
||||
{
|
||||
return __CLASS__;
|
||||
}
|
||||
}
|
||||
|
||||
$num_repeats = 100000;
|
||||
|
||||
$start = (memory_get_usage() / 1024) + 16;
|
||||
for ($i=1;$i<$num_repeats;$i++)
|
||||
{
|
||||
$foo = new Foo();
|
||||
md5($foo);
|
||||
}
|
||||
$end = memory_get_peak_usage() / 1024;
|
||||
|
||||
if ($start < $end) {
|
||||
echo 'FAIL';
|
||||
} else {
|
||||
echo 'PASS';
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
PASS
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #43483 (get_class_methods() does not list all visible methods)
|
||||
--FILE--
|
||||
<?php
|
||||
class C {
|
||||
public static function test() {
|
||||
D::prot();
|
||||
print_r(get_class_methods("D"));
|
||||
}
|
||||
}
|
||||
class D extends C {
|
||||
protected static function prot() {
|
||||
echo "Successfully called D::prot().\n";
|
||||
}
|
||||
}
|
||||
D::test();
|
||||
?>
|
||||
--EXPECT--
|
||||
Successfully called D::prot().
|
||||
Array
|
||||
(
|
||||
[0] => prot
|
||||
[1] => test
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #43703 (Signature compatibility check broken)
|
||||
--FILE--
|
||||
<?php
|
||||
class JoinPoint
|
||||
{
|
||||
}
|
||||
|
||||
abstract class Pointcut
|
||||
{
|
||||
abstract public function evaluate(JoinPoint $joinPoint);
|
||||
}
|
||||
|
||||
class Read extends Pointcut
|
||||
{
|
||||
public function evaluate(Joinpoint $joinPoint)
|
||||
{
|
||||
}
|
||||
}
|
||||
?>
|
||||
DONE
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #44069 (Huge memory usage with concatenation using . instead of .=)
|
||||
--FILE--
|
||||
<?php
|
||||
$array = array();
|
||||
$newstring = "";
|
||||
$string = str_repeat('This is a teststring.', 50);
|
||||
for($i = 1; $i <= 2000; $i++)
|
||||
{
|
||||
// $newstring .= $string; //This uses an expected amount of mem.
|
||||
$newstring = $newstring . $string; //This uses very much mem.
|
||||
|
||||
for($j = 1; $j <= 10; $j++)
|
||||
{
|
||||
$array[] = 'test';
|
||||
}
|
||||
}
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #44141 (private parent constructor callable through static function)
|
||||
--FILE--
|
||||
<?php
|
||||
class X
|
||||
{
|
||||
public $x;
|
||||
private function __construct($x)
|
||||
{
|
||||
$this->x = $x;
|
||||
}
|
||||
}
|
||||
|
||||
class Y extends X
|
||||
{
|
||||
static public function cheat($x)
|
||||
{
|
||||
return new Y($x);
|
||||
}
|
||||
}
|
||||
|
||||
$y = Y::cheat(5);
|
||||
echo $y->x, PHP_EOL;
|
||||
--EXPECTF--
|
||||
Fatal error: Call to private X::__construct() from context 'Y' in %sbug44141.php on line 15
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #44184 (Double free of loop-variable on exception)
|
||||
--FILE--
|
||||
<?php
|
||||
function foo() {
|
||||
$x = array(1,2,3);
|
||||
foreach ($x as $a) {
|
||||
while (1) {
|
||||
throw new Exception();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
try {
|
||||
foo();
|
||||
} catch (Exception $ex) {
|
||||
echo "ok\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
cloning uncloneable object
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("xsl")) die("skip xsl extension is missing");?>
|
||||
--INI--
|
||||
zend.ze1_compatibility_mode=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$new = &new XSLTProcessor();
|
||||
var_dump($new);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
|
||||
|
||||
Strict Standards: Implicit cloning object of class 'XSLTProcessor' because of 'zend.ze1_compatibility_mode' in %s on line %d
|
||||
|
||||
Fatal error: Trying to clone uncloneable object of class XSLTProcessor in Unknown on line 0
|
||||
@@ -10,4 +10,4 @@ class test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot declare property test::$var final, the final modifier is allowed only for methods in %s on line %d
|
||||
Fatal error: Cannot declare property test::$var final, the final modifier is allowed only for methods and classes in %s on line %d
|
||||
@@ -0,0 +1,212 @@
|
||||
--TEST--
|
||||
Indexing - various special cases.
|
||||
--FILE--
|
||||
<?php
|
||||
echo "*** Indexing - Testing value assignment with key ***\n";
|
||||
$array=array(1);
|
||||
$testvalues=array(null, 0, 1, true, false,'',' ',0.1,array());
|
||||
|
||||
foreach ($testvalues as $testvalue) {
|
||||
$testvalue['foo']=$array;
|
||||
var_dump ($testvalue);
|
||||
}
|
||||
echo "\n*** Indexing - Testing reference assignment with key ***\n";
|
||||
|
||||
$testvalues=array(null, 0, 1, true, false,'',0.1,array());
|
||||
|
||||
foreach ($testvalues as $testvalue) {
|
||||
$testvalue['foo']=&$array;
|
||||
var_dump ($testvalue);
|
||||
}
|
||||
echo "*** Indexing - Testing value assignment no key ***\n";
|
||||
$array=array(1);
|
||||
$testvalues=array(null, 0, 1, true, false,'',0.1,array());
|
||||
|
||||
foreach ($testvalues as $testvalue) {
|
||||
$testvalue[]=$array;
|
||||
var_dump ($testvalue);
|
||||
}
|
||||
echo "\n*** Indexing - Testing reference assignment no key ***\n";
|
||||
|
||||
$testvalues=array(null, 0, 1, true, false,'',0.1,array());
|
||||
|
||||
foreach ($testvalues as $testvalue) {
|
||||
$testvalue[]=&$array;
|
||||
var_dump ($testvalue);
|
||||
}
|
||||
|
||||
|
||||
echo "\nDone";
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Indexing - Testing value assignment with key ***
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(0)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(1)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
string(1) "A"
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
float(0.1)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
*** Indexing - Testing reference assignment with key ***
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(0)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(1)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
bool(true)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
float(0.1)
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
*** Indexing - Testing value assignment no key ***
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(0)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(1)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
bool(true)
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
float(0.1)
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
*** Indexing - Testing reference assignment no key ***
|
||||
array(1) {
|
||||
[0]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(0)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
int(1)
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
bool(true)
|
||||
array(1) {
|
||||
[0]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Warning: Cannot use a scalar value as an array in %s on line %d
|
||||
float(0.1)
|
||||
array(1) {
|
||||
[0]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
Done
|
||||
@@ -47,5 +47,4 @@ bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
AUTOLOAD 'X1'
|
||||
AUTOLOAD 'X2'
|
||||
bool(false)
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
passing first parameter of __set() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __set(&$name, $val) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$name = "prop";
|
||||
$t->$name = 1;
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__set() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
passing second parameter of __set() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __set($name, &$val) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$t->prop = 1;
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__set() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
passing parameter of __get() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __get(&$name) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$name = "prop";
|
||||
var_dump($t->$name);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__get() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
passing parameter of __unset() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __unset(&$name) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$name = "prop";
|
||||
|
||||
var_dump($t->$name);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__unset() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
passing parameter of __isset() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __isset(&$name) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$name = "prop";
|
||||
|
||||
var_dump(isset($t->$name));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__isset() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
passing first parameter of __call() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __call(&$name, $args) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$func = "foo";
|
||||
|
||||
$t->$func();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__call() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
passing second parameter of __call() by ref
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class test {
|
||||
function __call($name, &$args) { }
|
||||
}
|
||||
|
||||
$t = new test;
|
||||
$func = "foo";
|
||||
$arg = 1;
|
||||
|
||||
$t->$func($arg);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method test::__call() cannot take arguments by reference in %s on line %d
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
passing arguments by ref to a method handled by __call()
|
||||
--INI--
|
||||
allow_call_time_pass_reference=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
function __call($method, $args)
|
||||
{
|
||||
print $args[0]."\n";
|
||||
$args[0] = 5;
|
||||
print $args[0]."\n";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$v = 'str';
|
||||
$o = new Foo();
|
||||
$o->test(&$v);
|
||||
|
||||
var_dump($v);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
str
|
||||
5
|
||||
int(5)
|
||||
Done
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Zend Multibyte and ShiftJIS
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
|
||||
die("skip Requires configure --enable-zend-multibyte option");
|
||||
}
|
||||
if (!extension_loaded("mbstring")) {
|
||||
die("skip Requires mbstring extension");
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
mbstring.internal_encoding=SJIS
|
||||
--FILE--
|
||||
<?php
|
||||
declare(encoding='Shift_JIS');
|
||||
$s = "•\"; // 0x95+0x5c in script, not somewhere else "
|
||||
printf("%x:%x\n", ord($s[0]), ord($s[1]));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
95:5c
|
||||
===DONE===
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Zend Multibyte and UTF-8 BOM
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
|
||||
die("skip Requires configure --enable-zend-multibyte option");
|
||||
}
|
||||
if (!extension_loaded("mbstring")) {
|
||||
die("skip Requires mbstring extension");
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
mbstring.internal_encoding=iso-8859-1
|
||||
--FILE--
|
||||
<?php
|
||||
print "Hello World\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Hello World
|
||||
===DONE===
|
||||
BIN
Binary file not shown.
+2
-2
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -101,7 +101,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2007 Zend Technologies\n"
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2008 Zend Technologies\n"
|
||||
|
||||
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
|
||||
+13
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -181,9 +181,21 @@ char *alloca ();
|
||||
#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)
|
||||
# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
|
||||
# define ALLOCA_FLAG(name) \
|
||||
zend_bool name;
|
||||
# define do_alloca_with_limit_ex(size, limit, use_heap) \
|
||||
((use_heap = ((size) > (limit))) ? emalloc(size) : alloca(size))
|
||||
# define do_alloca_with_limit(size, use_heap) \
|
||||
do_alloca_with_limit_ex(size, ZEND_ALLOCA_MAX_SIZE, use_heap)
|
||||
# define free_alloca_with_limit(p, use_heap) \
|
||||
do { if (use_heap) efree(p); } while (0)
|
||||
#else
|
||||
# define do_alloca(p) emalloc(p)
|
||||
# define free_alloca(p) efree(p)
|
||||
# define ALLOCA_FLAG(name)
|
||||
# define do_alloca_with_limit(p, use_heap) emalloc(p)
|
||||
# define free_alloca_with_limit(p, use_heap) efree(p)
|
||||
#endif
|
||||
|
||||
#if ZEND_DEBUG
|
||||
|
||||
+41
-16
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -168,9 +168,15 @@ ZEND_API int _zend_get_parameters_array_ex(int param_count, zval ***argument_arr
|
||||
*value_ptr = **value;
|
||||
INIT_PZVAL(value_ptr);
|
||||
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
|
||||
|
||||
if (Z_OBJ_HANDLER_PP(value, clone_obj) == NULL) {
|
||||
zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", class_name);
|
||||
}
|
||||
|
||||
if(!dup) {
|
||||
efree(class_name);
|
||||
}
|
||||
|
||||
value_ptr->value.obj = Z_OBJ_HANDLER_PP(value, clone_obj)(*value TSRMLS_CC);
|
||||
zval_ptr_dtor(value);
|
||||
*value = value_ptr;
|
||||
@@ -1593,16 +1599,36 @@ ZEND_API void zend_check_magic_method_implementation(zend_class_entry *ce, zend_
|
||||
zend_error(error_type, "Destructor %s::%s() cannot take arguments", ce->name, ZEND_DESTRUCTOR_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_CLONE_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)) && fptr->common.num_args != 0) {
|
||||
zend_error(error_type, "Method %s::%s() cannot accept any arguments", ce->name, ZEND_CLONE_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_GET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)) && fptr->common.num_args != 1) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_GET_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_SET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)) && fptr->common.num_args != 2) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_SET_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_UNSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME)) && fptr->common.num_args != 1) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_UNSET_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_ISSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME)) && fptr->common.num_args != 1) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_ISSET_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)) && fptr->common.num_args != 2) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_CALL_FUNC_NAME);
|
||||
} else if (name_len == sizeof(ZEND_GET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME))) {
|
||||
if (fptr->common.num_args != 1) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_GET_FUNC_NAME);
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) {
|
||||
zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_GET_FUNC_NAME);
|
||||
}
|
||||
} else if (name_len == sizeof(ZEND_SET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME))) {
|
||||
if (fptr->common.num_args != 2) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_SET_FUNC_NAME);
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) {
|
||||
zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_SET_FUNC_NAME);
|
||||
}
|
||||
} else if (name_len == sizeof(ZEND_UNSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME))) {
|
||||
if (fptr->common.num_args != 1) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_UNSET_FUNC_NAME);
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) {
|
||||
zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_UNSET_FUNC_NAME);
|
||||
}
|
||||
} else if (name_len == sizeof(ZEND_ISSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME))) {
|
||||
if (fptr->common.num_args != 1) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_ISSET_FUNC_NAME);
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) {
|
||||
zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_ISSET_FUNC_NAME);
|
||||
}
|
||||
} else if (name_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME))) {
|
||||
if (fptr->common.num_args != 2) {
|
||||
zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_CALL_FUNC_NAME);
|
||||
} else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) {
|
||||
zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_CALL_FUNC_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1680,7 +1706,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
|
||||
/* Since the class is not an interface it needs to be declared as a abstract class. */
|
||||
/* Since here we are handling internal functions only we can add the keyword flag. */
|
||||
/* This time we set the flag for the keyword 'abstratc'. */
|
||||
/* This time we set the flag for the keyword 'abstract'. */
|
||||
scope->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
|
||||
}
|
||||
}
|
||||
@@ -1703,11 +1729,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
}
|
||||
}
|
||||
fname_len = strlen(ptr->fname);
|
||||
lowercase_name = do_alloca(fname_len+1);
|
||||
zend_str_tolower_copy(lowercase_name, ptr->fname, fname_len);
|
||||
lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
|
||||
if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, &function, sizeof(zend_function), (void**)®_function) == FAILURE) {
|
||||
unload=1;
|
||||
free_alloca(lowercase_name);
|
||||
efree(lowercase_name);
|
||||
break;
|
||||
}
|
||||
if (scope) {
|
||||
@@ -1747,7 +1772,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
|
||||
}
|
||||
ptr++;
|
||||
count++;
|
||||
free_alloca(lowercase_name);
|
||||
efree(lowercase_name);
|
||||
}
|
||||
if (unload) { /* before unloading, display all remaining bad function in the module */
|
||||
if (scope) {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+59
-9
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -396,6 +396,7 @@ struct _zend_mm_heap {
|
||||
size_t free_bitmap;
|
||||
size_t large_free_bitmap;
|
||||
size_t block_size;
|
||||
size_t compact_size;
|
||||
zend_mm_segment *segments_list;
|
||||
zend_mm_storage *storage;
|
||||
size_t real_size;
|
||||
@@ -648,10 +649,15 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
|
||||
static inline unsigned int zend_mm_high_bit(size_t _size)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(i386)
|
||||
unsigned int n;
|
||||
unsigned int n;
|
||||
|
||||
__asm__("bsrl %1,%0\n\t" : "=r" (n) : "rm" (_size));
|
||||
return n;
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
unsigned long n;
|
||||
|
||||
__asm__("bsrq %1,%0\n\t" : "=r" (n) : "rm" (_size));
|
||||
return (unsigned int)n;
|
||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
||||
__asm {
|
||||
bsr eax, _size
|
||||
@@ -669,10 +675,15 @@ static inline unsigned int zend_mm_high_bit(size_t _size)
|
||||
static inline unsigned int zend_mm_low_bit(size_t _size)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(i386)
|
||||
unsigned int n;
|
||||
unsigned int n;
|
||||
|
||||
__asm__("bsfl %1,%0\n\t" : "=r" (n) : "rm" (_size));
|
||||
return n;
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
unsigned long n;
|
||||
|
||||
__asm__("bsfq %1,%0\n\t" : "=r" (n) : "rm" (_size));
|
||||
return (unsigned int)n;
|
||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
||||
__asm {
|
||||
bsf eax, _size
|
||||
@@ -1028,6 +1039,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
|
||||
|
||||
heap->storage = storage;
|
||||
heap->block_size = block_size;
|
||||
heap->compact_size = 0;
|
||||
heap->segments_list = NULL;
|
||||
zend_mm_init(heap);
|
||||
# if ZEND_MM_CACHE_STAT
|
||||
@@ -1078,6 +1090,7 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
|
||||
char *mem_type = getenv("ZEND_MM_MEM_TYPE");
|
||||
char *tmp;
|
||||
const zend_mm_mem_handlers *handlers;
|
||||
zend_mm_heap *heap;
|
||||
|
||||
if (mem_type == NULL) {
|
||||
i = 0;
|
||||
@@ -1109,7 +1122,16 @@ ZEND_API zend_mm_heap *zend_mm_startup(void)
|
||||
seg_size = ZEND_MM_SEG_SIZE;
|
||||
}
|
||||
|
||||
return zend_mm_startup_ex(handlers, seg_size, ZEND_MM_RESERVE_SIZE, 0, NULL);
|
||||
heap = zend_mm_startup_ex(handlers, seg_size, ZEND_MM_RESERVE_SIZE, 0, NULL);
|
||||
if (heap) {
|
||||
tmp = getenv("ZEND_MM_COMPACT");
|
||||
if (tmp) {
|
||||
heap->compact_size = zend_atoi(tmp, 0);
|
||||
} else {
|
||||
heap->compact_size = 2 * 1024 * 1024;
|
||||
}
|
||||
}
|
||||
return heap;
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
@@ -1563,7 +1585,9 @@ ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent
|
||||
#ifdef HAVE_MEM_WIN32
|
||||
/* FIX for bug #41713 */
|
||||
/* TODO: add new "compact" handler */
|
||||
if (storage->handlers->dtor == zend_mm_mem_win32_dtor &&
|
||||
if (heap->compact_size &&
|
||||
heap->real_peak > heap->compact_size &&
|
||||
storage->handlers->dtor == zend_mm_mem_win32_dtor &&
|
||||
storage->handlers->init == zend_mm_mem_win32_init) {
|
||||
HeapDestroy((HANDLE)storage->data);
|
||||
storage->data = (void*)HeapCreate(HEAP_NO_SERIALIZE, 0, 0);
|
||||
@@ -1723,6 +1747,7 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
|
||||
size_t remaining_size;
|
||||
size_t segment_size;
|
||||
zend_mm_segment *segment;
|
||||
int keep_rest = 0;
|
||||
|
||||
if (EXPECTED(ZEND_MM_SMALL_SIZE(true_size))) {
|
||||
size_t index = ZEND_MM_BUCKET_INDEX(true_size);
|
||||
@@ -1791,6 +1816,7 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
|
||||
segment must have header "size" and trailer "guard" block */
|
||||
segment_size = true_size + ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE;
|
||||
segment_size = (segment_size + (heap->block_size-1)) & ~(heap->block_size-1);
|
||||
keep_rest = 1;
|
||||
} else {
|
||||
segment_size = heap->block_size;
|
||||
}
|
||||
@@ -1870,7 +1896,11 @@ zend_mm_finished_searching_for_block:
|
||||
ZEND_MM_BLOCK(new_free_block, ZEND_MM_FREE_BLOCK, remaining_size);
|
||||
|
||||
/* add the new free block to the free list */
|
||||
zend_mm_add_to_free_list(heap, new_free_block);
|
||||
if (EXPECTED(!keep_rest)) {
|
||||
zend_mm_add_to_free_list(heap, new_free_block);
|
||||
} else {
|
||||
zend_mm_add_to_rest_list(heap, new_free_block);
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 1);
|
||||
@@ -2286,10 +2316,10 @@ ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_
|
||||
static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
|
||||
{
|
||||
size_t res = nmemb;
|
||||
unsigned long overflow ;
|
||||
unsigned long overflow = 0;
|
||||
|
||||
__asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1"
|
||||
: "=a"(res), "=d" (overflow)
|
||||
__asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1"
|
||||
: "=&a"(res), "=&d" (overflow)
|
||||
: "%0"(res),
|
||||
"rm"(size),
|
||||
"rm"(offset));
|
||||
@@ -2301,6 +2331,26 @@ static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
|
||||
return res;
|
||||
}
|
||||
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
|
||||
static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
|
||||
{
|
||||
size_t res = nmemb;
|
||||
unsigned long overflow = 0;
|
||||
|
||||
__asm__ ("mulq %3\n\taddq %4,%0\n\tadcq %1,%1"
|
||||
: "=&a"(res), "=&d" (overflow)
|
||||
: "%0"(res),
|
||||
"rm"(size),
|
||||
"rm"(offset));
|
||||
|
||||
if (UNEXPECTED(overflow)) {
|
||||
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset);
|
||||
return 0;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -660,7 +660,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
|
||||
|
||||
convert_to_string_ex(class_name);
|
||||
|
||||
if (zend_lookup_class_ex(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name), (instance_ce != NULL), &ce TSRMLS_CC) == FAILURE) {
|
||||
if (zend_lookup_class_ex(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name), 0, &ce TSRMLS_CC) == FAILURE) {
|
||||
retval = 0;
|
||||
} else {
|
||||
if (only_subclass) {
|
||||
@@ -867,7 +867,7 @@ ZEND_FUNCTION(get_class_methods)
|
||||
if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC)
|
||||
|| (EG(scope) &&
|
||||
(((mptr->common.fn_flags & ZEND_ACC_PROTECTED) &&
|
||||
instanceof_function(EG(scope), mptr->common.scope TSRMLS_CC))
|
||||
zend_check_protected(mptr->common.scope, EG(scope)))
|
||||
|| ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) &&
|
||||
EG(scope) == mptr->common.scope)))) {
|
||||
char *key;
|
||||
@@ -1013,19 +1013,20 @@ ZEND_FUNCTION(class_exists)
|
||||
char *class_name, *lc_name;
|
||||
zend_class_entry **ce;
|
||||
int class_name_len;
|
||||
zend_bool autoload = 1;
|
||||
int found;
|
||||
zend_bool autoload = 1;
|
||||
ALLOCA_FLAG(use_heap)
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &class_name, &class_name_len, &autoload) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!autoload) {
|
||||
lc_name = do_alloca(class_name_len + 1);
|
||||
lc_name = do_alloca_with_limit(class_name_len + 1, use_heap);
|
||||
zend_str_tolower_copy(lc_name, class_name, class_name_len);
|
||||
|
||||
found = zend_hash_find(EG(class_table), lc_name, class_name_len+1, (void **) &ce);
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
RETURN_BOOL(found == SUCCESS && !((*ce)->ce_flags & ZEND_ACC_INTERFACE));
|
||||
}
|
||||
|
||||
@@ -1044,19 +1045,20 @@ ZEND_FUNCTION(interface_exists)
|
||||
char *iface_name, *lc_name;
|
||||
zend_class_entry **ce;
|
||||
int iface_name_len;
|
||||
zend_bool autoload = 1;
|
||||
int found;
|
||||
zend_bool autoload = 1;
|
||||
ALLOCA_FLAG(use_heap)
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &iface_name, &iface_name_len, &autoload) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!autoload) {
|
||||
lc_name = do_alloca(iface_name_len + 1);
|
||||
lc_name = do_alloca_with_limit(iface_name_len + 1, use_heap);
|
||||
zend_str_tolower_copy(lc_name, iface_name, iface_name_len);
|
||||
|
||||
found = zend_hash_find(EG(class_table), lc_name, iface_name_len+1, (void **) &ce);
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
RETURN_BOOL(found == SUCCESS && (*ce)->ce_flags & ZEND_ACC_INTERFACE);
|
||||
}
|
||||
|
||||
@@ -1216,6 +1218,7 @@ ZEND_FUNCTION(set_error_handler)
|
||||
had_orig_error_handler = 1;
|
||||
*return_value = *EG(user_error_handler);
|
||||
zval_copy_ctor(return_value);
|
||||
INIT_PZVAL(return_value);
|
||||
zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting), sizeof(EG(user_error_handler_error_reporting)));
|
||||
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
|
||||
}
|
||||
@@ -1230,6 +1233,7 @@ ZEND_FUNCTION(set_error_handler)
|
||||
EG(user_error_handler_error_reporting) = (int)error_type;
|
||||
*EG(user_error_handler) = *error_handler;
|
||||
zval_copy_ctor(EG(user_error_handler));
|
||||
INIT_PZVAL(EG(user_error_handler));
|
||||
|
||||
if (!had_orig_error_handler) {
|
||||
RETURN_NULL();
|
||||
@@ -2093,15 +2097,17 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto array debug_backtrace(void)
|
||||
/* {{{ proto array debug_backtrace([bool provide_object])
|
||||
Return backtrace as array */
|
||||
ZEND_FUNCTION(debug_backtrace)
|
||||
{
|
||||
if (ZEND_NUM_ARGS()) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
zend_bool provide_object = 1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &provide_object) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_fetch_debug_backtrace(return_value, 1, 1 TSRMLS_CC);
|
||||
zend_fetch_debug_backtrace(return_value, 1, provide_object TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+55
-23
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -541,8 +541,39 @@ static zend_bool opline_is_fetch_this(zend_op *opline TSRMLS_DC)
|
||||
|
||||
void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC)
|
||||
{
|
||||
int last_op_number = get_next_op_number(CG(active_op_array));
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
int last_op_number;
|
||||
zend_op *opline;
|
||||
|
||||
if (value->op_type == IS_CV) {
|
||||
zend_llist *fetch_list_ptr;
|
||||
|
||||
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
|
||||
if (fetch_list_ptr && fetch_list_ptr->head) {
|
||||
opline = (zend_op *)fetch_list_ptr->head->data;
|
||||
|
||||
if (opline->opcode == ZEND_FETCH_DIM_W &&
|
||||
opline->op1.op_type == IS_CV &&
|
||||
opline->op1.u.var == value->u.var) {
|
||||
|
||||
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
opline->opcode = ZEND_FETCH_R;
|
||||
opline->result.op_type = IS_VAR;
|
||||
opline->result.u.EA.type = 0;
|
||||
opline->result.u.var = get_temporary_variable(CG(active_op_array));
|
||||
opline->op1.op_type = IS_CONST;
|
||||
ZVAL_STRINGL(&opline->op1.u.constant,
|
||||
CG(active_op_array)->vars[value->u.var].name,
|
||||
CG(active_op_array)->vars[value->u.var].name_len, 1);
|
||||
SET_UNUSED(opline->op2);
|
||||
value = &opline->result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
|
||||
|
||||
last_op_number = get_next_op_number(CG(active_op_array));
|
||||
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
|
||||
if (variable->op_type == IS_VAR) {
|
||||
int n = 0;
|
||||
@@ -654,8 +685,14 @@ static inline void do_begin_loop(TSRMLS_D)
|
||||
}
|
||||
|
||||
|
||||
static inline void do_end_loop(int cont_addr TSRMLS_DC)
|
||||
static inline void do_end_loop(int cont_addr, int has_loop_var TSRMLS_DC)
|
||||
{
|
||||
if (!has_loop_var) {
|
||||
/* The start fileld is used to free temporary variables in case of exceptions.
|
||||
* We won't try to free something of we don't have loop variable.
|
||||
*/
|
||||
CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].start = -1;
|
||||
}
|
||||
CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].cont = cont_addr;
|
||||
CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].brk = get_next_op_number(CG(active_op_array));
|
||||
CG(active_op_array)->current_brk_cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].parent;
|
||||
@@ -690,7 +727,7 @@ void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC)
|
||||
/* update while's conditional jmp */
|
||||
CG(active_op_array)->opcodes[close_bracket_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
|
||||
|
||||
do_end_loop(while_token->u.opline_num TSRMLS_CC);
|
||||
do_end_loop(while_token->u.opline_num, 0 TSRMLS_CC);
|
||||
|
||||
DEC_BPC(CG(active_op_array));
|
||||
}
|
||||
@@ -734,7 +771,7 @@ void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC)
|
||||
SET_UNUSED(opline->op1);
|
||||
SET_UNUSED(opline->op2);
|
||||
|
||||
do_end_loop(second_semicolon_token->u.opline_num+1 TSRMLS_CC);
|
||||
do_end_loop(second_semicolon_token->u.opline_num+1, 0 TSRMLS_CC);
|
||||
|
||||
DEC_BPC(CG(active_op_array));
|
||||
}
|
||||
@@ -1069,6 +1106,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
|
||||
zend_uint fn_flags;
|
||||
char *lcname;
|
||||
zend_bool orig_interactive;
|
||||
ALLOCA_FLAG(use_heap)
|
||||
|
||||
if (is_method) {
|
||||
if (CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE) {
|
||||
@@ -1129,7 +1167,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
|
||||
}
|
||||
|
||||
if (!(CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE)) {
|
||||
short_class_name = do_alloca(short_class_name_length + 1);
|
||||
short_class_name = do_alloca_with_limit(short_class_name_length + 1, use_heap);
|
||||
zend_str_tolower_copy(short_class_name, CG(active_class_entry)->name, short_class_name_length);
|
||||
/* Improve after RC: cache the lowercase class name */
|
||||
|
||||
@@ -1163,7 +1201,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
|
||||
} else if (!(fn_flags & ZEND_ACC_STATIC)) {
|
||||
CG(active_op_array)->fn_flags |= ZEND_ACC_ALLOW_STATIC;
|
||||
}
|
||||
free_alloca(short_class_name);
|
||||
free_alloca_with_limit(short_class_name, use_heap);
|
||||
}
|
||||
|
||||
efree(lcname);
|
||||
@@ -1552,11 +1590,11 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC)
|
||||
if (original_op==ZEND_SEND_REF
|
||||
&& !CG(allow_call_time_pass_reference)) {
|
||||
zend_error(E_COMPILE_WARNING,
|
||||
"Call-time pass-by-reference has been deprecated; "
|
||||
"Call-time pass-by-reference has been deprecated; "
|
||||
"If you would like to pass it by reference, modify the declaration of %s(). "
|
||||
"If you would like to enable call-time pass-by-reference, you can set "
|
||||
"allow_call_time_pass_reference to true in your INI file. ",
|
||||
(function_ptr?function_ptr->common.function_name:"[runtime function name]"));
|
||||
"allow_call_time_pass_reference to true in your INI file",
|
||||
(function_ptr ? function_ptr->common.function_name : "[runtime function name]"));
|
||||
}
|
||||
|
||||
if (function_ptr) {
|
||||
@@ -1990,7 +2028,7 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu
|
||||
return 0;
|
||||
}
|
||||
if (fe->common.arg_info[i].class_name
|
||||
&& strcmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
|
||||
&& strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
|
||||
return 0;
|
||||
}
|
||||
if (fe->common.arg_info[i].array_type_hint != proto->common.arg_info[i].array_type_hint) {
|
||||
@@ -2191,7 +2229,7 @@ static inline void do_implement_interface(zend_class_entry *ce, zend_class_entry
|
||||
zend_error(E_CORE_ERROR, "Class %s could not implement interface %s", ce->name, iface->name);
|
||||
}
|
||||
if (ce == iface) {
|
||||
zend_error(E_ERROR, "Interface %s cannot not implement itself", ce->name);
|
||||
zend_error(E_ERROR, "Interface %s cannot implement itself", ce->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2614,7 +2652,7 @@ void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr
|
||||
opline->op2.u.opline_num = do_token->u.opline_num;
|
||||
SET_UNUSED(opline->op2);
|
||||
|
||||
do_end_loop(expr_open_bracket->u.opline_num TSRMLS_CC);
|
||||
do_end_loop(expr_open_bracket->u.opline_num, 0 TSRMLS_CC);
|
||||
|
||||
DEC_BPC(CG(active_op_array));
|
||||
}
|
||||
@@ -3005,7 +3043,7 @@ void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_ty
|
||||
}
|
||||
|
||||
if (access_type & ZEND_ACC_FINAL) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods",
|
||||
zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods and classes",
|
||||
CG(active_class_entry)->name, var_name->u.constant.value.str.val);
|
||||
}
|
||||
|
||||
@@ -3420,8 +3458,6 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
|
||||
zend_llist_element *dimension;
|
||||
zend_op *opline;
|
||||
znode last_container;
|
||||
int last_op_number;
|
||||
zend_op *last_op;
|
||||
|
||||
le = CG(list_llist).head;
|
||||
while (le) {
|
||||
@@ -3461,9 +3497,6 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
|
||||
}
|
||||
((list_llist_element *) le->data)->value = last_container;
|
||||
zend_llist_destroy(&((list_llist_element *) le->data)->dimensions);
|
||||
zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
|
||||
last_op_number = get_next_op_number(CG(active_op_array))-1;
|
||||
last_op = &CG(active_op_array)->opcodes[last_op_number];
|
||||
zend_do_assign(result, &((list_llist_element *) le->data)->var, &((list_llist_element *) le->data)->value TSRMLS_CC);
|
||||
zend_do_free(result TSRMLS_CC);
|
||||
le = le->next;
|
||||
@@ -3824,9 +3857,9 @@ void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znod
|
||||
|
||||
value_node = opline->result;
|
||||
|
||||
zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
|
||||
if (assign_by_ref) {
|
||||
/* Mark FE_FETCH as IS_VAR as it holds the data directly as a value */
|
||||
zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
|
||||
zend_do_assign_ref(NULL, value, &value_node TSRMLS_CC);
|
||||
} else {
|
||||
zend_do_assign(&dummy, value, &value_node TSRMLS_CC);
|
||||
@@ -3836,7 +3869,6 @@ void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znod
|
||||
if (key->op_type != IS_UNUSED) {
|
||||
znode key_node;
|
||||
|
||||
zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC);
|
||||
opline = &CG(active_op_array)->opcodes[as_token->u.opline_num+1];
|
||||
opline->result.op_type = IS_TMP_VAR;
|
||||
opline->result.u.EA.type = 0;
|
||||
@@ -3865,7 +3897,7 @@ void zend_do_foreach_end(znode *foreach_token, znode *as_token TSRMLS_DC)
|
||||
CG(active_op_array)->opcodes[foreach_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_RESET */
|
||||
CG(active_op_array)->opcodes[as_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_FETCH */
|
||||
|
||||
do_end_loop(as_token->u.opline_num TSRMLS_CC);
|
||||
do_end_loop(as_token->u.opline_num, 1 TSRMLS_CC);
|
||||
|
||||
zend_stack_top(&CG(foreach_copy_stack), (void **) &container_ptr);
|
||||
generate_free_foreach_copy(container_ptr TSRMLS_CC);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -274,6 +274,7 @@ ZEND_API int zend_get_constant_ex(char *name, uint name_len, zval *result, zend_
|
||||
zval_update_constant_ex(ret_constant, (void*)1, *ce TSRMLS_CC);
|
||||
*result = **ret_constant;
|
||||
zval_copy_ctor(result);
|
||||
INIT_PZVAL(result);
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+19
-31
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -645,7 +645,13 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
|
||||
if (((int)T->str_offset.offset < 0)) {
|
||||
zend_error(E_WARNING, "Illegal string offset: %d", T->str_offset.offset);
|
||||
break;
|
||||
if (!RETURN_VALUE_UNUSED(result)) {
|
||||
T(result->u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr);
|
||||
PZVAL_LOCK(*T(result->u.var).var.ptr_ptr);
|
||||
AI_USE_PTR(T(result->u.var).var);
|
||||
}
|
||||
FREE_OP_VAR_PTR(free_op1);
|
||||
return;
|
||||
}
|
||||
if (T->str_offset.offset >= Z_STRLEN_P(T->str_offset.str)) {
|
||||
zend_uint i;
|
||||
@@ -665,7 +671,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
|
||||
if (Z_TYPE_P(value)!=IS_STRING) {
|
||||
tmp = *value;
|
||||
if (op2->op_type & (IS_VAR|IS_CV)) {
|
||||
if (op2->op_type != IS_TMP_VAR) {
|
||||
zval_copy_ctor(&tmp);
|
||||
}
|
||||
convert_to_string(&tmp);
|
||||
@@ -674,16 +680,13 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
|
||||
Z_STRVAL_P(T->str_offset.str)[T->str_offset.offset] = Z_STRVAL_P(final_value)[0];
|
||||
|
||||
if (op2->op_type == IS_TMP_VAR) {
|
||||
if (final_value == &T(op2->u.var).tmp_var) {
|
||||
/* we can safely free final_value here
|
||||
* because separation is done only
|
||||
* in case op2->op_type == IS_VAR */
|
||||
STR_FREE(Z_STRVAL_P(final_value));
|
||||
}
|
||||
}
|
||||
if (final_value == &tmp) {
|
||||
zval_dtor(final_value);
|
||||
} else if (op2->op_type == IS_TMP_VAR) {
|
||||
/* we can safely free final_value here
|
||||
* because separation is done only
|
||||
* in case op2->op_type == IS_VAR */
|
||||
STR_FREE(Z_STRVAL_P(final_value));
|
||||
}
|
||||
/*
|
||||
* the value of an assignment to a string offset is undefined
|
||||
@@ -692,11 +695,11 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
} while (0);
|
||||
/* zval_ptr_dtor(&T->str_offset.str); Nuke this line if it doesn't cause a leak */
|
||||
|
||||
/* T(result->u.var).var.ptr_ptr = &EG(uninitialized_zval_ptr); */
|
||||
if (!RETURN_VALUE_UNUSED(result)) {
|
||||
T(result->u.var).var.ptr_ptr = &value;
|
||||
PZVAL_LOCK(*T(result->u.var).var.ptr_ptr);
|
||||
AI_USE_PTR(T(result->u.var).var);
|
||||
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
|
||||
ALLOC_ZVAL(T(result->u.var).var.ptr);
|
||||
INIT_PZVAL(T(result->u.var).var.ptr);
|
||||
ZVAL_STRINGL(T(result->u.var).var.ptr, Z_STRVAL_P(T->str_offset.str)+T->str_offset.offset, 1, 1);
|
||||
}
|
||||
FREE_OP_VAR_PTR(free_op1);
|
||||
return;
|
||||
@@ -736,18 +739,12 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
zend_uint refcount = variable_ptr->refcount;
|
||||
zval garbage;
|
||||
|
||||
if (type != IS_TMP_VAR) {
|
||||
value->refcount++;
|
||||
}
|
||||
garbage = *variable_ptr;
|
||||
*variable_ptr = *value;
|
||||
variable_ptr->refcount = refcount;
|
||||
variable_ptr->is_ref = 1;
|
||||
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
|
||||
variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
|
||||
if (type != IS_TMP_VAR) {
|
||||
value->refcount--;
|
||||
}
|
||||
zendi_zval_dtor(garbage);
|
||||
}
|
||||
} else {
|
||||
@@ -775,16 +772,12 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
|
||||
zend_uint refcount = variable_ptr->refcount;
|
||||
zval garbage;
|
||||
|
||||
if (type!=IS_TMP_VAR) {
|
||||
value->refcount++;
|
||||
}
|
||||
garbage = *variable_ptr;
|
||||
*variable_ptr = *value;
|
||||
variable_ptr->refcount = refcount;
|
||||
variable_ptr->is_ref = 1;
|
||||
if (type!=IS_TMP_VAR) {
|
||||
zendi_zval_copy_ctor(*variable_ptr);
|
||||
value->refcount--;
|
||||
}
|
||||
zendi_zval_dtor(garbage);
|
||||
}
|
||||
@@ -1234,12 +1227,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
|
||||
zval *container;
|
||||
|
||||
if (!container_ptr) {
|
||||
zend_error(E_WARNING, "Cannot use string offset as an array");
|
||||
if (result) {
|
||||
result->var.ptr_ptr = &EG(error_zval_ptr);
|
||||
PZVAL_LOCK(*result->var.ptr_ptr);
|
||||
}
|
||||
return;
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
|
||||
}
|
||||
|
||||
container = *container_ptr;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+33
-9
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -452,6 +452,19 @@ ZEND_API int zend_is_true(zval *op)
|
||||
#define IS_CONSTANT_VISITED(p) (Z_TYPE_P(p) & IS_VISITED_CONSTANT)
|
||||
#define MARK_CONSTANT_VISITED(p) Z_TYPE_P(p) |= IS_VISITED_CONSTANT
|
||||
|
||||
static void zval_deep_copy(zval **p)
|
||||
{
|
||||
zval *value;
|
||||
|
||||
ALLOC_ZVAL(value);
|
||||
*value = **p;
|
||||
Z_TYPE_P(value) &= ~IS_CONSTANT_INDEX;
|
||||
zval_copy_ctor(value);
|
||||
Z_TYPE_P(value) = Z_TYPE_PP(p);
|
||||
INIT_PZVAL(value);
|
||||
*p = value;
|
||||
}
|
||||
|
||||
ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC)
|
||||
{
|
||||
zval *p = *pp;
|
||||
@@ -503,6 +516,16 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
|
||||
p = *pp;
|
||||
Z_TYPE_P(p) = IS_ARRAY;
|
||||
|
||||
if (!inline_change) {
|
||||
zval *tmp;
|
||||
HashTable *tmp_ht = NULL;
|
||||
|
||||
ALLOC_HASHTABLE(tmp_ht);
|
||||
zend_hash_init(tmp_ht, zend_hash_num_elements(Z_ARRVAL_P(p)), NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(tmp_ht, Z_ARRVAL_P(p), (copy_ctor_func_t) zval_deep_copy, (void *) &tmp, sizeof(zval *));
|
||||
Z_ARRVAL_P(p) = tmp_ht;
|
||||
}
|
||||
|
||||
/* First go over the array and see if there are any constant indices */
|
||||
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));
|
||||
while (zend_hash_get_current_data(Z_ARRVAL_P(p), (void **) &element)==SUCCESS) {
|
||||
@@ -1034,19 +1057,20 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
|
||||
int retval;
|
||||
char *lc_name;
|
||||
zval *exception;
|
||||
char dummy = 1;
|
||||
zend_fcall_info fcall_info;
|
||||
zend_fcall_info_cache fcall_cache;
|
||||
char dummy = 1;
|
||||
ALLOCA_FLAG(use_heap)
|
||||
|
||||
if (name == NULL || !name_length) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
lc_name = do_alloca(name_length + 1);
|
||||
lc_name = do_alloca_with_limit(name_length + 1, use_heap);
|
||||
zend_str_tolower_copy(lc_name, name, name_length);
|
||||
|
||||
if (zend_hash_find(EG(class_table), lc_name, name_length+1, (void **) ce) == SUCCESS) {
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1054,7 +1078,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
|
||||
* (doesn't impact fuctionality of __autoload()
|
||||
*/
|
||||
if (!use_autoload || zend_is_compiling(TSRMLS_C)) {
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -1064,7 +1088,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
|
||||
}
|
||||
|
||||
if (zend_hash_add(EG(in_autoload), lc_name, name_length+1, (void**)&dummy, sizeof(char), NULL) == FAILURE) {
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -1102,12 +1126,12 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
|
||||
|
||||
if (retval == FAILURE) {
|
||||
EG(exception) = exception;
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (EG(exception) && exception) {
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
zend_error(E_ERROR, "Function %s(%s) threw an exception of type '%s'", ZEND_AUTOLOAD_FUNC_NAME, name, Z_OBJCE_P(EG(exception))->name);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -1119,7 +1143,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload,
|
||||
}
|
||||
|
||||
retval = zend_hash_find(EG(class_table), lc_name, name_length + 1, (void **) ce);
|
||||
free_alloca(lc_name);
|
||||
free_alloca_with_limit(lc_name, use_heap);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -243,7 +243,7 @@ void *zend_mh_bundle_load(char* bundle_path)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bundle_handle = NSLinkModule(bundle_image, bundle_path, NSLINKMODULE_OPTION_PRIVATE);
|
||||
bundle_handle = NSLinkModule(bundle_image, bundle_path, NSLINKMODULE_OPTION_NONE);
|
||||
NSDestroyObjectFileImage(bundle_image);
|
||||
|
||||
/* call the init function of the bundle */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+14
-3
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -177,6 +177,19 @@ 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");
|
||||
@@ -185,8 +198,6 @@ done:
|
||||
zend_printf("</code>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API void zend_strip(TSRMLS_D)
|
||||
{
|
||||
zval token;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+135
-114
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "zend_operators.h"
|
||||
#include "zend_strtod.h"
|
||||
|
||||
static HashTable *registered_zend_ini_directives;
|
||||
static HashTable *registered_zend_ini_directives;
|
||||
|
||||
#define NO_VALUE_PLAINTEXT "no value"
|
||||
#define NO_VALUE_HTML "<i>no value</i>"
|
||||
@@ -34,7 +34,7 @@ static HashTable *registered_zend_ini_directives;
|
||||
/*
|
||||
* hash_apply functions
|
||||
*/
|
||||
static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number TSRMLS_DC)
|
||||
static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
if (ini_entry->module_number == *module_number) {
|
||||
return 1;
|
||||
@@ -42,16 +42,16 @@ static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC)
|
||||
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
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 */
|
||||
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);
|
||||
} zend_end_try();
|
||||
}
|
||||
@@ -63,49 +63,54 @@ static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS
|
||||
ini_entry->modified = 0;
|
||||
ini_entry->orig_value = NULL;
|
||||
ini_entry->orig_value_length = 0;
|
||||
if (ini_entry->modifiable >= (1 << 3)) {
|
||||
ini_entry->modifiable >>= 3;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int zend_restore_ini_entry_wrapper(zend_ini_entry **ini_entry TSRMLS_DC)
|
||||
static int zend_restore_ini_entry_wrapper(zend_ini_entry **ini_entry TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_restore_ini_entry_cb(*ini_entry, ZEND_INI_STAGE_DEACTIVATE TSRMLS_CC);
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* Startup / shutdown
|
||||
*/
|
||||
ZEND_API int zend_ini_startup(TSRMLS_D)
|
||||
ZEND_API int zend_ini_startup(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
registered_zend_ini_directives = (HashTable *) malloc(sizeof(HashTable));
|
||||
|
||||
EG(ini_directives) = registered_zend_ini_directives;
|
||||
EG(modified_ini_directives) = NULL;
|
||||
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0)==FAILURE) {
|
||||
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API int zend_ini_shutdown(TSRMLS_D)
|
||||
ZEND_API int zend_ini_shutdown(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
zend_hash_destroy(EG(ini_directives));
|
||||
free(EG(ini_directives));
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API int zend_ini_global_shutdown(TSRMLS_D)
|
||||
ZEND_API int zend_ini_global_shutdown(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
zend_hash_destroy(registered_zend_ini_directives);
|
||||
free(registered_zend_ini_directives);
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API int zend_ini_deactivate(TSRMLS_D)
|
||||
ZEND_API int zend_ini_deactivate(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
if (EG(modified_ini_directives)) {
|
||||
zend_hash_apply(EG(modified_ini_directives), (apply_func_t) zend_restore_ini_entry_wrapper TSRMLS_CC);
|
||||
@@ -115,54 +120,54 @@ ZEND_API int zend_ini_deactivate(TSRMLS_D)
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
#ifdef ZTS
|
||||
ZEND_API int zend_copy_ini_directives(TSRMLS_D)
|
||||
ZEND_API int zend_copy_ini_directives(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
zend_ini_entry ini_entry;
|
||||
|
||||
EG(modified_ini_directives) = NULL;
|
||||
EG(ini_directives) = (HashTable *) malloc(sizeof(HashTable));
|
||||
if (zend_hash_init_ex(EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0)==FAILURE) {
|
||||
if (zend_hash_init_ex(EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
zend_hash_copy(EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
|
||||
static int ini_key_compare(const void *a, const void *b TSRMLS_DC)
|
||||
static int ini_key_compare(const void *a, const void *b TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
Bucket *f;
|
||||
Bucket *s;
|
||||
|
||||
|
||||
f = *((Bucket **) a);
|
||||
s = *((Bucket **) b);
|
||||
|
||||
if (f->nKeyLength==0 && s->nKeyLength==0) { /* both numeric */
|
||||
if (f->nKeyLength == 0 && s->nKeyLength == 0) { /* both numeric */
|
||||
return ZEND_NORMALIZE_BOOL(f->nKeyLength - s->nKeyLength);
|
||||
} else if (f->nKeyLength==0) { /* f is numeric, s is not */
|
||||
} else if (f->nKeyLength == 0) { /* f is numeric, s is not */
|
||||
return -1;
|
||||
} else if (s->nKeyLength==0) { /* s is numeric, f is not */
|
||||
} else if (s->nKeyLength == 0) { /* s is numeric, f is not */
|
||||
return 1;
|
||||
} else { /* both strings */
|
||||
return zend_binary_strcasecmp(f->arKey, f->nKeyLength, s->arKey, s->nKeyLength);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void zend_ini_sort_entries(TSRMLS_D)
|
||||
ZEND_API void zend_ini_sort_entries(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
zend_hash_sort(EG(ini_directives), zend_qsort, ini_key_compare, 0 TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* Registration / unregistration
|
||||
*/
|
||||
|
||||
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC)
|
||||
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *p = ini_entry;
|
||||
zend_ini_entry *hashed_ini_entry;
|
||||
@@ -187,15 +192,15 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
|
||||
while (p->name) {
|
||||
p->module_number = module_number;
|
||||
config_directive_success = 0;
|
||||
if (zend_hash_add(directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
|
||||
if (zend_hash_add(directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry) == FAILURE) {
|
||||
zend_unregister_ini_entries(module_number TSRMLS_CC);
|
||||
return FAILURE;
|
||||
}
|
||||
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value))==SUCCESS) {
|
||||
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value)) == SUCCESS) {
|
||||
if (!hashed_ini_entry->on_modify
|
||||
|| hashed_ini_entry->on_modify(hashed_ini_entry, default_value.value.str.val, default_value.value.str.len, hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC)==SUCCESS) {
|
||||
hashed_ini_entry->value = default_value.value.str.val;
|
||||
hashed_ini_entry->value_length = default_value.value.str.len;
|
||||
|| hashed_ini_entry->on_modify(hashed_ini_entry, Z_STRVAL(default_value), Z_STRLEN(default_value), hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC) == SUCCESS) {
|
||||
hashed_ini_entry->value = Z_STRVAL(default_value);
|
||||
hashed_ini_entry->value_length = Z_STRLEN(default_value);
|
||||
config_directive_success = 1;
|
||||
}
|
||||
}
|
||||
@@ -207,52 +212,63 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC)
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_hash_apply_with_argument(registered_zend_ini_directives, (apply_func_arg_t) zend_remove_ini_entries, (void *) &module_number TSRMLS_CC);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
#ifdef ZTS
|
||||
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC)
|
||||
static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
if (p->on_modify) {
|
||||
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3, stage TSRMLS_CC);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC)
|
||||
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_ini_refresh_cache, (void *)(zend_intptr_t) stage TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage) /* {{{ */
|
||||
{
|
||||
return zend_alter_ini_entry_ex(name, name_length, new_value, new_value_length, modify_type, stage, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)
|
||||
ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage, int force_change) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
char *duplicate;
|
||||
zend_bool modifiable;
|
||||
zend_bool modified;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
modifiable = ini_entry->modifiable;
|
||||
modified = ini_entry->modified;
|
||||
|
||||
if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) {
|
||||
ini_entry->modifiable = ZEND_INI_SYSTEM;
|
||||
/* only touch lower bits */
|
||||
ini_entry->modifiable = (ini_entry->modifiable & (ZEND_INI_ALL << 3)) | ZEND_INI_SYSTEM;
|
||||
}
|
||||
|
||||
if (!(ini_entry->modifiable & modify_type)) {
|
||||
return FAILURE;
|
||||
if (!force_change) {
|
||||
if (!(ini_entry->modifiable & modify_type)) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
modified = ini_entry->modified;
|
||||
|
||||
if (!EG(modified_ini_directives)) {
|
||||
ALLOC_HASHTABLE(EG(modified_ini_directives));
|
||||
zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
|
||||
@@ -260,6 +276,8 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value,
|
||||
if (!modified) {
|
||||
ini_entry->orig_value = ini_entry->value;
|
||||
ini_entry->orig_value_length = ini_entry->value_length;
|
||||
/* store orginial value in the upper bits */
|
||||
ini_entry->modifiable = (modifiable << 3) | ini_entry->modifiable;
|
||||
ini_entry->modified = 1;
|
||||
zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL);
|
||||
}
|
||||
@@ -267,7 +285,7 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value,
|
||||
duplicate = estrndup(new_value, new_value_length);
|
||||
|
||||
if (!ini_entry->on_modify
|
||||
|| ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC)==SUCCESS) {
|
||||
|| ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC) == SUCCESS) {
|
||||
if (modified && ini_entry->orig_value != ini_entry->value) { /* we already changed the value, free the changed value */
|
||||
efree(ini_entry->value);
|
||||
}
|
||||
@@ -279,15 +297,15 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value,
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==FAILURE ||
|
||||
(stage == ZEND_INI_STAGE_RUNTIME && (ini_entry->modifiable & ZEND_INI_USER) == 0)) {
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == FAILURE ||
|
||||
(stage == ZEND_INI_STAGE_RUNTIME && (ini_entry->modifiable & ZEND_INI_USER) == 0)) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@@ -295,35 +313,34 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
|
||||
zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC);
|
||||
zend_hash_del(EG(modified_ini_directives), name, name_length);
|
||||
}
|
||||
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type))
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type)) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
if (zend_hash_find(registered_zend_ini_directives, name, name_length, (void **) &ini_entry)==FAILURE) {
|
||||
if (zend_hash_find(registered_zend_ini_directives, name, name_length, (void **) &ini_entry) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
ini_entry->displayer = displayer;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* Data retrieval
|
||||
*/
|
||||
|
||||
ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
|
||||
ZEND_API long zend_ini_long(char *name, uint name_length, int orig) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
|
||||
} else if (ini_entry->value) {
|
||||
@@ -333,14 +350,14 @@ ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return (double) (ini_entry->orig_value ? zend_strtod(ini_entry->orig_value, NULL) : 0.0);
|
||||
} else if (ini_entry->value) {
|
||||
@@ -350,14 +367,14 @@ ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry)==SUCCESS) {
|
||||
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == SUCCESS) {
|
||||
if (orig && ini_entry->modified) {
|
||||
return ini_entry->orig_value;
|
||||
} else {
|
||||
@@ -367,9 +384,10 @@ ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
|
||||
|
||||
return "";
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if TONY_20070307
|
||||
static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
|
||||
#if TONY_20070307
|
||||
static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) /* {{{ */
|
||||
{
|
||||
if (ini_entry->displayer) {
|
||||
ini_entry->displayer(ini_entry, type);
|
||||
@@ -377,18 +395,18 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
|
||||
char *display_string;
|
||||
uint display_string_length;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (ini_entry->orig_value) {
|
||||
display_string = ini_entry->orig_value;
|
||||
display_string_length = ini_entry->orig_value_length;
|
||||
} else {
|
||||
if (zend_uv.html_errors) {
|
||||
display_string = NO_VALUE_HTML;
|
||||
display_string_length = sizeof(NO_VALUE_HTML)-1;
|
||||
display_string_length = sizeof(NO_VALUE_HTML) - 1;
|
||||
} else {
|
||||
display_string = NO_VALUE_PLAINTEXT;
|
||||
display_string_length = sizeof(NO_VALUE_PLAINTEXT)-1;
|
||||
}
|
||||
display_string_length = sizeof(NO_VALUE_PLAINTEXT) - 1;
|
||||
}
|
||||
}
|
||||
} else if (ini_entry->value && ini_entry->value[0]) {
|
||||
display_string = ini_entry->value;
|
||||
@@ -396,23 +414,24 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
|
||||
} else {
|
||||
if (zend_uv.html_errors) {
|
||||
display_string = NO_VALUE_HTML;
|
||||
display_string_length = sizeof(NO_VALUE_HTML)-1;
|
||||
display_string_length = sizeof(NO_VALUE_HTML) - 1;
|
||||
} else {
|
||||
display_string = NO_VALUE_PLAINTEXT;
|
||||
display_string_length = sizeof(NO_VALUE_PLAINTEXT)-1;
|
||||
}
|
||||
display_string_length = sizeof(NO_VALUE_PLAINTEXT) - 1;
|
||||
}
|
||||
}
|
||||
ZEND_WRITE(display_string, display_string_length);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
ZEND_INI_DISP(zend_ini_boolean_displayer_cb)
|
||||
ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
|
||||
{
|
||||
int value, tmp_value_len;
|
||||
char *tmp_value;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
tmp_value = (ini_entry->orig_value ? ini_entry->orig_value : NULL );
|
||||
tmp_value_len = ini_entry->orig_value_length;
|
||||
} else if (ini_entry->value) {
|
||||
@@ -423,32 +442,33 @@ ZEND_INI_DISP(zend_ini_boolean_displayer_cb)
|
||||
tmp_value_len = 0;
|
||||
}
|
||||
|
||||
if (tmp_value_len == 4 && strcasecmp(tmp_value, "true") == 0) {
|
||||
value = 1;
|
||||
if (tmp_value) {
|
||||
if (tmp_value_len == 4 && strcasecmp(tmp_value, "true") == 0) {
|
||||
value = 1;
|
||||
} else if (tmp_value_len == 3 && strcasecmp(tmp_value, "yes") == 0) {
|
||||
value = 1;
|
||||
} else if (tmp_value_len == 2 && strcasecmp(tmp_value, "on") == 0) {
|
||||
value = 1;
|
||||
} else {
|
||||
value = atoi(tmp_value);
|
||||
}
|
||||
} else {
|
||||
value = 0;
|
||||
}
|
||||
else if (tmp_value_len == 3 && strcasecmp(tmp_value, "yes") == 0) {
|
||||
value = 1;
|
||||
}
|
||||
else if (tmp_value_len == 2 && strcasecmp(tmp_value, "on") == 0) {
|
||||
value = 1;
|
||||
}
|
||||
else {
|
||||
value = atoi(tmp_value);
|
||||
}
|
||||
|
||||
|
||||
if (value) {
|
||||
ZEND_PUTS("On");
|
||||
} else {
|
||||
ZEND_PUTS("Off");
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_INI_DISP(zend_ini_color_displayer_cb)
|
||||
ZEND_INI_DISP(zend_ini_color_displayer_cb) /* {{{ */
|
||||
{
|
||||
char *value;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
value = ini_entry->orig_value;
|
||||
} else if (ini_entry->value) {
|
||||
value = ini_entry->value;
|
||||
@@ -460,22 +480,22 @@ ZEND_INI_DISP(zend_ini_color_displayer_cb)
|
||||
zend_printf("<font style=\"color: %s\">%s</font>", value, value);
|
||||
} else {
|
||||
ZEND_PUTS(value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (zend_uv.html_errors) {
|
||||
ZEND_PUTS(NO_VALUE_HTML);
|
||||
} else {
|
||||
ZEND_PUTS(NO_VALUE_PLAINTEXT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_INI_DISP(display_link_numbers)
|
||||
ZEND_INI_DISP(display_link_numbers) /* {{{ */
|
||||
{
|
||||
char *value;
|
||||
|
||||
if (type==ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
value = ini_entry->orig_value;
|
||||
} else if (ini_entry->value) {
|
||||
value = ini_entry->value;
|
||||
@@ -484,18 +504,17 @@ ZEND_INI_DISP(display_link_numbers)
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (atoi(value)==-1) {
|
||||
if (atoi(value) == -1) {
|
||||
ZEND_PUTS("Unlimited");
|
||||
} else {
|
||||
zend_printf("%s", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Standard message handlers */
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateBool)
|
||||
ZEND_API ZEND_INI_MH(OnUpdateBool) /* {{{ */
|
||||
{
|
||||
zend_bool *p;
|
||||
#ifndef ZTS
|
||||
@@ -508,23 +527,23 @@ ZEND_API ZEND_INI_MH(OnUpdateBool)
|
||||
|
||||
p = (zend_bool *) (base+(size_t) mh_arg1);
|
||||
|
||||
if (new_value_length==2 && strcasecmp("on", new_value)==0) {
|
||||
if (new_value_length == 2 && strcasecmp("on", new_value) == 0) {
|
||||
*p = (zend_bool) 1;
|
||||
}
|
||||
else if (new_value_length==3 && strcasecmp("yes", new_value)==0) {
|
||||
}
|
||||
else if (new_value_length == 3 && strcasecmp("yes", new_value) == 0) {
|
||||
*p = (zend_bool) 1;
|
||||
}
|
||||
else if (new_value_length==4 && strcasecmp("true", new_value)==0) {
|
||||
}
|
||||
else if (new_value_length == 4 && strcasecmp("true", new_value) == 0) {
|
||||
*p = (zend_bool) 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
*p = (zend_bool) atoi(new_value);
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateLong)
|
||||
ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */
|
||||
{
|
||||
long *p;
|
||||
#ifndef ZTS
|
||||
@@ -540,6 +559,7 @@ ZEND_API ZEND_INI_MH(OnUpdateLong)
|
||||
*p = zend_atoi(new_value, new_value_length);
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateLongGEZero)
|
||||
{
|
||||
@@ -562,9 +582,9 @@ ZEND_API ZEND_INI_MH(OnUpdateLongGEZero)
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateReal)
|
||||
ZEND_API ZEND_INI_MH(OnUpdateReal) /* {{{ */
|
||||
{
|
||||
double *p;
|
||||
#ifndef ZTS
|
||||
@@ -580,9 +600,9 @@ ZEND_API ZEND_INI_MH(OnUpdateReal)
|
||||
*p = zend_strtod(new_value, NULL);
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateString)
|
||||
ZEND_API ZEND_INI_MH(OnUpdateString) /* {{{ */
|
||||
{
|
||||
char **p;
|
||||
#ifndef ZTS
|
||||
@@ -598,9 +618,9 @@ ZEND_API ZEND_INI_MH(OnUpdateString)
|
||||
*p = new_value;
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty)
|
||||
ZEND_API ZEND_INI_MH(OnUpdateStringUnempty) /* {{{ */
|
||||
{
|
||||
char **p;
|
||||
#ifndef ZTS
|
||||
@@ -620,6 +640,7 @@ ZEND_API ZEND_INI_MH(OnUpdateStringUnempty)
|
||||
*p = new_value;
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -96,6 +96,7 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
|
||||
ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC);
|
||||
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC);
|
||||
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
|
||||
ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage, int force_change);
|
||||
ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage);
|
||||
ZEND_API void display_ini_entries(zend_module_entry *module);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -551,7 +551,7 @@ non_empty_for_expr:
|
||||
|
||||
expr_without_variable:
|
||||
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
|
||||
| variable '=' expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
|
||||
| variable '=' expr { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
|
||||
| variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
|
||||
| variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
|
||||
| T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
|
||||
@@ -740,13 +740,13 @@ r_variable:
|
||||
|
||||
|
||||
w_variable:
|
||||
variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $$ = $1; }
|
||||
{ zend_check_writable_variable(&$1); }
|
||||
variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); $$ = $1;
|
||||
zend_check_writable_variable(&$1); }
|
||||
;
|
||||
|
||||
rw_variable:
|
||||
variable { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); $$ = $1; }
|
||||
{ zend_check_writable_variable(&$1); }
|
||||
variable { zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); $$ = $1;
|
||||
zend_check_writable_variable(&$1); }
|
||||
;
|
||||
|
||||
variable:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
@@ -723,7 +723,7 @@ ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, si
|
||||
|
||||
/* TODO: support widechars */
|
||||
|
||||
for (n = 0; n < sizeof(buf) && (c = zend_stream_getc(yyin TSRMLS_CC)) != EOF && c != '\n'; ++n) {
|
||||
for (n = 0; n < len && (c = zend_stream_getc(yyin TSRMLS_CC)) != EOF && c != '\n'; ++n) {
|
||||
buf[n] = (char)c;
|
||||
}
|
||||
if (c == '\n') {
|
||||
@@ -731,8 +731,8 @@ ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, si
|
||||
}
|
||||
|
||||
SCNG(script_org_size) = n;
|
||||
SCNG(script_org) = (char*)emalloc(SCNG(script_org_size)+1);
|
||||
memcpy(SCNG(script_org)+SCNG(script_org_size)-n, buf, n);
|
||||
SCNG(script_org) = (char*)emalloc(SCNG(script_org_size) + 1);
|
||||
memcpy(SCNG(script_org), buf, n);
|
||||
|
||||
return n;
|
||||
}
|
||||
@@ -749,29 +749,18 @@ ZEND_API int zend_multibyte_read_script(TSRMLS_D)
|
||||
SCNG(script_org) = NULL;
|
||||
SCNG(script_org_size) = 0;
|
||||
|
||||
for (;;) {
|
||||
n = zend_stream_read(yyin, buf, sizeof(buf) TSRMLS_CC);
|
||||
if (n <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (; (n = zend_stream_read(yyin, buf, sizeof(buf) TSRMLS_CC)) > 0; ) {
|
||||
SCNG(script_org_size) += n;
|
||||
if (SCNG(script_org)) {
|
||||
SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size)+1);
|
||||
} else {
|
||||
SCNG(script_org) = (char*)emalloc(SCNG(script_org_size)+1);
|
||||
}
|
||||
memcpy(SCNG(script_org)+SCNG(script_org_size)-n, buf, n);
|
||||
SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size));
|
||||
memcpy(SCNG(script_org) + SCNG(script_org_size) - n, buf, n);
|
||||
}
|
||||
|
||||
if (n < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!SCNG(script_org)) {
|
||||
SCNG(script_org) = emalloc(SCNG(script_org_size)+1);
|
||||
}
|
||||
*(SCNG(script_org)+SCNG(script_org_size)) = (char)NULL;
|
||||
SCNG(script_org) = (char*)erealloc(SCNG(script_org), SCNG(script_org_size) + 1);
|
||||
*(SCNG(script_org)+SCNG(script_org_size)) = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -819,6 +808,14 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
|
||||
*t++ = '\t';
|
||||
zendlval->value.str.len--;
|
||||
break;
|
||||
case 'f':
|
||||
*t++ = '\f';
|
||||
zendlval->value.str.len--;
|
||||
break;
|
||||
case 'v':
|
||||
*t++ = '\v';
|
||||
zendlval->value.str.len--;
|
||||
break;
|
||||
case '"':
|
||||
case '`':
|
||||
if (*s != quote_type) {
|
||||
@@ -1922,8 +1919,13 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
|
||||
if (yyleng > CG(heredoc_len) && !memcmp(end - CG(heredoc_len), CG(heredoc), CG(heredoc_len))) {
|
||||
int len = yyleng - CG(heredoc_len) - 2; /* 2 for newline before and after label */
|
||||
|
||||
if (len > 0 && yytext[len - 1] == '\r' && yytext[len] == '\n') {
|
||||
len--;
|
||||
/* May have matched fooLABEL; make sure there's a newline before it */
|
||||
if (yytext[len] != '\n') {
|
||||
if (yytext[len] != '\r') {
|
||||
goto wrong_label;
|
||||
}
|
||||
} else if (len > 0 && yytext[len - 1] == '\r') {
|
||||
len--; /* Windows newline */
|
||||
}
|
||||
|
||||
/* Go back before last label char, to match in ST_END_HEREDOC state */
|
||||
@@ -1940,6 +1942,7 @@ HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({
|
||||
} else {
|
||||
/* Go back to end of label, so the next match works correctly in case of
|
||||
* a variable or another label at the beginning of the next line */
|
||||
wrong_label:
|
||||
yyless(yyleng - 1);
|
||||
yymore();
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Zend Engine |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1998-2007 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
| Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.00 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
Loaded 100 of 3132 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user