mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-16 05:26:38 +00:00
Compare commits
578
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12a6ea6fff | ||
|
|
7644cb4436 | ||
|
|
2a24558178 | ||
|
|
2637ce9fb0 | ||
|
|
38faa59bc4 | ||
|
|
57bf3eb6ca | ||
|
|
0e9fe5a2c2 | ||
|
|
29acd17ec2 | ||
|
|
7d14f70776 | ||
|
|
3d76289c59 | ||
|
|
eabb9be2ac | ||
|
|
f9207e3187 | ||
|
|
a0eb5848b5 | ||
|
|
cba0322c81 | ||
|
|
fc6e70d8e4 | ||
|
|
1504071cb1 | ||
|
|
5efdfee8c6 | ||
|
|
03fd10c479 | ||
|
|
75eeee8f24 | ||
|
|
0aa36e2d97 | ||
|
|
0f53b4e515 | ||
|
|
76ba9b44b4 | ||
|
|
3dc4f14c6b | ||
|
|
3e0b63312e | ||
|
|
689d1d9e4b | ||
|
|
686c7fec26 | ||
|
|
85ef85a0b4 | ||
|
|
f561727ee0 | ||
|
|
c8e40e49d7 | ||
|
|
63d87a0adb | ||
|
|
06c183b761 | ||
|
|
aef55bc5f3 | ||
|
|
9f045cd40e | ||
|
|
094bcdff8b | ||
|
|
334e62a77d | ||
|
|
3da811a124 | ||
|
|
f915973c1e | ||
|
|
cd62a70863 | ||
|
|
92fa280b96 | ||
|
|
24c87d760d | ||
|
|
2024790fd2 | ||
|
|
d506ce8d94 | ||
|
|
4adcc3c7bc | ||
|
|
4c76006fe3 | ||
|
|
964eff5276 | ||
|
|
085e8b781c | ||
|
|
761c62267f | ||
|
|
f719d3707d | ||
|
|
dd92188d76 | ||
|
|
7111501381 | ||
|
|
e16265aa0e | ||
|
|
688b347d84 | ||
|
|
8cf9513bb9 | ||
|
|
3239a25e53 | ||
|
|
f28cff1925 | ||
|
|
c70397b3a9 | ||
|
|
f13f4bc872 | ||
|
|
222e0bc0f6 | ||
|
|
523da85c11 | ||
|
|
05abc63d14 | ||
|
|
dbeef88661 | ||
|
|
2ba369cdfa | ||
|
|
a9a2eb4a14 | ||
|
|
ac15afe9c1 | ||
|
|
4f3ab10786 | ||
|
|
8ed386997f | ||
|
|
a40667d756 | ||
|
|
534395e4ae | ||
|
|
2a545be57f | ||
|
|
167e51f36c | ||
|
|
abb7038cbf | ||
|
|
ac4f3422bc | ||
|
|
9ea04e1e46 | ||
|
|
1ac484d1a1 | ||
|
|
78f10489ca | ||
|
|
5f1b91a6bf | ||
|
|
4415b3af51 | ||
|
|
c8462df127 | ||
|
|
f061627899 | ||
|
|
e6c213b8ea | ||
|
|
93a4e0d1fa | ||
|
|
f16059d697 | ||
|
|
61d97af18b | ||
|
|
a8b4724747 | ||
|
|
caf792940f | ||
|
|
64f21f63ad | ||
|
|
cdab5577c0 | ||
|
|
63f65b6e8f | ||
|
|
7a8d9ad16a | ||
|
|
f5570be3a9 | ||
|
|
ff26185322 | ||
|
|
ce96fd6b07 | ||
|
|
75631ab8ac | ||
|
|
60ad3e54af | ||
|
|
95a88f04a9 | ||
|
|
a2434bb66c | ||
|
|
267634b766 | ||
|
|
a31f379367 | ||
|
|
e516b7a964 | ||
|
|
6f7821a82d | ||
|
|
4ced44323d | ||
|
|
7b27de9f0b | ||
|
|
d225fe4e58 | ||
|
|
5d2e201c3d | ||
|
|
7716873a5b | ||
|
|
404580d95c | ||
|
|
bbf58f9234 | ||
|
|
5ddbeffc6f | ||
|
|
49493e226d | ||
|
|
2bc233e856 | ||
|
|
f819965513 | ||
|
|
2ea52b1fb4 | ||
|
|
4af7de49aa | ||
|
|
e6de920a27 | ||
|
|
1045aa2a7c | ||
|
|
d91c4be0d6 | ||
|
|
f6b3d22218 | ||
|
|
5ef0100b4d | ||
|
|
c95477e729 | ||
|
|
6958cb4a14 | ||
|
|
46983d532e | ||
|
|
e0858b424a | ||
|
|
a0ccf0f14a | ||
|
|
8901635d73 | ||
|
|
bb1dbdf62c | ||
|
|
28b41c811d | ||
|
|
9b4999881f | ||
|
|
47713462ce | ||
|
|
0e72e5897e | ||
|
|
c095bec250 | ||
|
|
3332c5be08 | ||
|
|
b343748d56 | ||
|
|
c28f44e409 | ||
|
|
5a416465a0 | ||
|
|
da29092159 | ||
|
|
7bc07ff884 | ||
|
|
8dd82c5fde | ||
|
|
71a8b75c51 | ||
|
|
8977fc8ace | ||
|
|
d7e8aaea46 | ||
|
|
0a1e29d74b | ||
|
|
4cc8073839 | ||
|
|
7e56681670 | ||
|
|
07abcdc031 | ||
|
|
f4b2664e2c | ||
|
|
29bdf30880 | ||
|
|
7a42845d80 | ||
|
|
2bf58d8c70 | ||
|
|
77d160772f | ||
|
|
4df2980242 | ||
|
|
84dc845ff8 | ||
|
|
89d372ba27 | ||
|
|
22f7998a0d | ||
|
|
b01b2e6d0b | ||
|
|
817776d1b9 | ||
|
|
53544e36f2 | ||
|
|
c3557ba32e | ||
|
|
f407fc4e01 | ||
|
|
0399b83ccb | ||
|
|
e6bef6735f | ||
|
|
50863932a6 | ||
|
|
1db7472a73 | ||
|
|
f4927c28bc | ||
|
|
996f45b688 | ||
|
|
7636635ec5 | ||
|
|
837391a9a7 | ||
|
|
8342c36f09 | ||
|
|
b84e262f63 | ||
|
|
dd038a9c89 | ||
|
|
68107ae1c3 | ||
|
|
8efec79ffe | ||
|
|
e61005f712 | ||
|
|
6c3ddc70ed | ||
|
|
535033074a | ||
|
|
9d25e7ee7b | ||
|
|
21638aed88 | ||
|
|
815d0e549b | ||
|
|
7b4cbadfce | ||
|
|
7ded7577b2 | ||
|
|
a1632696a8 | ||
|
|
e547a0dfec | ||
|
|
309aefc7e7 | ||
|
|
3ac257f344 | ||
|
|
cd63986283 | ||
|
|
6e0f2daf65 | ||
|
|
f4d15d8226 | ||
|
|
231da1a5cb | ||
|
|
c10af225c4 | ||
|
|
cd6ea54deb | ||
|
|
443bedf204 | ||
|
|
4c34cd9f38 | ||
|
|
db75ce41a3 | ||
|
|
ee80871a15 | ||
|
|
b5b4f94a4c | ||
|
|
0086bc8a96 | ||
|
|
762a1b2d26 | ||
|
|
384cd8cda5 | ||
|
|
5721132c29 | ||
|
|
3cb6a460a6 | ||
|
|
eabf03f436 | ||
|
|
6887b97a8d | ||
|
|
924bb78167 | ||
|
|
4cedb6d08a | ||
|
|
f7c44c8c4d | ||
|
|
8a2a6dbe21 | ||
|
|
8c5921bfb8 | ||
|
|
6ab767262c | ||
|
|
6a289f4d10 | ||
|
|
946f95c0fc | ||
|
|
3ab0b74de9 | ||
|
|
a3cef7b435 | ||
|
|
30d6cc8919 | ||
|
|
c99251f87e | ||
|
|
db633fb71d | ||
|
|
b88f7753a1 | ||
|
|
14a54b903e | ||
|
|
d46dcd301e | ||
|
|
99b613cbc8 | ||
|
|
40c3aefafb | ||
|
|
4e2fd7eeba | ||
|
|
485a094334 | ||
|
|
93d7715e7b | ||
|
|
f7582fc43b | ||
|
|
2d2d6f84ba | ||
|
|
a4252ab2be | ||
|
|
8d34fe0d22 | ||
|
|
1f86f6be31 | ||
|
|
4f62c099cd | ||
|
|
1cca9d4bf1 | ||
|
|
062ddaa700 | ||
|
|
58a15c2cf5 | ||
|
|
82de444f9a | ||
|
|
eb2908c3f7 | ||
|
|
25e84b6a23 | ||
|
|
3daf54ffa0 | ||
|
|
548661d96d | ||
|
|
e97a07ae9e | ||
|
|
bd73903efb | ||
|
|
421b86ed5e | ||
|
|
ccaff0e994 | ||
|
|
1b60eb8813 | ||
|
|
455db21e06 | ||
|
|
bf7e6f930c | ||
|
|
bf6440d00a | ||
|
|
c4e145b0bc | ||
|
|
33c99f9a44 | ||
|
|
efe22e3bfa | ||
|
|
87edd143ed | ||
|
|
df2261df2a | ||
|
|
234181f690 | ||
|
|
4c88033aa2 | ||
|
|
b3a3c8f7a6 | ||
|
|
7e61cffb0d | ||
|
|
54624f9902 | ||
|
|
a4ad111454 | ||
|
|
9f73a4e045 | ||
|
|
4c63a2232d | ||
|
|
5aca10ee13 | ||
|
|
159ed311cc | ||
|
|
cacd5ad924 | ||
|
|
1f9a7fd758 | ||
|
|
ee2a82e327 | ||
|
|
122179478a | ||
|
|
4113fad4ec | ||
|
|
71bbb24ff0 | ||
|
|
2d925fb216 | ||
|
|
817c28c867 | ||
|
|
090a9b3331 | ||
|
|
4b0927b042 | ||
|
|
4d8503a212 | ||
|
|
bc6e920ebc | ||
|
|
b55d4ecb41 | ||
|
|
60327d87a7 | ||
|
|
5c6f0ebeab | ||
|
|
104bf57ae7 | ||
|
|
5f9956397f | ||
|
|
0db999a94f | ||
|
|
3113744c57 | ||
|
|
517fd63c32 | ||
|
|
a5459c09c9 | ||
|
|
22d73027d0 | ||
|
|
6bae8fbd9c | ||
|
|
edb4351004 | ||
|
|
2cd1661e2d | ||
|
|
761cc30055 | ||
|
|
42a80fac8c | ||
|
|
b080cfcc71 | ||
|
|
2d4c7b4033 | ||
|
|
4839387edd | ||
|
|
fc2ed1b5d0 | ||
|
|
216effe4f5 | ||
|
|
8bb124394b | ||
|
|
389965f1de | ||
|
|
107f916322 | ||
|
|
f1d2e1453c | ||
|
|
bdaec773b5 | ||
|
|
7f0ec2a127 | ||
|
|
841c151b64 | ||
|
|
ff27146950 | ||
|
|
86c1364695 | ||
|
|
b962a566af | ||
|
|
1de4cfb791 | ||
|
|
047f0e4d88 | ||
|
|
2ff0c392e7 | ||
|
|
7f6d8e53fd | ||
|
|
1a40f20729 | ||
|
|
9aafc5d1c6 | ||
|
|
c30edd027f | ||
|
|
531085785b | ||
|
|
63883d4970 | ||
|
|
2d656381f8 | ||
|
|
fe726b1beb | ||
|
|
88117e6128 | ||
|
|
064578114f | ||
|
|
664f06616a | ||
|
|
17ae7c1659 | ||
|
|
d99ee78503 | ||
|
|
416240947b | ||
|
|
0dc0d76854 | ||
|
|
09ca429157 | ||
|
|
fc2143b993 | ||
|
|
8c1582c9ad | ||
|
|
0631d2c59d | ||
|
|
877a6f92f0 | ||
|
|
992991fe1b | ||
|
|
1f06a6a4e8 | ||
|
|
4119b09a1a | ||
|
|
f4da90705b | ||
|
|
25ac985422 | ||
|
|
65942d343f | ||
|
|
013727e1c7 | ||
|
|
e5323bde9a | ||
|
|
ffd60af473 | ||
|
|
eafd04d172 | ||
|
|
3a2f5c2219 | ||
|
|
a7da07a15f | ||
|
|
d97c07c265 | ||
|
|
6ca2ea7109 | ||
|
|
20944e2516 | ||
|
|
cd727b4e9a | ||
|
|
77d307ccbf | ||
|
|
2b04364852 | ||
|
|
391ff7682c | ||
|
|
6e06a45f24 | ||
|
|
03df7fce82 | ||
|
|
97f6da74a1 | ||
|
|
bcea4e69bb | ||
|
|
7a2c4afa91 | ||
|
|
abd1af951c | ||
|
|
b310ce9ccc | ||
|
|
ce82e028b2 | ||
|
|
266ff49a9a | ||
|
|
9a1623dc5f | ||
|
|
c725c054d6 | ||
|
|
f696aece3f | ||
|
|
c286d482aa | ||
|
|
80ddb8d95c | ||
|
|
4275e7428b | ||
|
|
6c08709bd6 | ||
|
|
329cab2942 | ||
|
|
d30323b867 | ||
|
|
8022e383ff | ||
|
|
4789901728 | ||
|
|
c7b95db5ab | ||
|
|
48814f96ef | ||
|
|
edfe2e11db | ||
|
|
a54ac71371 | ||
|
|
292785ed61 | ||
|
|
8220c2e4ce | ||
|
|
13fd8fcded | ||
|
|
87bf415853 | ||
|
|
6396a3272c | ||
|
|
6b2b7046ed | ||
|
|
5fd50c99cb | ||
|
|
d27642fece | ||
|
|
c37b0c690a | ||
|
|
cbd21afae9 | ||
|
|
0605d5f309 | ||
|
|
c0840f18f3 | ||
|
|
77d650908d | ||
|
|
72bef34918 | ||
|
|
c55632007e | ||
|
|
f671ad6275 | ||
|
|
71966d1e5a | ||
|
|
b8837a79b2 | ||
|
|
adbf9e766e | ||
|
|
bb8ec8d629 | ||
|
|
aa82af78e4 | ||
|
|
83a2d6e96e | ||
|
|
550e18eaed | ||
|
|
bd184cc572 | ||
|
|
a7057e4e49 | ||
|
|
d0e7e5aa2a | ||
|
|
a12d2bf747 | ||
|
|
3c3ddb39b4 | ||
|
|
d9f50d95e3 | ||
|
|
a5e51efff8 | ||
|
|
6338f99d52 | ||
|
|
8fba11c57b | ||
|
|
07986a53e3 | ||
|
|
ab778e7414 | ||
|
|
7a83093a3b | ||
|
|
adcf926b80 | ||
|
|
c783495edf | ||
|
|
f9c6bb1ad8 | ||
|
|
411d090895 | ||
|
|
b9d73bb910 | ||
|
|
a6c5363f05 | ||
|
|
6326528127 | ||
|
|
1d7ce1aae0 | ||
|
|
3947bfeadf | ||
|
|
da3743b7b9 | ||
|
|
6db49b7864 | ||
|
|
1f3aaf508c | ||
|
|
0f58370215 | ||
|
|
4348f9e163 | ||
|
|
bb89f5c275 | ||
|
|
27567040d2 | ||
|
|
72064e1a28 | ||
|
|
06c460c995 | ||
|
|
0b1477a716 | ||
|
|
e92ebce7f8 | ||
|
|
c2c3467ab4 | ||
|
|
2fb2f81538 | ||
|
|
ed806c4461 | ||
|
|
2a926ec6ec | ||
|
|
33c7b63c6c | ||
|
|
a109c3538f | ||
|
|
5a3624221b | ||
|
|
a780e73f62 | ||
|
|
cee97080d1 | ||
|
|
c204922c7f | ||
|
|
0a9ca62a77 | ||
|
|
4d72dba301 | ||
|
|
e577899507 | ||
|
|
894dc2480c | ||
|
|
f8e312ea27 | ||
|
|
2f2cdc6a51 | ||
|
|
6c579efc43 | ||
|
|
7ca414f5e7 | ||
|
|
890c709036 | ||
|
|
61a1bad720 | ||
|
|
4588d5d79f | ||
|
|
bb669f2c1b | ||
|
|
1bd381890d | ||
|
|
bbeafa1dcf | ||
|
|
842bc947e2 | ||
|
|
c5602787fc | ||
|
|
c101964325 | ||
|
|
e72a69aae6 | ||
|
|
a6100682d0 | ||
|
|
973e134d2d | ||
|
|
14edb68858 | ||
|
|
8409cb44b2 | ||
|
|
6fc06f265e | ||
|
|
92ef63a07b | ||
|
|
8bf7114691 | ||
|
|
50a0ea7b8c | ||
|
|
49f22527cc | ||
|
|
1e4d963734 | ||
|
|
1178d719ea | ||
|
|
8deefa8780 | ||
|
|
7d55780ca0 | ||
|
|
658272c9ee | ||
|
|
0d3d292633 | ||
|
|
f8c2680509 | ||
|
|
cf7d0fb4e7 | ||
|
|
1e26362d4b | ||
|
|
904b9282fe | ||
|
|
7ab1a74f49 | ||
|
|
d0dc4810eb | ||
|
|
afed1468e4 | ||
|
|
f4644c8c85 | ||
|
|
07c1929a7a | ||
|
|
8be696d143 | ||
|
|
7e8ec822a5 | ||
|
|
97317c7b1e | ||
|
|
a59ffde6bc | ||
|
|
fbe6499d46 | ||
|
|
231d8dd526 | ||
|
|
c0edb4afce | ||
|
|
9d02d50df2 | ||
|
|
64ceec13f2 | ||
|
|
0d1ab2f6ac | ||
|
|
f171aefb31 | ||
|
|
1e17bb2aab | ||
|
|
5fe988518a | ||
|
|
c80e055c9c | ||
|
|
1c50d5385d | ||
|
|
6150174941 | ||
|
|
3ef14fc609 | ||
|
|
c0e6f37cb9 | ||
|
|
cb1d315b7d | ||
|
|
30a8dcff1b | ||
|
|
e3ddef53b4 | ||
|
|
4445c85d4f | ||
|
|
444bba79ba | ||
|
|
110fab9803 | ||
|
|
a0bf0739a9 | ||
|
|
ed4f6dbd36 | ||
|
|
94286b35e3 | ||
|
|
3aceb07efd | ||
|
|
ebc6982eb8 | ||
|
|
200b139c69 | ||
|
|
6212b88ef3 | ||
|
|
72ff4aac7e | ||
|
|
426e14a6ed | ||
|
|
5ce0bb46f6 | ||
|
|
2e1cd1e133 | ||
|
|
5126ac9ab0 | ||
|
|
c11850b406 | ||
|
|
b1fb44660d | ||
|
|
221c71032f | ||
|
|
d53e8cfb83 | ||
|
|
ede218d54c | ||
|
|
a30113b617 | ||
|
|
1dc9e43cd0 | ||
|
|
50554563af | ||
|
|
6d85947b52 | ||
|
|
4c961e9045 | ||
|
|
d733338225 | ||
|
|
e71ee33358 | ||
|
|
00fabe553a | ||
|
|
e6dc3a5cbc | ||
|
|
c02f6724a8 | ||
|
|
f20dd1f9ae | ||
|
|
5f790678ec | ||
|
|
a3bf7aa4fe | ||
|
|
6106c44c10 | ||
|
|
e670162315 | ||
|
|
ce1bd65d29 | ||
|
|
a4ff8bce62 | ||
|
|
e1ce0a64ea | ||
|
|
336b5af34b | ||
|
|
a4d1188313 | ||
|
|
09d8bbb2ee | ||
|
|
0891e86ed8 | ||
|
|
e46fee1d1a | ||
|
|
c06a26a524 | ||
|
|
3b38626603 | ||
|
|
2b48156eab | ||
|
|
92ba590555 | ||
|
|
1fe5265c3e | ||
|
|
112ac7e978 | ||
|
|
af2d266a09 | ||
|
|
4e606e3ceb | ||
|
|
96bb25e8e7 | ||
|
|
865f85718f | ||
|
|
9c60bd8df7 | ||
|
|
a8e80ec235 | ||
|
|
0488a86634 | ||
|
|
ced29dd706 | ||
|
|
9b07568c43 | ||
|
|
0cc45e7bdb | ||
|
|
10a9634bc9 | ||
|
|
eb5e97adf5 | ||
|
|
419f589580 | ||
|
|
9ea7a70e24 | ||
|
|
e64734f986 | ||
|
|
22458ed4d5 | ||
|
|
86544f5971 | ||
|
|
5a3a34e3e6 | ||
|
|
89bd3af6b9 | ||
|
|
d27d572a7d | ||
|
|
2bb9bbb803 | ||
|
|
08e1471c16 | ||
|
|
53324e8830 | ||
|
|
698539fa79 | ||
|
|
6b990988f1 | ||
|
|
6ee4060bfa | ||
|
|
c6e852d7db | ||
|
|
ffdd175918 | ||
|
|
5a4a66cdd5 | ||
|
|
6b730a04ae | ||
|
|
7f79e86886 | ||
|
|
7d0eedf08c | ||
|
|
f3448471df | ||
|
|
d52e132203 |
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -279,7 +279,15 @@ ir if
|
||||
it is your first install then you need to "make install" as well)
|
||||
|
||||
13. cd ../php-5.x.y
|
||||
14. cp php.ini-dist /usr/local/lib/php.ini
|
||||
|
||||
14. The PHP distribution provides two sample php.ini files, you can use them
|
||||
by
|
||||
cp php.ini-development /usr/local/lib/php.ini
|
||||
or
|
||||
cp php.ini-production /usr/local/lib/php.ini
|
||||
|
||||
If you choose one of these php.ini files be certain to read the list
|
||||
of changes within, as they affect how PHP behaves.
|
||||
|
||||
15. You can edit /usr/local/lib/php.ini file to set PHP options.
|
||||
Edit your httpd.conf or srm.conf file and add:
|
||||
@@ -451,15 +459,19 @@ Apache 2.0 on Unix systems
|
||||
|
||||
13. Setup your php.ini
|
||||
|
||||
cp php.ini-dist /usr/local/lib/php.ini
|
||||
The PHP distribution provides two sample php.ini files, you can use them
|
||||
by
|
||||
cp php.ini-development /usr/local/lib/php.ini
|
||||
or
|
||||
cp php.ini-production /usr/local/lib/php.ini
|
||||
|
||||
If you choose one of these php.ini files be certain to read the list
|
||||
of changes within, as they affect how PHP behaves.
|
||||
|
||||
You may edit your .ini file to set PHP options. If you prefer having
|
||||
php.ini in another location, use --with-config-file-path=/some/path in
|
||||
step 10.
|
||||
|
||||
If you instead choose php.ini-recommended, be certain to read the list
|
||||
of changes within, as they affect how PHP behaves.
|
||||
|
||||
14. Edit your httpd.conf to load the PHP module. The path on the right hand
|
||||
side of the LoadModule statement must point to the path of the PHP
|
||||
module on your system. The make install from above may have already
|
||||
@@ -858,7 +870,7 @@ Using Binary Packages
|
||||
Example 2-6. OpenBSD Package Install Example
|
||||
# pkg_add php4-core-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -s
|
||||
# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
|
||||
# cp /usr/local/share/doc/php4/php.ini-development /var/www/conf/php.ini
|
||||
(add in mysql)
|
||||
# pkg_add php4-mysql-4.3.8.tgz
|
||||
# /usr/local/sbin/phpxs -a mysql
|
||||
@@ -1242,10 +1254,10 @@ setenv OPTIM=-O2
|
||||
back to the root of the Apache source directory and run the above
|
||||
configure command again. That'll bring the link table up to date.
|
||||
Run make and make install again.
|
||||
7. Copy and rename the php.ini-dist file to your bin directory from
|
||||
your PHP 4 source directory: cp php.ini-dist /usr/local/bin/php.ini
|
||||
or (if your don't have a local directory) cp php.ini-dist
|
||||
/usr/bin/php.ini.
|
||||
7. Copy and rename the php.ini-development or php.ini-production file to
|
||||
your bin directory from your PHP 4 source directory:
|
||||
cp php.ini-development /usr/local/bin/php.ini or (if your don't have a
|
||||
local directory) cp php.ini-development /usr/bin/php.ini.
|
||||
__________________________________________________________________
|
||||
|
||||
Compiling for MacOS X Client
|
||||
@@ -1735,8 +1747,8 @@ cgi error:
|
||||
example, set it with something like:
|
||||
--with-config-file-path=/etc
|
||||
|
||||
And then you would copy php.ini-dist from the distribution to
|
||||
/etc/php.ini and edit it to make any local changes you want.
|
||||
And then you would copy php.ini-development or php.ini-production from the
|
||||
distribution to /etc/php.ini and edit it to make any local changes you want.
|
||||
--with-config-file-scan-dir=PATH
|
||||
|
||||
On Windows the default path for the php.ini file is the Windows
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2009 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -98,6 +98,7 @@ test: all
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
rm $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,362 @@
|
||||
PHP NEWS
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
17 Jun 2010, PHP 5.3.3 RC1
|
||||
06 Jan 2011, PHP 5.3.5
|
||||
- Fixed Bug #53632 (infinite loop with x87 fpu). (Scott, Rasmus)
|
||||
|
||||
09 Dec 2010, PHP 5.3.4
|
||||
- Upgraded bundled Sqlite3 to version 3.7.3. (Ilia)
|
||||
- Upgraded bundled PCRE to version 8.10. (Ilia)
|
||||
|
||||
- Security enhancements:
|
||||
. Fixed crash in zip extract method (possible CWE-170).
|
||||
(Maksymilian Arciemowicz, Pierre)
|
||||
. Paths with NULL in them (foo\0bar.txt) are now considered as invalid. (Rasmus)
|
||||
. Fixed a possible double free in imap extension (Identified by Mateusz
|
||||
Kocielski). (CVE-2010-4150). (Ilia)
|
||||
. Fixed NULL pointer dereference in ZipArchive::getArchiveComment.
|
||||
(CVE-2010-3709). (Maksymilian Arciemowicz)
|
||||
. Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre)
|
||||
. Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre)
|
||||
. Fixed symbolic resolution support when the target is a DFS share. (Pierre)
|
||||
. Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
|
||||
large amount of data) (CVE-2010-3710). (Adam)
|
||||
|
||||
- General improvements:
|
||||
. Added stat support for zip stream. (Pierre)
|
||||
. Added follow_location (enabled by default) option for the http stream
|
||||
support. (Pierre)
|
||||
. Improved support for is_link and related functions on Windows. (Pierre)
|
||||
. Added a 3rd parameter to get_html_translation_table. It now takes a charset
|
||||
hint, like htmlentities et al. (Gustavo)
|
||||
|
||||
- Implemented feature requests:
|
||||
. Implemented FR #52348, added new constant ZEND_MULTIBYTE to detect
|
||||
zend multibyte at runtime. (Kalle)
|
||||
. Implemented FR #52173, added functions pcntl_get_last_error() and
|
||||
pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)
|
||||
. Implemented symbolic links support for open_basedir checks. (Pierre)
|
||||
. Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre)
|
||||
. Implemented FR #50692, not uploaded files don't count towards
|
||||
max_file_uploads limit. As a side improvement, temporary files are not opened
|
||||
for empty uploads and, in debug mode, 0-length uploads. (Gustavo)
|
||||
|
||||
- Improved MySQLnd:
|
||||
. Added new character sets to mysqlnd, which are available in MySQL 5.5
|
||||
(Andrey)
|
||||
|
||||
- Improved PHP-FPM SAPI:
|
||||
. Added '-p/--prefix' to php-fpm to use a custom prefix and run multiple
|
||||
instances. (fat)
|
||||
. Added custom process title for FPM. (fat)
|
||||
. Added '-t/--test' to php-fpm to check and validate FPM conf file. (fat)
|
||||
. Added statistics about listening socket queue length for FPM.
|
||||
(andrei dot nigmatulin at gmail dot com, fat)
|
||||
|
||||
- Core:
|
||||
. Fixed extract() to do not overwrite $GLOBALS and $this when using
|
||||
EXTR_OVERWRITE. (jorto at redhat dot com)
|
||||
. Fixed bug in the Windows implementation of dns_get_record, where the two
|
||||
last parameters wouldn't be filled unless the type were DNS_ANY (Gustavo).
|
||||
. Changed the $context parameter on copy() to actually have an effect. (Kalle)
|
||||
. Fixed htmlentities/htmlspecialchars accepting certain ill-formed UTF-8
|
||||
sequences. (Gustavo)
|
||||
. Fixed bug #53409 (sleep() returns NULL on Windows). (Pierre)
|
||||
. Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly). (Felipe)
|
||||
. Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits).
|
||||
(Ilia, daniel dot mueller at inexio dot net)
|
||||
. Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
|
||||
(Justin Martin)
|
||||
. Fixed bug #53226 (file_exists fails on big filenames). (Adam)
|
||||
. Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
|
||||
effect). (Gustavo)
|
||||
. Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
|
||||
type is application/x-www-form-urlencoded or is not registered with PHP).
|
||||
(gm at tlink dot de, Gustavo)
|
||||
. Fixed bug #53141 (autoload misbehaves if called from closing session).
|
||||
(ladislav at marek dot su)
|
||||
. Fixed bug #53021 (In html_entity_decode, failure to convert numeric entities
|
||||
with ENT_NOQUOTES and ISO-8859-1). Fixed and extended the fix of ENT_NOQUOTES
|
||||
in html_entity_decode that had introduced the bug (rev #185591) to other
|
||||
encodings. Additionaly, html_entity_decode() now doesn't decode " if
|
||||
ENT_NOQUOTES is given. (Gustavo)
|
||||
. Fixed bug #52931 (strripos not overloaded with function overloading enabled).
|
||||
(Felipe)
|
||||
. Fixed bug #52772 (var_dump() doesn't check for the existence of
|
||||
get_class_name before calling it). (Kalle, Gustavo)
|
||||
. Fixed bug #52534 (var_export array with negative key). (Felipe)
|
||||
. Fixed bug #52327 (base64_decode() improper handling of leading padding in
|
||||
strict mode). (Ilia)
|
||||
. Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows).
|
||||
(a_jelly_doughnut at phpbb dot com, Pierre)
|
||||
. Fixed bug #50953 (socket will not connect to IPv4 address when the host has
|
||||
both IPv4 and IPv6 addresses, on Windows). (Gustavo, Pierre)
|
||||
. Fixed bug #50524 (proc_open on Windows does not respect cwd as it does on
|
||||
other platforms). (Pierre)
|
||||
. Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
|
||||
of reported malformed sequences). (CVE-2010-3870) (Gustavo)
|
||||
. Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8). (Gustavo)
|
||||
. Fixed bug #48831 (php -i has different output to php --ini). (Richard,
|
||||
Pierre)
|
||||
. Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
|
||||
(Felipe)
|
||||
. Fixed bug #47168 (printf of floating point variable prints maximum of 40
|
||||
decimal places). (Ilia)
|
||||
. Fixed bug #46587 (mt_rand() does not check that max is greater than min).
|
||||
(Ilia)
|
||||
. Fixed bug #29085 (bad default include_path on Windows). (Pierre)
|
||||
. Fixed bug #25927 (get_html_translation_table calls the ' ' instead of
|
||||
'). (Gustavo)
|
||||
|
||||
- Zend engine:
|
||||
. Reverted fix for bug #51176 (Static calling in non-static method behaves
|
||||
like $this->). (Felipe)
|
||||
. Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED.
|
||||
(Kalle)
|
||||
. Fixed NULL dereference in lex_scan on zend multibyte builds where the script
|
||||
had a flex incompatible encoding and there was no converter. (Gustavo)
|
||||
. Fixed covariance of return-by-ref constraints. (Etienne)
|
||||
. Fixed bug #53305 (E_NOTICE when defining a constant starts with
|
||||
__COMPILER_HALT_OFFSET__). (Felipe)
|
||||
. Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF).
|
||||
(Dmitry)
|
||||
. Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset
|
||||
can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry)
|
||||
. Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).
|
||||
(Fedora at famillecollet dot com)
|
||||
. Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
|
||||
(Felipe)
|
||||
. Fixed bug #52484 (__set() ignores setting properties with empty names).
|
||||
(Felipe)
|
||||
. Fixed bug #52361 (Throwing an exception in a destructor causes invalid
|
||||
catching). (Dmitry)
|
||||
. Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
|
||||
|
||||
- Build issues:
|
||||
. Fixed bug #52436 (Compile error if systems do not have stdint.h)
|
||||
(Sriram Natarajan)
|
||||
. Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
|
||||
(Ulf, Tony)
|
||||
. Fixed bug #49215 (make fails on glob_wrapper). (Felipe)
|
||||
|
||||
- Calendar extension:
|
||||
. Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE).
|
||||
(gpap at internet dot gr, Adam)
|
||||
|
||||
- cURL extension:
|
||||
. Fixed bug #52828 (curl_setopt does not accept persistent streams).
|
||||
(Gustavo, Ilia)
|
||||
. Fixed bug #52827 (cURL leaks handle and causes assertion error
|
||||
(CURLOPT_STDERR)). (Gustavo)
|
||||
. Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). (Ilia)
|
||||
. Fixed bug #50410 (curl extension slows down PHP on Windows). (Pierre)
|
||||
|
||||
- DateTime extension:
|
||||
. Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
|
||||
1 million microsecs). (ped at 7gods dot org)
|
||||
. Fixed bug #52668 (Iterating over a dateperiod twice is broken). (Derick)
|
||||
. Fixed bug #52454 (Relative dates and getTimestamp increments by one day).
|
||||
(Derick)
|
||||
. Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick)
|
||||
. Added support for the ( and ) delimiters/separators to
|
||||
DateTime::createFromFormat(). (Derick)
|
||||
|
||||
- DBA extension:
|
||||
. Added Berkeley DB 5.1 support to the DBA extension. (Oracle Corp.)
|
||||
|
||||
- DOM extension:
|
||||
. Fixed bug #52656 (DOMCdataSection does not work with splitText). (Ilia)
|
||||
|
||||
- Filter extension:
|
||||
. Fixed the filter extension accepting IPv4 octets with a leading 0 as that
|
||||
belongs to the unsupported "dotted octal" representation. (Gustavo)
|
||||
. Fixed bug #53236 (problems in the validation of IPv6 addresses with leading
|
||||
and trailing :: in the filter extension). (Gustavo)
|
||||
. Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
|
||||
addresses and ::). (Gustavo)
|
||||
|
||||
- GD extension:
|
||||
. Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre)
|
||||
|
||||
- GMP extension:
|
||||
. Fixed bug #52906 (gmp_mod returns negative result when non-negative is
|
||||
expected). (Stas)
|
||||
. Fixed bug #52849 (GNU MP invalid version match). (Adam)
|
||||
|
||||
- Hash extension:
|
||||
. Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c).
|
||||
(Mike, Ilia)
|
||||
|
||||
- Iconv extension:
|
||||
. Fixed bug #52941 (The 'iconv_mime_decode_headers' function is skipping
|
||||
headers). (Adam)
|
||||
. Fixed bug #52599 (iconv output handler outputs incorrect content type
|
||||
when flags are used). (Ilia)
|
||||
. Fixed bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded
|
||||
words). (Ilia)
|
||||
|
||||
- Intl extension:
|
||||
. Fixed crashes on invalid parameters in intl extension. (CVE-2010-4409). (Stas, Maksymilian
|
||||
Arciemowicz)
|
||||
. Added support for formatting the timestamp stored in a DateTime object.
|
||||
(Stas)
|
||||
. Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
|
||||
range). (Stas)
|
||||
|
||||
- Mbstring extension:
|
||||
. Fixed bug #53273 (mb_strcut() returns garbage with the excessive length
|
||||
parameter). (CVE-2010-4156) (Mateusz Kocielski, Pierre, Moriyoshi)
|
||||
. Fixed bug #52981 (Unicode casing table was out-of-date. Updated with
|
||||
UnicodeData-6.0.0d7.txt and included the source of the generator program with
|
||||
the distribution) (Gustavo).
|
||||
. Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header).
|
||||
(Adam)
|
||||
|
||||
- MSSQL extension:
|
||||
. Fixed possible crash in mssql_fetch_batch(). (Kalle)
|
||||
. Fixed bug #52843 (Segfault when optional parameters are not passed in to
|
||||
mssql_connect). (Felipe)
|
||||
|
||||
- MySQL extension:
|
||||
. Fixed bug #52636 (php_mysql_fetch_hash writes long value into int).
|
||||
(Kalle, rein at basefarm dot no)
|
||||
|
||||
- MySQLi extension:
|
||||
. Fixed bug #52891 (Wrong data inserted with mysqli/mysqlnd when using
|
||||
mysqli_stmt_bind_param and value> PHP_INT_MAX). (Andrey)
|
||||
. Fixed bug #52686 (mysql_stmt_attr_[gs]et argument points to incorrect type).
|
||||
(rein at basefarm dot no)
|
||||
. Fixed bug #52654 (mysqli doesn't install headers with structures it uses).
|
||||
(Andrey)
|
||||
. Fixed bug #52433 (Call to undefined method mysqli::poll() - must be static).
|
||||
(Andrey)
|
||||
. Fixed bug #52417 (MySQLi build failure with mysqlnd on MacOS X). (Andrey)
|
||||
. Fixed bug #52413 (MySQLi/libmysql build failure on OS X, FreeBSD). (Andrey)
|
||||
. Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
|
||||
. Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT).
|
||||
(Andrey)
|
||||
. Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey)
|
||||
. Fixed bug #45921 (Can't initialize character set hebrew). (Andrey)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey)
|
||||
|
||||
- ODBC extension:
|
||||
- Fixed bug #52512 (Broken error handling in odbc_execute).
|
||||
(mkoegler at auto dot tuwien dot ac dot at)
|
||||
|
||||
- Openssl extension:
|
||||
. Fixed possible blocking behavior in openssl_random_pseudo_bytes on Windows.
|
||||
(Pierre)
|
||||
. Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe)
|
||||
. Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain
|
||||
used). (Felipe)
|
||||
|
||||
- Oracle Database extension (OCI8):
|
||||
. Fixed bug #53284 (Valgrind warnings in oci_set_* functions) (Oracle Corp.)
|
||||
. Fixed bug #51610 (Using oci_connect causes PHP to take a long time to
|
||||
exit). Requires Oracle 11.2.0.2 client libraries (or Oracle bug fix
|
||||
9891199) for this patch to have an effect. (Oracle Corp.)
|
||||
|
||||
- PCNTL extension:
|
||||
. Fixed bug #52784 (Race condition when handling many concurrent signals).
|
||||
(nick dot telford at gmail dot com, Arnaud)
|
||||
|
||||
- PCRE extension:
|
||||
. Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8). (Felipe)
|
||||
. Fixed bug #52732 (Docs say preg_match() returns FALSE on error, but it
|
||||
returns int(0)). (slugonamission at gmail dot com)
|
||||
|
||||
- PHAR extension:
|
||||
. Fixed bug #50987 (unaligned memory access in phar.c).
|
||||
(geissert at debian dot org, Ilia)
|
||||
|
||||
- PHP-FPM SAPI:
|
||||
. Fixed bug #53412 (segfault when using -y). (fat)
|
||||
. Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)
|
||||
. Fixed bug #52501 (libevent made FPM crashed when forking -- libevent has
|
||||
been removed). (fat)
|
||||
. Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they
|
||||
were not available). (fat)
|
||||
. Fixed bug #52693 (configuration file errors are not logged to stderr). (fat)
|
||||
. Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
|
||||
(fat)
|
||||
. Fixed bug #52498 (libevent was not only linked to php-fpm). (fat)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #52699 (PDO bindValue writes long int 32bit enum).
|
||||
(rein at basefarm dot no)
|
||||
. Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe)
|
||||
|
||||
- PDO DBLib driver:
|
||||
. Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
|
||||
(Felipe)
|
||||
|
||||
- PDO Firebird driver:
|
||||
. Restored firebird support (VC9 builds only). (Pierre)
|
||||
. Fixed bug #53335 (pdo_firebird did not implement rowCount()).
|
||||
(preeves at ibphoenix dot com)
|
||||
. Fixed bug #53323 (pdo_firebird getAttribute() crash).
|
||||
(preeves at ibphoenix dot com)
|
||||
|
||||
- PDO MySQL driver:
|
||||
. Fixed bug #52745 (Binding params doesn't work when selecting a date inside a
|
||||
CASE-WHEN). (Andrey)
|
||||
|
||||
- PostgreSQL extension:
|
||||
. Fixed bug #47199 (pg_delete() fails on NULL). (ewgraf at gmail dot com)
|
||||
|
||||
- Reflection extension:
|
||||
. Fixed ReflectionProperty::isDefault() giving a wrong result for properties
|
||||
obtained with ReflectionClass::getProperties(). (Gustavo)
|
||||
- Reflection extension:
|
||||
. Fixed bug #53366 (Reflection doesnt get dynamic property value from
|
||||
getProperty()). (Felipe)
|
||||
. Fixed bug #52854 (ReflectionClass::newInstanceArgs does not work for classes
|
||||
without constructors). (Johannes)
|
||||
|
||||
- SOAP extension:
|
||||
. Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
|
||||
with SoapClient object). (Dmitry)
|
||||
|
||||
- SPL extension:
|
||||
. Fixed bug #53362 (Segmentation fault when extending SplFixedArray). (Felipe)
|
||||
. Fixed bug #53279 (SplFileObject doesn't initialise default CSV escape
|
||||
character). (Adam)
|
||||
. Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
|
||||
. Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
|
||||
. Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe)
|
||||
. Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link
|
||||
and directory). (Pierre)
|
||||
. Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
|
||||
. Fixed bug #50579 (RegexIterator::REPLACE doesn't work). (Felipe)
|
||||
|
||||
- SQLite3 extension:
|
||||
. Fixed bug #53463 (sqlite3 columnName() segfaults on bad column_number).
|
||||
(Felipe)
|
||||
|
||||
- Streams:
|
||||
. Fixed forward stream seeking emulation in streams that don't support seeking
|
||||
in situations where the read operation gives back less data than requested
|
||||
and when there was data in the buffer before the emulation started. Also made
|
||||
more consistent its behavior -- should return failure every time less data
|
||||
than was requested was skipped. (Gustavo)
|
||||
. Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
|
||||
with streams opened with, inter alia, the 'xb' mode). (Gustavo)
|
||||
. Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
|
||||
underlying stream does not support seeking). (Gustavo)
|
||||
. Fixed bug #52944 (Invalid write on second and subsequent reads with an
|
||||
inflate filter fed invalid data). (Gustavo)
|
||||
. Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
|
||||
stream). (Gustavo)
|
||||
|
||||
- WDDX extension:
|
||||
. Fixed bug #52468 (wddx_deserialize corrupts integer field value when left
|
||||
empty). (Felipe)
|
||||
|
||||
- Zlib extension:
|
||||
. Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo)
|
||||
|
||||
22 Jul 2010, PHP 5.3.3
|
||||
- Upgraded bundled sqlite to version 3.6.23.1. (Ilia)
|
||||
- Upgraded bundled PCRE to version 8.02. (Ilia)
|
||||
|
||||
@@ -29,8 +385,11 @@ PHP NEWS
|
||||
__construct now. (Stas)
|
||||
- Reset error state in PDO::beginTransaction() reset error state. (Ilia)
|
||||
|
||||
- Implemented FR#51295 (SQLite3::busyTimeout not existing). (Mark)
|
||||
- Implemented FR#35638 (Adding udate to imap_fetch_overview results).
|
||||
(Charles_Duffy at dell dot com )
|
||||
- Rewrote var_export() to use smart_str rather than output buffering, prevents
|
||||
data disclosure if a fatal error occurs (CVE-2010-2531). (Scott)
|
||||
- Fixed possible buffer overflows in mysqlnd_list_fields, mysqlnd_change_user.
|
||||
(Andrey)
|
||||
- Fixed possible buffer overflows when handling error packets in mysqlnd.
|
||||
@@ -73,7 +432,27 @@ PHP NEWS
|
||||
- Fixed a NULL pointer dereference when processing invalid XML-RPC
|
||||
requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
|
||||
- Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)
|
||||
- Fixed SplObjectStorage unserialization problems (CVE-2010-2225). (Stas)
|
||||
- Fixed the mail.log ini setting when no filename was given. (Johannes)
|
||||
|
||||
- Fixed bug #52317 (Segmentation fault when using mail() on a rhel 4.x (only 64
|
||||
bit)). (Adam)
|
||||
- Fixed bug #52262 (json_decode() shows no errors on invalid UTF-8).
|
||||
(Scott)
|
||||
- Fixed bug #52240 (hash_copy() does not copy the HMAC key, causes wrong
|
||||
results and PHP crashes). (Felipe)
|
||||
- Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
|
||||
(Johannes)
|
||||
- Fixed bug #52193 (converting closure to array yields empty array). (Felipe)
|
||||
- Fixed bug #52183 (Reflectionfunction reports invalid number of arguments for
|
||||
function aliases). (Felipe)
|
||||
- Fixed bug #52162 (custom request header variables with numbers are removed).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #52160 (Invalid E_STRICT redefined constructor error). (Felipe)
|
||||
- Fixed bug #52138 (Constants are parsed into the ini file for section names).
|
||||
(Felipe)
|
||||
- Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array).
|
||||
(Andrey)
|
||||
- Fixed bug #52101 (dns_get_record() garbage in 'ipv6' field on Windows).
|
||||
(Pierre)
|
||||
- Fixed bug #52082 (character_set_client & character_set_connection reset after
|
||||
@@ -87,12 +466,16 @@ PHP NEWS
|
||||
- Fixed bug #52057 (ReflectionClass fails on Closure class). (Felipe)
|
||||
- Fixed bug #52051 (handling of case sensitivity of old-style constructors
|
||||
changed in 5.3+). (Felipe)
|
||||
- Fixed bug #52037 (Concurrent builds fail in install-programs). (seanius at
|
||||
debian dot org, Kalle)
|
||||
- Fixed bug #52019 (make lcov doesn't support TESTS variable anymore). (Patrick)
|
||||
- Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command).
|
||||
(Ilia)
|
||||
- Fixed bug #52001 (Memory allocation problems after using variable variables).
|
||||
(Dmitry)
|
||||
- Fixed bug #51991 (spl_autoload and *nix support with namespace). (Felipe)
|
||||
- Fixed bug #51943 (AIX: Several files are out of ANSI spec). (Kalle,
|
||||
coreystup at gmail dot com)
|
||||
- Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with
|
||||
constant array). (Felipe)
|
||||
- Fixed bug #51905 (ReflectionParameter fails if default value is an array
|
||||
@@ -115,6 +498,8 @@ PHP NEWS
|
||||
(David Zuelke)
|
||||
- Fixed bug #51712 (Test mysql_mysqlnd_read_timeout_long must fail on MySQL4).
|
||||
(Andrey)
|
||||
- Fixed bug #51697 (Unsafe operations in free_storage of SPL iterators,
|
||||
causes crash during shutdown). (Etienne)
|
||||
- Fixed bug #51690 (Phar::setStub looks for case-sensitive
|
||||
__HALT_COMPILER()). (Ilia)
|
||||
- Fixed bug #51688 (ini per dir crashes when invalid document root are given).
|
||||
@@ -141,6 +526,7 @@ PHP NEWS
|
||||
- Fixed bug #51604 (newline in end of header is shown in start of message).
|
||||
(Daniel Egeberg)
|
||||
- Fixed bug #51590 (JSON_ERROR_UTF8 is undefined). (Felipe)
|
||||
- Fixed bug #51583 (Bus error due to wrong alignment in mysqlnd). (Rainer Jung)
|
||||
- Fixed bug #51582 (Don't assume UINT64_C it's ever available).
|
||||
(reidrac at usebox dot net, Pierre)
|
||||
- Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
|
||||
@@ -204,8 +590,6 @@ PHP NEWS
|
||||
com, Pierre)
|
||||
- Fixed bug #50578 (incorrect shebang in phar.phar). (Fedora at FamilleCollet
|
||||
dot com)
|
||||
- Fixed bug #50555 (DateTime::sub() allows 'relative' time modifications).
|
||||
(Derick)
|
||||
- Fixed bug #50392 (date_create_from_format enforces 6 digits for 'u' format
|
||||
character). (Derick)
|
||||
- Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not include
|
||||
@@ -213,6 +597,8 @@ PHP NEWS
|
||||
- Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe)
|
||||
- Fixed bug #50101 (name clash between global and local variable).
|
||||
(patch by yoarvi at gmail dot com)
|
||||
- Fixed bug #50055 (DateTime::sub() allows 'relative' time modifications).
|
||||
(Derick)
|
||||
- Fixed bug #51002 (fix possible memory corruption with very long names).
|
||||
(Pierre)
|
||||
- Fixed bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3).
|
||||
@@ -227,12 +613,15 @@ PHP NEWS
|
||||
- Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
|
||||
- Fixed bug #49320 (PDO returns null when SQLite connection fails). (Felipe)
|
||||
- Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
|
||||
- Fixed bug #49216 (Reflection doesn't seem to work properly on MySqli).
|
||||
(Andrey)
|
||||
- Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
|
||||
- Fixed bug #49081 (DateTime::diff() mistake if start in January and interval >
|
||||
28 days). (Derick)
|
||||
- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
|
||||
(yoarvi@gmail.com, Derick)
|
||||
- Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
|
||||
- Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3). (Felipe)
|
||||
- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
|
||||
- Fixed bug #48781 (Cyclical garbage collector memory leak). (Dmitry)
|
||||
- Fixed bug #48601 (xpath() returns FALSE for legitimate query). (Rob)
|
||||
@@ -242,9 +631,12 @@ PHP NEWS
|
||||
(Adam, patch from hiroaki dot kawai at gmail dot com).
|
||||
- Fixed bug #47842 (sscanf() does not support 64-bit values). (Mike)
|
||||
- Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
|
||||
- Fixed bug #45808 (stream_socket_enable_crypto() blocks and eats CPU).
|
||||
(vincent at optilian dot com)
|
||||
- Fixed bug #43233 (sasl support for ldap on Windows). (Pierre)
|
||||
- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)
|
||||
|
||||
- Fixed bug #33210 (getimagesize() fails to detect width/height on certain
|
||||
JPEGs). (Ilia)
|
||||
|
||||
04 Mar 2010, PHP 5.3.2
|
||||
|
||||
|
||||
+213
-86
@@ -14,6 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Sascha Schumann <sascha@schumann.cx> |
|
||||
| Pierre Joye <pierre@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -38,6 +39,18 @@
|
||||
# ifndef IO_REPARSE_TAG_SYMLINK
|
||||
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
|
||||
# endif
|
||||
|
||||
# ifndef VOLUME_NAME_NT
|
||||
# define VOLUME_NAME_NT 0x2
|
||||
# endif
|
||||
|
||||
# ifndef VOLUME_NAME_DOS
|
||||
# define VOLUME_NAME_DOS 0x0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef S_IFLNK
|
||||
# define S_IFLNK 0120000
|
||||
#endif
|
||||
|
||||
#ifdef NETWARE
|
||||
@@ -83,14 +96,14 @@ cwd_state main_cwd_state; /* True global */
|
||||
#include <tchar.h>
|
||||
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
|
||||
#define TOKENIZER_STRING "/\\"
|
||||
|
||||
static int php_check_dots(const char *element, int n)
|
||||
|
||||
static int php_check_dots(const char *element, int n)
|
||||
{
|
||||
while (n-- > 0) if (element[n] != '.') break;
|
||||
|
||||
return (n != -1);
|
||||
}
|
||||
|
||||
|
||||
#define IS_DIRECTORY_UP(element, len) \
|
||||
(len >= 2 && !php_check_dots(element, len))
|
||||
|
||||
@@ -124,7 +137,7 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
/* define this to check semantics */
|
||||
#define IS_DIR_OK(s) (1)
|
||||
|
||||
|
||||
#ifndef IS_DIR_OK
|
||||
#define IS_DIR_OK(state) (php_is_dir_ok(state) == 0)
|
||||
#endif
|
||||
@@ -137,7 +150,7 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
#define CWD_STATE_FREE(s) \
|
||||
free((s)->cwd);
|
||||
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
|
||||
#ifdef CTL_CODE
|
||||
@@ -202,21 +215,98 @@ static inline time_t FileTimeToUnixTime(const FILETIME FileTime)
|
||||
return (time_t)UnixTime;
|
||||
}
|
||||
|
||||
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){ /* {{{ */
|
||||
HINSTANCE kernel32;
|
||||
HANDLE hFile;
|
||||
DWORD dwRet;
|
||||
|
||||
typedef BOOL (WINAPI *gfpnh_func)(HANDLE, LPTSTR, DWORD, DWORD);
|
||||
gfpnh_func pGetFinalPathNameByHandle;
|
||||
|
||||
kernel32 = LoadLibrary("kernel32.dll");
|
||||
|
||||
if (kernel32) {
|
||||
pGetFinalPathNameByHandle = (gfpnh_func)GetProcAddress(kernel32, "GetFinalPathNameByHandleA");
|
||||
if (pGetFinalPathNameByHandle == NULL) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
hFile = CreateFile(link, // file to open
|
||||
GENERIC_READ, // open for reading
|
||||
FILE_SHARE_READ, // share for reading
|
||||
NULL, // default security
|
||||
OPEN_EXISTING, // existing file only
|
||||
FILE_FLAG_BACKUP_SEMANTICS, // normal file
|
||||
NULL); // no attr. template
|
||||
|
||||
if( hFile == INVALID_HANDLE_VALUE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
dwRet = pGetFinalPathNameByHandle(hFile, target, MAXPATHLEN, VOLUME_NAME_DOS);
|
||||
if(dwRet >= MAXPATHLEN) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
if(dwRet > 4) {
|
||||
/* Skip first 4 characters if they are "\??\" */
|
||||
if(target[0] == '\\' && target[1] == '\\' && target[2] == '?' && target[3] == '\\') {
|
||||
char tmp[MAXPATHLEN];
|
||||
unsigned int offset = 4;
|
||||
dwRet -= 4;
|
||||
|
||||
/* \??\UNC\ */
|
||||
if (dwRet > 7 && target[4] == 'U' && target[5] == 'N' && target[6] == 'C') {
|
||||
offset += 2;
|
||||
dwRet -= 2;
|
||||
target[offset] = '\\';
|
||||
}
|
||||
|
||||
memcpy(tmp, target + offset, dwRet);
|
||||
memcpy(target, tmp, dwRet);
|
||||
}
|
||||
}
|
||||
|
||||
target[dwRet] = '\0';
|
||||
return dwRet;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
|
||||
{
|
||||
return php_sys_stat_ex(path, buf, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int php_sys_lstat(const char *path, struct stat *buf) /* {{{ */
|
||||
{
|
||||
return php_sys_stat_ex(path, buf, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */
|
||||
{
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
__int64 t;
|
||||
const size_t path_len = strlen(path);
|
||||
|
||||
if (!GetFileAttributesEx(path, GetFileExInfoStandard, &data)) {
|
||||
return stat(path, buf);
|
||||
}
|
||||
|
||||
if (path[1] == ':') {
|
||||
if (path_len >= 1 && path[1] == ':') {
|
||||
if (path[0] >= 'A' && path[0] <= 'Z') {
|
||||
buf->st_dev = buf->st_rdev = path[0] - 'A';
|
||||
} else {
|
||||
buf->st_dev = buf->st_rdev = path[0] - 'a';
|
||||
}
|
||||
} else if (IS_UNC_PATH(path, path_len)) {
|
||||
buf->st_dev = buf->st_rdev = 0;
|
||||
} else {
|
||||
char cur_path[MAXPATHLEN+1];
|
||||
DWORD len = sizeof(cur_path);
|
||||
@@ -245,19 +335,56 @@ CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
|
||||
}
|
||||
if (tmp != cur_path) {
|
||||
free(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buf->st_uid = buf->st_gid = buf->st_ino = 0;
|
||||
buf->st_mode = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)) : S_IFREG;
|
||||
buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)) : (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)|S_IWRITE|(S_IWRITE>>3)|(S_IWRITE>>6));
|
||||
|
||||
if (lstat && data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
|
||||
/* File is a reparse point. Get the target */
|
||||
HANDLE hLink = NULL;
|
||||
REPARSE_DATA_BUFFER * pbuffer;
|
||||
unsigned int retlength = 0;
|
||||
TSRM_ALLOCA_FLAG(use_heap_large);
|
||||
|
||||
hLink = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||
if(hLink == INVALID_HANDLE_VALUE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
pbuffer = (REPARSE_DATA_BUFFER *)tsrm_do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
|
||||
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
|
||||
tsrm_free_alloca(pbuffer, use_heap_large);
|
||||
CloseHandle(hLink);
|
||||
return -1;
|
||||
}
|
||||
|
||||
CloseHandle(hLink);
|
||||
|
||||
if(pbuffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
|
||||
buf->st_mode = S_IFLNK;
|
||||
buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)) : (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)|S_IWRITE|(S_IWRITE>>3)|(S_IWRITE>>6));
|
||||
}
|
||||
|
||||
#if 0 /* Not used yet */
|
||||
else if(pbuffer->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
|
||||
buf->st_mode |=;
|
||||
}
|
||||
#endif
|
||||
tsrm_free_alloca(pbuffer, use_heap_large);
|
||||
} else {
|
||||
buf->st_mode = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)) : S_IFREG;
|
||||
buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)) : (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)|S_IWRITE|(S_IWRITE>>3)|(S_IWRITE>>6));
|
||||
}
|
||||
|
||||
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
int len = strlen(path);
|
||||
|
||||
if (path[len-4] == '.') {
|
||||
if (_memicmp(path+len-3, "exe", 3) == 0 ||
|
||||
_memicmp(path+len-3, "com", 3) == 0 ||
|
||||
_memicmp(path+len-3, "bat", 3) == 0 ||
|
||||
_memicmp(path+len-3, "cmd", 3) == 0) {
|
||||
_memicmp(path+len-3, "com", 3) == 0 ||
|
||||
_memicmp(path+len-3, "bat", 3) == 0 ||
|
||||
_memicmp(path+len-3, "cmd", 3) == 0) {
|
||||
buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6));
|
||||
}
|
||||
}
|
||||
@@ -332,7 +459,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
}
|
||||
}
|
||||
#else
|
||||
result = getcwd(cwd, sizeof(cwd));
|
||||
result = getcwd(cwd, sizeof(cwd));
|
||||
#endif
|
||||
if (!result) {
|
||||
cwd[0] = '\0';
|
||||
@@ -383,7 +510,7 @@ CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
|
||||
*length = 1;
|
||||
retval = (char *) malloc(2);
|
||||
retval[0] = DEFAULT_SLASH;
|
||||
retval[1] = '\0';
|
||||
retval[1] = '\0';
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -493,7 +620,7 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
|
||||
|
||||
while (*bucket != NULL) {
|
||||
if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
realpath_cache_bucket *r = *bucket;
|
||||
*bucket = (*bucket)->next;
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
@@ -510,9 +637,9 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
|
||||
{
|
||||
long size = sizeof(realpath_cache_bucket) + path_len + 1;
|
||||
int same = 1;
|
||||
|
||||
|
||||
if (realpath_len != path_len ||
|
||||
memcmp(path, realpath, path_len) != 0) {
|
||||
memcmp(path, realpath, path_len) != 0) {
|
||||
size += realpath_len + 1;
|
||||
same = 0;
|
||||
}
|
||||
@@ -570,7 +697,7 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
|
||||
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
|
||||
free(r);
|
||||
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
memcmp(path, (*bucket)->path, path_len) == 0) {
|
||||
return *bucket;
|
||||
} else {
|
||||
bucket = &(*bucket)->next;
|
||||
@@ -582,21 +709,21 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
|
||||
|
||||
CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return realpath_cache_find(path, path_len, t TSRMLS_CC);
|
||||
return realpath_cache_find(path, path_len, t TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API int realpath_cache_size(TSRMLS_D)
|
||||
CWD_API int realpath_cache_size(TSRMLS_D)
|
||||
{
|
||||
return CWDG(realpath_cache_size);
|
||||
}
|
||||
|
||||
CWD_API int realpath_cache_max_buckets(TSRMLS_D)
|
||||
CWD_API int realpath_cache_max_buckets(TSRMLS_D)
|
||||
{
|
||||
return (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
|
||||
}
|
||||
|
||||
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D)
|
||||
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D)
|
||||
{
|
||||
return CWDG(realpath_cache);
|
||||
}
|
||||
@@ -650,14 +777,14 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
if (!start) {
|
||||
/* leading '..' must not be removed in case of relative path */
|
||||
if (j == 0 && path[0] == '.' && path[1] == '.' &&
|
||||
IS_SLASH(path[2])) {
|
||||
IS_SLASH(path[2])) {
|
||||
path[3] = '.';
|
||||
path[4] = '.';
|
||||
path[5] = DEFAULT_SLASH;
|
||||
j = 5;
|
||||
} else if (j > 0 &&
|
||||
path[j+1] == '.' && path[j+2] == '.' &&
|
||||
IS_SLASH(path[j+3])) {
|
||||
} else if (j > 0 &&
|
||||
path[j+1] == '.' && path[j+2] == '.' &&
|
||||
IS_SLASH(path[j+3])) {
|
||||
j += 4;
|
||||
path[j++] = '.';
|
||||
path[j++] = '.';
|
||||
@@ -673,7 +800,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
path[len] = 0;
|
||||
|
||||
save = (use_realpath != CWD_EXPAND);
|
||||
@@ -683,18 +810,18 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
if (!*t) {
|
||||
*t = time(0);
|
||||
}
|
||||
if ((bucket = realpath_cache_find(path, len, *t TSRMLS_CC)) != NULL) {
|
||||
if (is_dir && !bucket->is_dir) {
|
||||
if ((bucket = realpath_cache_find(path, len, *t TSRMLS_CC)) != NULL) {
|
||||
if (is_dir && !bucket->is_dir) {
|
||||
/* not a directory */
|
||||
return -1;
|
||||
} else {
|
||||
if (link_is_dir) {
|
||||
*link_is_dir = bucket->is_dir;
|
||||
}
|
||||
} else {
|
||||
if (link_is_dir) {
|
||||
*link_is_dir = bucket->is_dir;
|
||||
}
|
||||
memcpy(path, bucket->realpath, bucket->realpath_len + 1);
|
||||
return bucket->realpath_len;
|
||||
return bucket->realpath_len;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
@@ -706,7 +833,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
/* continue resolution anyway but don't save result in the cache */
|
||||
save = 0;
|
||||
}
|
||||
|
||||
|
||||
if (save) {
|
||||
FindClose(hFind);
|
||||
}
|
||||
@@ -714,9 +841,9 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
tmp = tsrm_do_alloca(len+1, use_heap);
|
||||
memcpy(tmp, path, len+1);
|
||||
|
||||
if(save &&
|
||||
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
|
||||
(data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
|
||||
if(save &&
|
||||
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
|
||||
(data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
|
||||
/* File is a reparse point. Get the target */
|
||||
HANDLE hLink = NULL;
|
||||
REPARSE_DATA_BUFFER * pbuffer;
|
||||
@@ -751,7 +878,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
reparsetarget = pbuffer->SymbolicLinkReparseBuffer.ReparseTarget;
|
||||
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
|
||||
isabsolute = (pbuffer->SymbolicLinkReparseBuffer.Flags == 0) ? 1 : 0;
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
|
||||
printname_len + 1,
|
||||
printname, MAX_PATH, NULL, NULL
|
||||
@@ -763,7 +890,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
printname[printname_len] = 0;
|
||||
|
||||
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
|
||||
substitutename_len + 1,
|
||||
substitutename, MAX_PATH, NULL, NULL
|
||||
@@ -777,7 +904,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
isabsolute = 1;
|
||||
reparsetarget = pbuffer->MountPointReparseBuffer.ReparseTarget;
|
||||
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
|
||||
printname_len + 1,
|
||||
printname, MAX_PATH, NULL, NULL
|
||||
@@ -788,7 +915,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
printname[pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR)] = 0;
|
||||
|
||||
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
|
||||
substitutename_len + 1,
|
||||
substitutename, MAX_PATH, NULL, NULL
|
||||
@@ -803,20 +930,22 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
}
|
||||
|
||||
if(isabsolute && substitutename_len > 4) {
|
||||
/* Do not resolve volumes (for now). A mounted point can
|
||||
/* Do not resolve volumes (for now). A mounted point can
|
||||
target a volume without a drive, it is not certain that
|
||||
all IO functions we use in php and its deps support
|
||||
all IO functions we use in php and its deps support
|
||||
path with volume GUID instead of the DOS way, like:
|
||||
d:\test\mnt\foo
|
||||
\\?\Volume{62d1c3f8-83b9-11de-b108-806e6f6e6963}\foo
|
||||
*/
|
||||
if (strncmp(substitutename, "\\??\\Volume{",11) == 0
|
||||
|| strncmp(substitutename, "\\\\?\\Volume{",11) == 0) {
|
||||
isVolume = TRUE;
|
||||
if (strncmp(substitutename, "\\??\\Volume{",11) == 0
|
||||
|| strncmp(substitutename, "\\\\?\\Volume{",11) == 0
|
||||
|| strncmp(substitutename, "\\??\\UNC\\", 8) == 0
|
||||
) {
|
||||
isVolume = TRUE;
|
||||
substitutename_off = 0;
|
||||
} else
|
||||
/* do not use the \??\ and \\?\ prefix*/
|
||||
if (strncmp(substitutename, "\\??\\", 4) == 0
|
||||
if (strncmp(substitutename, "\\??\\", 4) == 0
|
||||
|| strncmp(substitutename, "\\\\?\\", 4) == 0) {
|
||||
substitutename_off = 4;
|
||||
}
|
||||
@@ -887,7 +1016,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
tmp = tsrm_do_alloca(len+1, use_heap);
|
||||
memcpy(tmp, path, len+1);
|
||||
#else
|
||||
if (save && lstat(path, &st) < 0) {
|
||||
if (save && php_sys_lstat(path, &st) < 0) {
|
||||
if (use_realpath == CWD_REALPATH) {
|
||||
/* file not found */
|
||||
return -1;
|
||||
@@ -900,8 +1029,8 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
memcpy(tmp, path, len+1);
|
||||
|
||||
if (save && S_ISLNK(st.st_mode)) {
|
||||
if (++(*ll) > LINK_MAX || (j = readlink(tmp, path, MAXPATHLEN)) < 0) {
|
||||
/* too many links or broken symlinks */
|
||||
if (++(*ll) > LINK_MAX || (j = php_sys_readlink(tmp, path, MAXPATHLEN)) < 0) {
|
||||
/* too many links or broken symlinks */
|
||||
tsrm_free_alloca(tmp, use_heap);
|
||||
return -1;
|
||||
}
|
||||
@@ -913,10 +1042,10 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (i + j >= MAXPATHLEN-1) {
|
||||
if (i + j >= MAXPATHLEN-1) {
|
||||
tsrm_free_alloca(tmp, use_heap);
|
||||
return -1; /* buffer overflow */
|
||||
}
|
||||
}
|
||||
memmove(path+i, path, j+1);
|
||||
memcpy(path, tmp, i-1);
|
||||
path[i-1] = DEFAULT_SLASH;
|
||||
@@ -1038,18 +1167,18 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
state_cwd_length = 2;
|
||||
while (IS_SLASH(state->cwd[state_cwd_length])) {
|
||||
state_cwd_length++;
|
||||
}
|
||||
}
|
||||
while (state->cwd[state_cwd_length] &&
|
||||
!IS_SLASH(state->cwd[state_cwd_length])) {
|
||||
!IS_SLASH(state->cwd[state_cwd_length])) {
|
||||
state_cwd_length++;
|
||||
}
|
||||
}
|
||||
while (IS_SLASH(state->cwd[state_cwd_length])) {
|
||||
state_cwd_length++;
|
||||
}
|
||||
}
|
||||
while (state->cwd[state_cwd_length] &&
|
||||
!IS_SLASH(state->cwd[state_cwd_length])) {
|
||||
!IS_SLASH(state->cwd[state_cwd_length])) {
|
||||
state_cwd_length++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1061,7 +1190,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
memcpy(resolved_path + state_cwd_length + 1, path, path_length + 1);
|
||||
path_length += state_cwd_length + 1;
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
#ifdef TSRM_WIN32
|
||||
if (path_length > 2 && path[1] == ':' && !IS_SLASH(path[2])) {
|
||||
resolved_path[0] = path[0];
|
||||
@@ -1072,11 +1201,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
} else
|
||||
#endif
|
||||
memcpy(resolved_path, path, path_length + 1);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
if (memchr(resolved_path, '*', path_length) ||
|
||||
memchr(resolved_path, '?', path_length)) {
|
||||
memchr(resolved_path, '?', path_length)) {
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
@@ -1126,12 +1255,12 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
|
||||
add_slash = (use_realpath != CWD_REALPATH) && path_length > 0 && IS_SLASH(resolved_path[path_length-1]);
|
||||
t = CWDG(realpath_cache_ttl) ? 0 : -1;
|
||||
path_length = tsrm_realpath_r(resolved_path, start, path_length, &ll, &t, use_realpath, 0, NULL TSRMLS_CC);
|
||||
|
||||
|
||||
if (path_length < 0) {
|
||||
errno = ENOENT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (!start && !path_length) {
|
||||
resolved_path[path_length++] = '.';
|
||||
}
|
||||
@@ -1184,7 +1313,7 @@ verify:
|
||||
memcpy(state->cwd, resolved_path, state->cwd_length+1);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
|
||||
#if VIRTUAL_CWD_DEBUG
|
||||
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
|
||||
#endif
|
||||
@@ -1207,7 +1336,7 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
|
||||
|
||||
if (length == 0) {
|
||||
return 1; /* Can't cd to empty string */
|
||||
}
|
||||
}
|
||||
while(--length >= 0 && !IS_SLASH(path[length])) {
|
||||
}
|
||||
|
||||
@@ -1242,16 +1371,16 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
|
||||
if (!*path) {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
path = cwd;
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
path = cwd;
|
||||
}
|
||||
} else if (!IS_ABSOLUTE_PATH(path, strlen(path))) {
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
} else {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
new_state.cwd_length = 0;
|
||||
}
|
||||
|
||||
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)==0) {
|
||||
@@ -1317,7 +1446,7 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
cwd_state new_state;
|
||||
int ret;
|
||||
|
||||
|
||||
CWD_STATE_COPY(&new_state, &CWDG(cwd));
|
||||
if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH)) {
|
||||
CWD_STATE_FREE(&new_state);
|
||||
@@ -1329,9 +1458,9 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
|
||||
#else
|
||||
ret = access(new_state.cwd, mode);
|
||||
#endif
|
||||
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1352,12 +1481,12 @@ static void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */
|
||||
TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
|
||||
{
|
||||
FILETIME mtime, atime;
|
||||
HANDLE hFile;
|
||||
HANDLE hFile;
|
||||
|
||||
hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL,
|
||||
OPEN_ALWAYS, FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||
|
||||
/* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
|
||||
/* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
|
||||
the CreateFile operation succeeds */
|
||||
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
||||
SetLastError(0);
|
||||
@@ -1477,7 +1606,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */
|
||||
f = open(new_state.cwd, flags, mode);
|
||||
} else {
|
||||
f = open(new_state.cwd, flags);
|
||||
}
|
||||
}
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return f;
|
||||
}
|
||||
@@ -1556,7 +1685,6 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if !defined(TSRM_WIN32)
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
cwd_state new_state;
|
||||
@@ -1568,13 +1696,12 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ *
|
||||
return -1;
|
||||
}
|
||||
|
||||
retval = lstat(new_state.cwd, buf);
|
||||
retval = php_sys_lstat(new_state.cwd, buf);
|
||||
|
||||
CWD_STATE_FREE(&new_state);
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
@@ -1738,7 +1865,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /*
|
||||
}
|
||||
*ptr++ = '\'';
|
||||
}
|
||||
|
||||
|
||||
*ptr++ = ' ';
|
||||
*ptr++ = ';';
|
||||
*ptr++ = ' ';
|
||||
@@ -1761,18 +1888,18 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
|
||||
if (!*path) {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
path = cwd;
|
||||
new_state.cwd_length = 0;
|
||||
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
path = cwd;
|
||||
}
|
||||
} else if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
|
||||
VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
VCWD_GETCWD(cwd, MAXPATHLEN)) {
|
||||
new_state.cwd = strdup(cwd);
|
||||
new_state.cwd_length = strlen(cwd);
|
||||
} else {
|
||||
new_state.cwd = (char*)malloc(1);
|
||||
new_state.cwd[0] = '\0';
|
||||
new_state.cwd_length = 0;
|
||||
new_state.cwd_length = 0;
|
||||
}
|
||||
|
||||
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) {
|
||||
|
||||
+13
-9
@@ -14,6 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Andi Gutmans <andi@zend.com> |
|
||||
| Sascha Schumann <sascha@schumann.cx> |
|
||||
| Pierre Joye <pierre@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -107,7 +108,7 @@ typedef unsigned short mode_t;
|
||||
#define COPY_WHEN_ABSOLUTE(path) 0
|
||||
#endif
|
||||
|
||||
#ifndef IS_ABSOLUTE_PATH
|
||||
#ifndef IS_ABSOLUTE_PATH
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(IS_SLASH(path[0]))
|
||||
#endif
|
||||
@@ -129,9 +130,16 @@ typedef unsigned short mode_t;
|
||||
#endif
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat);
|
||||
CWD_API int php_sys_stat(const char *path, struct stat *buf);
|
||||
CWD_API int php_sys_lstat(const char *path, struct stat *buf);
|
||||
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);
|
||||
#else
|
||||
# define php_sys_stat stat
|
||||
# define php_sys_lstat lstat
|
||||
# ifdef HAVE_SYMLINK
|
||||
# define php_sys_readlink(link, target, target_len) readlink(link, target, target_len)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct _cwd_state {
|
||||
@@ -155,9 +163,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
|
||||
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
|
||||
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
#if !defined(TSRM_WIN32)
|
||||
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
|
||||
#endif
|
||||
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
|
||||
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
|
||||
@@ -188,7 +194,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
|
||||
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC);
|
||||
#endif
|
||||
|
||||
/* One of the following constants must be used as the last argument
|
||||
/* One of the following constants must be used as the last argument
|
||||
in virtual_file_ex() call. */
|
||||
|
||||
#define CWD_EXPAND 0 /* expand "." and ".." but dont resolve symlinks */
|
||||
@@ -216,7 +222,7 @@ typedef struct _realpath_cache_bucket {
|
||||
unsigned char is_wvalid;
|
||||
unsigned char is_writable;
|
||||
#endif
|
||||
struct _realpath_cache_bucket *next;
|
||||
struct _realpath_cache_bucket *next;
|
||||
} realpath_cache_bucket;
|
||||
|
||||
typedef struct _virtual_cwd_globals {
|
||||
@@ -244,7 +250,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
|
||||
/* The actual macros to be used in programs using TSRM
|
||||
* If the program defines VIRTUAL_DIR it will use the
|
||||
* virtual_* functions
|
||||
* virtual_* functions
|
||||
*/
|
||||
|
||||
#ifdef VIRTUAL_DIR
|
||||
@@ -261,9 +267,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
|
||||
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
|
||||
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
|
||||
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
|
||||
#if !defined(TSRM_WIN32)
|
||||
# define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#endif
|
||||
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
|
||||
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
|
||||
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
|
||||
#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC)
|
||||
|
||||
@@ -40,6 +40,9 @@ UPGRADE NOTES - PHP 5.3
|
||||
2. Changes made to existing functions
|
||||
=====================================
|
||||
|
||||
- Paths containing NULL (like /some/path\0foo.txt) are now considered invalid.
|
||||
See http://news.php.net/php.internals/50191
|
||||
|
||||
- The HTTP stream wrapper now considers all status codes from 200 to 399 to be
|
||||
successful.
|
||||
|
||||
@@ -273,6 +276,8 @@ UPGRADE NOTES - PHP 5.3
|
||||
- MySQLi: Now supports persistent connections by prepending the hostname
|
||||
with "p:".
|
||||
|
||||
- imagepstext now rejects invalid antialiasing steps and raises a warning.
|
||||
|
||||
d. no longer possible to disable
|
||||
|
||||
- PCRE
|
||||
@@ -457,6 +462,14 @@ UPGRADE NOTES - PHP 5.3
|
||||
- Firebird and SNMP support are no longer available on Windows. Firebird support
|
||||
may be reintroduced in the future.
|
||||
|
||||
=====================
|
||||
11.1 New in PHP 5.3.4
|
||||
=====================
|
||||
|
||||
- open_basedir supports now symbolic links (checks the target).
|
||||
- is_link and SplFileInfo symbolic links related method are now fully supported
|
||||
(on Windows Vista or later).
|
||||
|
||||
===================
|
||||
12. New in PHP 5.3:
|
||||
===================
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
$Id$
|
||||
|
||||
UPGRADE NOTES - PHP 5.3.4
|
||||
|
||||
1. Internal API changes
|
||||
|
||||
========================
|
||||
1. Internal API changes
|
||||
========================
|
||||
|
||||
a. stat/lstat support
|
||||
|
||||
lstat is now available on all platforms. On unix-like platform
|
||||
php_sys_lstat is an alias to lstat (when avaible). On Windows it is now
|
||||
available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended
|
||||
instead of calling lstat directly, to ensure portability.
|
||||
|
||||
b. readlink support
|
||||
|
||||
readlink is now available on all platforms. On unix-like platform
|
||||
php_sys_readlink is an alias to readlink (when avaible). On Windows it is now
|
||||
available using php_sys_readlink. php_sys_readlink usage is recommended
|
||||
instead of calling readlink directly, to ensure portability.
|
||||
+1
-1
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
|
||||
|
||||
AC_DEFUN([LIBZEND_BISON_CHECK],[
|
||||
# we only support certain bison versions
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2"
|
||||
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3"
|
||||
|
||||
# for standalone build of Zend Engine
|
||||
test -z "$SED" && SED=sed
|
||||
|
||||
@@ -30,7 +30,9 @@ if (defined("pass3")) {
|
||||
set_error_handler('errorHandler');
|
||||
define("pass2", 1);
|
||||
include(__FILE__);
|
||||
print "ok\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Error: Redefining already defined constructor for class TestClass (%sbug35634.php:12)
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -43,11 +43,11 @@ __call:
|
||||
string(3) "ABC"
|
||||
__call:
|
||||
string(3) "ABC"
|
||||
__callstatic:
|
||||
__call:
|
||||
string(3) "XYZ"
|
||||
__callstatic:
|
||||
__call:
|
||||
string(3) "WWW"
|
||||
__callstatic:
|
||||
__call:
|
||||
string(3) "ABC"
|
||||
__callstatic:
|
||||
string(1) "A"
|
||||
@@ -58,4 +58,4 @@ string(1) "C"
|
||||
__callstatic:
|
||||
string(3) "FOO"
|
||||
__callstatic:
|
||||
string(3) "FOO"
|
||||
string(3) "FOO"
|
||||
@@ -35,17 +35,17 @@ call_user_func('self::y');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
__callstatic:
|
||||
__call:
|
||||
string(3) "ABC"
|
||||
__callstatic:
|
||||
__call:
|
||||
string(3) "ABC"
|
||||
__call:
|
||||
string(3) "xyz"
|
||||
__callstatic:
|
||||
__call:
|
||||
string(3) "www"
|
||||
__call:
|
||||
string(1) "y"
|
||||
__callstatic:
|
||||
__call:
|
||||
string(1) "y"
|
||||
ok
|
||||
__callstatic:
|
||||
|
||||
@@ -29,8 +29,6 @@ $b->A();
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Redefining already defined constructor for class A in %s on line %d
|
||||
B::__construct
|
||||
A::__construct
|
||||
B::A
|
||||
|
||||
@@ -16,7 +16,4 @@ $c = new c();
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Redefining already defined constructor for class a in %s on line %d
|
||||
|
||||
Fatal error: Call to undefined method b::b() in %s on line %d
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3)
|
||||
--FILE--
|
||||
#!php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Test
|
||||
*/
|
||||
printf("__COMPILER_HALT_OFFSET__ is %d\n",__COMPILER_HALT_OFFSET__);
|
||||
|
||||
__halt_compiler();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
__COMPILER_HALT_OFFSET__ is 116
|
||||
@@ -27,6 +27,6 @@ $foo->start();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
static
|
||||
static
|
||||
static
|
||||
instance
|
||||
instance
|
||||
instance
|
||||
@@ -0,0 +1,34 @@
|
||||
--TEST--
|
||||
Bug #52160 (Invalid E_STRICT redefined constructor error)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class bar {
|
||||
function __construct() { }
|
||||
static function bar() {
|
||||
var_dump(1);
|
||||
}
|
||||
}
|
||||
|
||||
bar::bar();
|
||||
|
||||
class foo {
|
||||
static function foo() {
|
||||
var_dump(2);
|
||||
}
|
||||
function __construct() { }
|
||||
}
|
||||
|
||||
foo::foo();
|
||||
|
||||
class baz {
|
||||
static function baz() {
|
||||
var_dump(3);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Redefining already defined constructor for class foo in %s on line %d
|
||||
|
||||
Fatal error: Constructor baz::baz() cannot be static in %s on line %d
|
||||
@@ -0,0 +1,78 @@
|
||||
--TEST--
|
||||
Bug #52193 (converting closure to array yields empty array)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump((array) 1);
|
||||
var_dump((array) NULL);
|
||||
var_dump((array) new stdclass);
|
||||
var_dump($h = (array) function () { return 2; });
|
||||
var_dump($h[0]());
|
||||
|
||||
$i = function () use (&$h) {
|
||||
return $h;
|
||||
};
|
||||
|
||||
var_dump($x = (array)$i);
|
||||
var_dump($y = $x[0]);
|
||||
var_dump($y());
|
||||
|
||||
$items = range(1, 5);
|
||||
$func = function(){ return 'just a test'; };
|
||||
|
||||
array_splice($items, 0 , 4, $func);
|
||||
var_dump($items);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(1)
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
object(Closure)#%d (0) {
|
||||
}
|
||||
}
|
||||
int(2)
|
||||
array(1) {
|
||||
[0]=>
|
||||
object(Closure)#%d (1) {
|
||||
["static"]=>
|
||||
array(1) {
|
||||
["h"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
object(Closure)#%d (0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
object(Closure)#%d (1) {
|
||||
["static"]=>
|
||||
array(1) {
|
||||
["h"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
object(Closure)#%d (0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
object(Closure)#%d (0) {
|
||||
}
|
||||
}
|
||||
array(2) {
|
||||
[0]=>
|
||||
object(Closure)#%d (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(5)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #52237 (Crash when passing the reference of the property of a non-object)
|
||||
--FILE--
|
||||
<?php
|
||||
$data = 'test';
|
||||
preg_match('//', '', $data->info);
|
||||
var_dump($data);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Attempt to modify property of non-object in %sbug52237.php on line 3
|
||||
string(4) "test"
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Bug #52361 (Throwing an exception in a destructor causes invalid catching)
|
||||
--FILE--
|
||||
<?php
|
||||
class aaa {
|
||||
public function __destruct() {
|
||||
try {
|
||||
throw new Exception(__CLASS__);
|
||||
} catch(Exception $ex) {
|
||||
echo "1. $ex\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
function bbb() {
|
||||
$a = new aaa();
|
||||
throw new Exception(__FUNCTION__);
|
||||
}
|
||||
try {
|
||||
bbb();
|
||||
echo "must be skipped !!!";
|
||||
} catch(Exception $ex) {
|
||||
echo "2. $ex\n";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
1. exception 'Exception' with message 'aaa' in %sbug52361.php:5
|
||||
Stack trace:
|
||||
#0 %sbug52361.php(16): aaa->__destruct()
|
||||
#1 %sbug52361.php(16): bbb()
|
||||
#2 {main}
|
||||
2. exception 'Exception' with message 'bbb' in %sbug52361.php:13
|
||||
Stack trace:
|
||||
#0 %sbug52361.php(16): bbb()
|
||||
#1 {main}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #52484 (__set() ignores setting properties with empty names)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function __unset($prop) {
|
||||
unset($this->$prop);
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$prop = null;
|
||||
|
||||
unset($a->$prop);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot access empty property in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #52484.2 (__set() ignores setting properties with empty names)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function __set($prop, $val) {
|
||||
$this->$prop = $val;
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$prop = null;
|
||||
|
||||
$a->$prop = 2;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot access empty property in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #52484.3 (__set() ignores setting properties with empty names)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function __get($prop) {
|
||||
var_dump($this->$prop);
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$prop = null;
|
||||
|
||||
var_dump($a->$prop);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot access empty property in %s on line %d
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$file = dirname(__FILE__) .'/bug52508.ini';
|
||||
|
||||
file_put_contents($file, "a = 1");
|
||||
|
||||
$ini_array = parse_ini_file($file, true, INI_SCANNER_RAW);
|
||||
var_dump($ini_array);
|
||||
|
||||
unlink($file);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["a"]=>
|
||||
string(1) "1"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early)
|
||||
--FILE--
|
||||
<?php
|
||||
class MyClass {
|
||||
public $myRef;
|
||||
public function __set($property,$value) {
|
||||
$this->myRef = $value;
|
||||
}
|
||||
}
|
||||
$myGlobal=new MyClass($myGlobal);
|
||||
$myGlobal->myRef=&$myGlobal;
|
||||
$myGlobal->myNonExistentProperty="ok\n";
|
||||
echo $myGlobal;
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Bug #52939 (zend_call_function_array does not respect ZEND_SEND_PREFER_REF)
|
||||
--FILE--
|
||||
<?php
|
||||
$ar1 = array("row1" => 2, "row2" => 1);
|
||||
var_dump(array_multisort($ar1));
|
||||
var_dump($ar1);
|
||||
|
||||
$ar1 = array("row1" => 2, "row2" => 1);
|
||||
$args = array(&$ar1);
|
||||
var_dump(call_user_func_array("array_multisort", $args));
|
||||
var_dump($ar1);
|
||||
|
||||
$ar1 = array("row1" => 2, "row2" => 1);
|
||||
$args = array($ar1);
|
||||
var_dump(call_user_func_array("array_multisort", $args));
|
||||
var_dump($ar1);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
array(2) {
|
||||
["row2"]=>
|
||||
int(1)
|
||||
["row1"]=>
|
||||
int(2)
|
||||
}
|
||||
bool(true)
|
||||
array(2) {
|
||||
["row2"]=>
|
||||
int(1)
|
||||
["row1"]=>
|
||||
int(2)
|
||||
}
|
||||
bool(true)
|
||||
array(2) {
|
||||
["row1"]=>
|
||||
int(2)
|
||||
["row2"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #53305 (E_NOTICE when defining a constant starts with __COMPILER_HALT_OFFSET__)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
define('__COMPILER_HALT_OFFSET__1', 1);
|
||||
define('__COMPILER_HALT_OFFSET__2', 2);
|
||||
define('__COMPILER_HALT_OFFSET__', 3);
|
||||
define('__COMPILER_HALT_OFFSET__1'.chr(0), 4);
|
||||
|
||||
var_dump(__COMPILER_HALT_OFFSET__1);
|
||||
var_dump(constant('__COMPILER_HALT_OFFSET__1'.chr(0)));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d
|
||||
int(1)
|
||||
int(4)
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
zend_strtod() hangs with 2.2250738585072011e-308
|
||||
--FILE--
|
||||
<?php
|
||||
$d = 2.2250738585072011e-308;
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Done
|
||||
@@ -28,9 +28,9 @@ foo::BAZ();
|
||||
--EXPECT--
|
||||
nonstatic
|
||||
string(6) "fOoBaR"
|
||||
static
|
||||
nonstatic
|
||||
string(6) "foOBAr"
|
||||
static
|
||||
nonstatic
|
||||
string(6) "fOOBAr"
|
||||
static
|
||||
string(3) "bAr"
|
||||
|
||||
@@ -30,5 +30,5 @@ a::Foo();
|
||||
--EXPECT--
|
||||
__callstatic: Test
|
||||
__call: Test
|
||||
__callstatic: Bar
|
||||
__call: Bar
|
||||
__callstatic: Foo
|
||||
@@ -1,5 +1,11 @@
|
||||
--TEST--
|
||||
Testing declare statement with several type values
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (in_array("detect_unicode", array_keys(ini_get_all()))) {
|
||||
die("skip");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
GC 032: Crash in GC because of invalid reference counting
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array();
|
||||
$b =& $a;
|
||||
$a[0] = $a;
|
||||
debug_zval_dump($a);
|
||||
$a = array(array());
|
||||
$b =& $a;
|
||||
$a[0][0] = $a;
|
||||
debug_zval_dump($a);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) refcount(1){
|
||||
[0]=>
|
||||
array(1) refcount(3){
|
||||
[0]=>
|
||||
array(1) refcount(3){
|
||||
[0]=>
|
||||
*RECURSION*
|
||||
}
|
||||
}
|
||||
}
|
||||
array(1) refcount(1){
|
||||
[0]=>
|
||||
array(1) refcount(3){
|
||||
[0]=>
|
||||
array(1) refcount(1){
|
||||
[0]=>
|
||||
array(1) refcount(3){
|
||||
[0]=>
|
||||
array(1) refcount(1){
|
||||
[0]=>
|
||||
*RECURSION*
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -14,6 +14,5 @@ class test {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Redefining already defined constructor for class test in %s on line %d
|
||||
--EXPECT--
|
||||
Done
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Covariant return-by-ref constraints
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A implements ArrayAccess {
|
||||
public $foo = array();
|
||||
|
||||
public function &offsetGet($n) {
|
||||
return $this->foo[$n];
|
||||
}
|
||||
|
||||
public function offsetSet($n, $v) {
|
||||
}
|
||||
public function offsetUnset($n) {
|
||||
}
|
||||
public function offsetExists($n) {
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
|
||||
$a['foo']['bar'] = 2;
|
||||
|
||||
var_dump($a);
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
object(A)#1 (1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
["bar"]=>
|
||||
int(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
==DONE==
|
||||
@@ -19,7 +19,7 @@ echo $HTTP_SESSION_VARS;
|
||||
echo "\nok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
|
||||
Deprecated: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
|
||||
ok
|
||||
|
||||
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at %sunset_cv05.php on line %d
|
||||
|
||||
@@ -19,7 +19,7 @@ echo $x;
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
|
||||
Deprecated: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
|
||||
1
|
||||
|
||||
Deprecated: Function session_register() is deprecated in %s on line %d
|
||||
|
||||
+1
-1
@@ -1082,7 +1082,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
|
||||
} else {
|
||||
ALLOC_HASHTABLE_REL(object->properties);
|
||||
zend_hash_init(object->properties, zend_hash_num_elements(&class_type->default_properties), NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
} else {
|
||||
Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC);
|
||||
|
||||
+1
-1
@@ -1115,7 +1115,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
|
||||
mm_heap->large_free_buckets[i]->parent = &mm_heap->large_free_buckets[i];
|
||||
}
|
||||
}
|
||||
mm_heap->rest_buckets[0]->next_free_block = mm_heap->rest_buckets[1]->prev_free_block = ZEND_MM_REST_BUCKET(mm_heap);
|
||||
mm_heap->rest_buckets[0] = mm_heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(mm_heap);
|
||||
|
||||
free(heap);
|
||||
heap = mm_heap;
|
||||
|
||||
+17
-9
@@ -1277,9 +1277,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
|
||||
/* Improve after RC: cache the lowercase class name */
|
||||
|
||||
if ((CG(active_class_entry)->name_length == name_len) && (!memcmp(class_lcname, lcname, name_len))) {
|
||||
if (CG(active_class_entry)->constructor) {
|
||||
zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);
|
||||
} else {
|
||||
if (!CG(active_class_entry)->constructor) {
|
||||
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
|
||||
}
|
||||
} else if ((name_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)))) {
|
||||
@@ -2534,13 +2532,16 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
|
||||
{
|
||||
zend_uint i;
|
||||
|
||||
/* If it's a user function then arg_info == NULL means we don't have any parameters but we still need to do the arg number checks. We are only willing to ignore this for internal functions because extensions don't always define arg_info. */
|
||||
/* If it's a user function then arg_info == NULL means we don't have any parameters but
|
||||
* we still need to do the arg number checks. We are only willing to ignore this for internal
|
||||
* functions because extensions don't always define arg_info.
|
||||
*/
|
||||
if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Checks for constructors only if they are declared in an interface */
|
||||
if ((fe->common.fn_flags & ZEND_ACC_CTOR) && !(proto->common.scope->ce_flags & ZEND_ACC_INTERFACE)) {
|
||||
if ((fe->common.fn_flags & ZEND_ACC_CTOR) && (proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2550,12 +2551,14 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (proto->common.pass_rest_by_reference
|
||||
if (fe->common.type != ZEND_USER_FUNCTION
|
||||
&& proto->common.pass_rest_by_reference
|
||||
&& !fe->common.pass_rest_by_reference) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fe->common.return_reference != proto->common.return_reference) {
|
||||
/* by-ref constraints on return values are covariant */
|
||||
if (proto->common.return_reference && !fe->common.return_reference) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2579,6 +2582,8 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
|
||||
/* Only one has an array type hint and the other one doesn't */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* by-ref constraints on arguments are invariant */
|
||||
if (fe->common.arg_info[i].pass_by_reference != proto->common.arg_info[i].pass_by_reference) {
|
||||
return 0;
|
||||
}
|
||||
@@ -2816,6 +2821,9 @@ static int inherit_static_prop(zval **p TSRMLS_DC, int num_args, va_list args, c
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define zval_property_ctor(parent_ce, ce) \
|
||||
((copy_ctor_func_t) (((parent_ce)->type != (ce)->type) ? zval_shared_property_ctor : zval_add_ref))
|
||||
|
||||
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
if ((ce->ce_flags & ZEND_ACC_INTERFACE)
|
||||
@@ -2839,7 +2847,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
|
||||
zend_do_inherit_interfaces(ce, parent_ce TSRMLS_CC);
|
||||
|
||||
/* Inherit properties */
|
||||
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
|
||||
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
|
||||
if (parent_ce->type != ce->type) {
|
||||
/* User class extends internal class */
|
||||
zend_update_class_constants(parent_ce TSRMLS_CC);
|
||||
@@ -2849,7 +2857,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
|
||||
}
|
||||
zend_hash_merge_ex(&ce->properties_info, &parent_ce->properties_info, (copy_ctor_func_t) (ce->type & ZEND_INTERNAL_CLASS ? zend_duplicate_property_info_internal : zend_duplicate_property_info), sizeof(zend_property_info), (merge_checker_func_t) do_inherit_property_access_check, ce);
|
||||
|
||||
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
|
||||
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
|
||||
zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (merge_checker_func_t) do_inherit_method_check, ce);
|
||||
do_inherit_parent_constructor(ce);
|
||||
|
||||
|
||||
+10
-2
@@ -434,8 +434,16 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
if ((strncmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1) == 0) ||
|
||||
zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
|
||||
/* Check if the user is trying to define the internal pseudo constant name __COMPILER_HALT_OFFSET__ */
|
||||
if ((c->name_len == sizeof("__COMPILER_HALT_OFFSET__")
|
||||
&& !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1))
|
||||
|| zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
|
||||
|
||||
/* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
|
||||
if (c->name[0] == '\0' && c->name_len > sizeof("\0__COMPILER_HALT_OFFSET__")
|
||||
&& memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) {
|
||||
name++;
|
||||
}
|
||||
zend_error(E_NOTICE,"Constant %s already defined", name);
|
||||
free(c->name);
|
||||
if (!(c->flags & CONST_PERSISTENT)) {
|
||||
|
||||
@@ -137,7 +137,7 @@ static zend_object_value zend_default_exception_new_ex(zend_class_entry *class_t
|
||||
|
||||
ALLOC_HASHTABLE(object->properties);
|
||||
zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
|
||||
|
||||
ALLOC_ZVAL(trace);
|
||||
Z_UNSET_ISREF_P(trace);
|
||||
@@ -572,6 +572,7 @@ ZEND_METHOD(exception, __toString)
|
||||
zend_call_function(&fci, NULL TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_P(trace) != IS_STRING) {
|
||||
zval_ptr_dtor(&trace);
|
||||
trace = NULL;
|
||||
}
|
||||
|
||||
@@ -592,6 +593,10 @@ ZEND_METHOD(exception, __toString)
|
||||
zval_dtor(&line);
|
||||
|
||||
exception = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, 0 TSRMLS_CC);
|
||||
|
||||
if (trace) {
|
||||
zval_ptr_dtor(&trace);
|
||||
}
|
||||
}
|
||||
zval_dtor(&fname);
|
||||
|
||||
@@ -599,10 +604,6 @@ ZEND_METHOD(exception, __toString)
|
||||
* the result in uncaught exception handlers without memleaks. */
|
||||
zend_update_property_string(default_exception_ce, getThis(), "string", sizeof("string")-1, str TSRMLS_CC);
|
||||
|
||||
if (trace) {
|
||||
zval_ptr_dtor(&trace);
|
||||
}
|
||||
|
||||
RETURN_STRINGL(str, len, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+1
-1
@@ -714,8 +714,8 @@ static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value
|
||||
ALLOC_ZVAL(variable_ptr);
|
||||
*variable_ptr_ptr = variable_ptr;
|
||||
*variable_ptr = *value;
|
||||
zval_copy_ctor(variable_ptr);
|
||||
Z_SET_REFCOUNT_P(variable_ptr, 1);
|
||||
zval_copy_ctor(variable_ptr);
|
||||
} else {
|
||||
*variable_ptr_ptr = value;
|
||||
Z_ADDREF_P(value);
|
||||
|
||||
@@ -870,7 +870,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
if (Z_REFCOUNT_PP(fci->params[i]) > 1) {
|
||||
zval *new_zval;
|
||||
|
||||
if (fci->no_separation) {
|
||||
if (fci->no_separation &&
|
||||
!ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) {
|
||||
if(i) {
|
||||
/* hack to clean up the stack */
|
||||
zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC);
|
||||
|
||||
+3
-1
@@ -78,7 +78,9 @@ extern ZEND_API void zend_ensure_fpu_mode(TSRMLS_D);
|
||||
# define HAVE__CONTROLFP
|
||||
# endif /* MSC_VER >= 1500 */
|
||||
/* Tell MSVC optimizer that we access FP environment */
|
||||
# pragma fenv_access (on)
|
||||
# if _MSC_VER >= 1500
|
||||
# pragma fenv_access (on)
|
||||
# endif
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#ifdef HAVE__CONTROLFP_S
|
||||
|
||||
+23
-19
@@ -414,19 +414,21 @@ static void gc_mark_roots(TSRMLS_D)
|
||||
gc_root_buffer *current = GC_G(roots).next;
|
||||
|
||||
while (current != &GC_G(roots)) {
|
||||
if (current->handle && EG(objects_store).object_buckets) {
|
||||
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
|
||||
if (current->handle) {
|
||||
if (EG(objects_store).object_buckets) {
|
||||
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
|
||||
|
||||
if (GC_GET_COLOR(obj->buffered) == GC_PURPLE) {
|
||||
zval z;
|
||||
if (GC_GET_COLOR(obj->buffered) == GC_PURPLE) {
|
||||
zval z;
|
||||
|
||||
INIT_PZVAL(&z);
|
||||
Z_OBJ_HANDLE(z) = current->handle;
|
||||
Z_OBJ_HT(z) = current->u.handlers;
|
||||
zobj_mark_grey(obj, &z TSRMLS_CC);
|
||||
} else {
|
||||
GC_SET_ADDRESS(obj->buffered, NULL);
|
||||
GC_REMOVE_FROM_BUFFER(current);
|
||||
INIT_PZVAL(&z);
|
||||
Z_OBJ_HANDLE(z) = current->handle;
|
||||
Z_OBJ_HT(z) = current->u.handlers;
|
||||
zobj_mark_grey(obj, &z TSRMLS_CC);
|
||||
} else {
|
||||
GC_SET_ADDRESS(obj->buffered, NULL);
|
||||
GC_REMOVE_FROM_BUFFER(current);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (GC_ZVAL_GET_COLOR(current->u.pz) == GC_PURPLE) {
|
||||
@@ -623,15 +625,17 @@ static void gc_collect_roots(TSRMLS_D)
|
||||
gc_root_buffer *current = GC_G(roots).next;
|
||||
|
||||
while (current != &GC_G(roots)) {
|
||||
if (current->handle && EG(objects_store).object_buckets) {
|
||||
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
|
||||
zval z;
|
||||
if (current->handle) {
|
||||
if (EG(objects_store).object_buckets) {
|
||||
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
|
||||
zval z;
|
||||
|
||||
GC_SET_ADDRESS(obj->buffered, NULL);
|
||||
INIT_PZVAL(&z);
|
||||
Z_OBJ_HANDLE(z) = current->handle;
|
||||
Z_OBJ_HT(z) = current->u.handlers;
|
||||
zobj_collect_white(&z TSRMLS_CC);
|
||||
GC_SET_ADDRESS(obj->buffered, NULL);
|
||||
INIT_PZVAL(&z);
|
||||
Z_OBJ_HANDLE(z) = current->handle;
|
||||
Z_OBJ_HT(z) = current->u.handlers;
|
||||
zobj_collect_white(&z TSRMLS_CC);
|
||||
}
|
||||
} else {
|
||||
GC_ZVAL_SET_ADDRESS(current->u.pz, NULL);
|
||||
zval_collect_white(current->u.pz TSRMLS_CC);
|
||||
|
||||
@@ -63,6 +63,9 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin
|
||||
case HT_CLEANING:
|
||||
zend_output_debug_string(1, "%s(%d) : ht=%p is being cleaned", file, line, ht);
|
||||
break;
|
||||
default:
|
||||
zend_output_debug_string(1, "%s(%d) : ht=%p is inconsistent", file, line, ht);
|
||||
break;
|
||||
}
|
||||
zend_bailout();
|
||||
}
|
||||
|
||||
+4
-4
@@ -312,7 +312,7 @@ END_EXTERN_C()
|
||||
} \
|
||||
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
|
||||
const char *end = key + length - 1; \
|
||||
long idx; \
|
||||
ulong idx; \
|
||||
\
|
||||
if ((*end != '\0') /* not a null terminated string */ \
|
||||
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
|
||||
@@ -328,11 +328,11 @@ END_EXTERN_C()
|
||||
} \
|
||||
if (tmp == end) { \
|
||||
if (*key == '-') { \
|
||||
idx = -idx; \
|
||||
if (idx > 0) { /* overflow */ \
|
||||
if (idx-1 > LONG_MAX) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
} else if (idx < 0) { /* overflow */ \
|
||||
idx = (ulong)(-(long)idx); \
|
||||
} else if (idx > LONG_MAX) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
return func; \
|
||||
|
||||
+18
-1
@@ -304,7 +304,7 @@ statement:
|
||||
;
|
||||
|
||||
section_string_or_value:
|
||||
var_string_list { $$ = $1; }
|
||||
var_string_list_section { $$ = $1; }
|
||||
| /* empty */ { zend_ini_init_string(&$$); }
|
||||
;
|
||||
|
||||
@@ -326,6 +326,15 @@ encapsed_list:
|
||||
| /* empty */ { zend_ini_init_string(&$$); }
|
||||
;
|
||||
|
||||
var_string_list_section:
|
||||
cfg_var_ref { $$ = $1; }
|
||||
| constant_literal { $$ = $1; }
|
||||
| '"' encapsed_list '"' { $$ = $2; }
|
||||
| var_string_list_section cfg_var_ref { zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); }
|
||||
| var_string_list_section constant_literal { zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); }
|
||||
| var_string_list_section '"' encapsed_list '"' { zend_ini_add_string(&$$, &$1, &$3); free(Z_STRVAL($3)); }
|
||||
;
|
||||
|
||||
var_string_list:
|
||||
cfg_var_ref { $$ = $1; }
|
||||
| constant_string { $$ = $1; }
|
||||
@@ -348,6 +357,14 @@ cfg_var_ref:
|
||||
TC_DOLLAR_CURLY TC_VARNAME '}' { zend_ini_get_var(&$$, &$2 TSRMLS_CC); free(Z_STRVAL($2)); }
|
||||
;
|
||||
|
||||
constant_literal:
|
||||
TC_CONSTANT { $$ = $1; }
|
||||
| TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
|
||||
| TC_NUMBER { $$ = $1; /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
|
||||
| TC_STRING { $$ = $1; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
|
||||
| TC_WHITESPACE { $$ = $1; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
|
||||
;
|
||||
|
||||
constant_string:
|
||||
TC_CONSTANT { zend_ini_get_constant(&$$, &$1 TSRMLS_CC); }
|
||||
| TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
|
||||
|
||||
+1473
-1465
File diff suppressed because it is too large.
Load diff
@@ -344,7 +344,7 @@ DOLLAR_CURLY "${"
|
||||
|
||||
SECTION_RAW_CHARS [^\]\n\r]
|
||||
SINGLE_QUOTED_CHARS [^']
|
||||
RAW_VALUE_CHARS [^\n\r;]
|
||||
RAW_VALUE_CHARS [^\n\r;\000]
|
||||
|
||||
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
|
||||
VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Tue May 25 22:53:58 2010 */
|
||||
/* Generated by re2c 0.13.5 on Sun Aug 1 12:07:43 2010 */
|
||||
#line 3 "Zend/zend_ini_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
||||
+348
-336
File diff suppressed because it is too large.
Load diff
@@ -139,8 +139,10 @@ static void yy_pop_state(TSRMLS_D)
|
||||
static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
|
||||
{
|
||||
YYCURSOR = (YYCTYPE*)str;
|
||||
SCNG(yy_start) = YYCURSOR;
|
||||
YYLIMIT = YYCURSOR + len;
|
||||
if (!SCNG(yy_start)) {
|
||||
SCNG(yy_start) = YYCURSOR;
|
||||
}
|
||||
}
|
||||
|
||||
void startup_scanner(TSRMLS_D)
|
||||
@@ -241,7 +243,14 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
|
||||
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
|
||||
{
|
||||
char *file_path = NULL, *buf;
|
||||
size_t size;
|
||||
size_t size, offset = 0;
|
||||
|
||||
/* The shebang line was read, get the current position to obtain the buffer start */
|
||||
if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
|
||||
if ((offset = ftell(file_handle->handle.fp)) == -1) {
|
||||
offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_stream_fixup(file_handle, &buf, &size TSRMLS_CC) == FAILURE) {
|
||||
return FAILURE;
|
||||
@@ -257,6 +266,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
|
||||
|
||||
/* Reset the scanner for scanning the new file */
|
||||
SCNG(yy_in) = file_handle;
|
||||
SCNG(yy_start) = NULL;
|
||||
|
||||
if (size != -1) {
|
||||
#ifdef ZEND_MULTIBYTE
|
||||
@@ -274,10 +284,15 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
|
||||
SCNG(script_filtered_size) = SCNG(script_org_size);
|
||||
} else {
|
||||
SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
|
||||
if (SCNG(script_filtered) == NULL) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
|
||||
"encoding \"%s\" to a compatible encoding", LANG_SCNG(script_encoding)->name);
|
||||
}
|
||||
}
|
||||
|
||||
SCNG(yy_start) = SCNG(script_filtered) - offset;
|
||||
yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
|
||||
#else /* !ZEND_MULTIBYTE */
|
||||
SCNG(yy_start) = buf - offset;
|
||||
yy_scan_buffer(buf, size TSRMLS_CC);
|
||||
#endif /* ZEND_MULTIBYTE */
|
||||
} else {
|
||||
@@ -413,6 +428,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
|
||||
memset(str->value.str.val + str->value.str.len, 0, ZEND_MMAP_AHEAD);
|
||||
|
||||
SCNG(yy_in)=NULL;
|
||||
SCNG(yy_start) = NULL;
|
||||
|
||||
#ifdef ZEND_MULTIBYTE
|
||||
SCNG(script_org) = (unsigned char *)estrdup(str->value.str.val);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Mon Jan 11 14:20:20 2010 */
|
||||
/* Generated by re2c 0.13.5 on Tue Jun 29 08:18:52 2010 */
|
||||
#line 3 "Zend/zend_language_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
||||
+44
-10
@@ -340,13 +340,16 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
|
||||
property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__get != NULL) TSRMLS_CC);
|
||||
|
||||
if (!property_info || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE) {
|
||||
zend_guard *guard;
|
||||
zend_guard *guard = NULL;
|
||||
|
||||
if (zobj->ce->__get &&
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
|
||||
!guard->in_get) {
|
||||
/* have getter - try with it! */
|
||||
Z_ADDREF_P(object);
|
||||
if (PZVAL_IS_REF(object)) {
|
||||
SEPARATE_ZVAL(&object);
|
||||
}
|
||||
guard->in_get = 1; /* prevent circular getting */
|
||||
rv = zend_std_call_getter(object, member TSRMLS_CC);
|
||||
guard->in_get = 0;
|
||||
@@ -373,6 +376,15 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
|
||||
}
|
||||
zval_ptr_dtor(&object);
|
||||
} else {
|
||||
if (zobj->ce->__get && guard && guard->in_get == 1) {
|
||||
if (Z_STRVAL_P(member)[0] == '\0') {
|
||||
if (Z_STRLEN_P(member) == 0) {
|
||||
zend_error(E_ERROR, "Cannot access empty property");
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot access property started with '\\0'");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!silent) {
|
||||
zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
|
||||
}
|
||||
@@ -436,22 +448,22 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int setter_done = 0;
|
||||
zend_guard *guard;
|
||||
zend_guard *guard = NULL;
|
||||
|
||||
if (zobj->ce->__set &&
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
|
||||
!guard->in_set) {
|
||||
Z_ADDREF_P(object);
|
||||
if (PZVAL_IS_REF(object)) {
|
||||
SEPARATE_ZVAL(&object);
|
||||
}
|
||||
guard->in_set = 1; /* prevent circular setting */
|
||||
if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) {
|
||||
/* for now, just ignore it - __set should take care of warnings, etc. */
|
||||
}
|
||||
setter_done = 1;
|
||||
guard->in_set = 0;
|
||||
zval_ptr_dtor(&object);
|
||||
}
|
||||
if (!setter_done && property_info) {
|
||||
} else if (property_info) {
|
||||
zval **foo;
|
||||
|
||||
/* if we assign referenced variable, we should separate it */
|
||||
@@ -460,6 +472,14 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
|
||||
SEPARATE_ZVAL(&value);
|
||||
}
|
||||
zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &value, sizeof(zval *), (void **) &foo);
|
||||
} else if (zobj->ce->__set && guard && guard->in_set == 1) {
|
||||
if (Z_STRVAL_P(member)[0] == '\0') {
|
||||
if (Z_STRLEN_P(member) == 0) {
|
||||
zend_error(E_ERROR, "Cannot access empty property");
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot access property started with '\\0'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,17 +639,28 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{
|
||||
property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__unset != NULL) TSRMLS_CC);
|
||||
|
||||
if (!property_info || zend_hash_quick_del(zobj->properties, property_info->name, property_info->name_length+1, property_info->h) == FAILURE) {
|
||||
zend_guard *guard;
|
||||
zend_guard *guard = NULL;
|
||||
|
||||
if (zobj->ce->__unset &&
|
||||
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
|
||||
!guard->in_unset) {
|
||||
/* have unseter - try with it! */
|
||||
Z_ADDREF_P(object);
|
||||
if (PZVAL_IS_REF(object)) {
|
||||
SEPARATE_ZVAL(&object);
|
||||
}
|
||||
guard->in_unset = 1; /* prevent circular unsetting */
|
||||
zend_std_call_unsetter(object, member TSRMLS_CC);
|
||||
guard->in_unset = 0;
|
||||
zval_ptr_dtor(&object);
|
||||
} else if (zobj->ce->__unset && guard && guard->in_unset == 1) {
|
||||
if (Z_STRVAL_P(member)[0] == '\0') {
|
||||
if (Z_STRLEN_P(member) == 0) {
|
||||
zend_error(E_ERROR, "Cannot access empty property");
|
||||
} else {
|
||||
zend_error(E_ERROR, "Cannot access property started with '\\0'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -953,13 +984,13 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
|
||||
if (!fbc && zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)==FAILURE) {
|
||||
efree(lc_function_name);
|
||||
|
||||
if (ce->__callstatic) {
|
||||
return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
|
||||
} else if (ce->__call &&
|
||||
if (ce->__call &&
|
||||
EG(This) &&
|
||||
Z_OBJ_HT_P(EG(This))->get_class_entry &&
|
||||
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
|
||||
return zend_get_user_call_function(ce, function_name_strval, function_name_strlen);
|
||||
} else if (ce->__callstatic) {
|
||||
return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1144,6 +1175,9 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
|
||||
|
||||
/* have issetter - try with it! */
|
||||
Z_ADDREF_P(object);
|
||||
if (PZVAL_IS_REF(object)) {
|
||||
SEPARATE_ZVAL(&object);
|
||||
}
|
||||
guard->in_isset = 1; /* prevent circular getting */
|
||||
rv = zend_std_call_issetter(object, member TSRMLS_CC);
|
||||
if (rv) {
|
||||
|
||||
+3
-5
@@ -106,15 +106,13 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
|
||||
zend_error(E_ERROR, "Attempt to destruct pending exception");
|
||||
} else {
|
||||
old_exception = EG(exception);
|
||||
Z_ADDREF_P(old_exception);
|
||||
EG(exception) = NULL;
|
||||
}
|
||||
}
|
||||
zend_exception_save(TSRMLS_C);
|
||||
zend_call_method_with_0_params(&obj, object->ce, &destructor, ZEND_DESTRUCTOR_FUNC_NAME, NULL);
|
||||
zend_exception_restore(TSRMLS_C);
|
||||
if (old_exception) {
|
||||
if (EG(exception)) {
|
||||
zval_ptr_dtor(&old_exception);
|
||||
zend_exception_set_previous(EG(exception), old_exception TSRMLS_CC);
|
||||
} else {
|
||||
EG(exception) = old_exception;
|
||||
}
|
||||
@@ -148,7 +146,7 @@ ZEND_API zend_object *zend_objects_get_address(const zval *zobject TSRMLS_DC)
|
||||
|
||||
ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC)
|
||||
{
|
||||
zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
|
||||
zend_hash_copy(new_object->properties, old_object->properties, zval_copy_property_ctor(old_object->ce), (void *) NULL /* Not used anymore */, sizeof(zval *));
|
||||
|
||||
if (old_object->ce->clone) {
|
||||
zval *new_obj;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "zend_multiply.h"
|
||||
#include "zend_strtod.h"
|
||||
#include "zend_exceptions.h"
|
||||
#include "zend_closures.h"
|
||||
|
||||
#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
|
||||
|
||||
@@ -646,7 +647,14 @@ ZEND_API void convert_to_array(zval *op) /* {{{ */
|
||||
|
||||
ALLOC_HASHTABLE(ht);
|
||||
zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
if (Z_OBJ_HT_P(op)->get_properties) {
|
||||
if (Z_OBJCE_P(op) == zend_ce_closure) {
|
||||
convert_scalar_to_array(op, IS_ARRAY TSRMLS_CC);
|
||||
if (Z_TYPE_P(op) == IS_ARRAY) {
|
||||
zend_hash_destroy(ht);
|
||||
FREE_HASHTABLE(ht);
|
||||
return;
|
||||
}
|
||||
} else if (Z_OBJ_HT_P(op)->get_properties) {
|
||||
HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op TSRMLS_CC);
|
||||
if (obj_ht) {
|
||||
zend_hash_copy(ht, obj_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
|
||||
+1
-1
@@ -2035,7 +2035,7 @@ ZEND_API double zend_strtod (CONST char *s00, char **se)
|
||||
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
|
||||
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
|
||||
CONST char *s, *s0, *s1;
|
||||
double aadj, aadj1, adj;
|
||||
volatile double aadj, aadj1, adj;
|
||||
volatile _double rv, rv0;
|
||||
Long L;
|
||||
ULong y, z;
|
||||
|
||||
@@ -159,6 +159,17 @@ ZEND_API void _zval_dtor_wrapper(zval *zvalue)
|
||||
zval_dtor(zvalue);
|
||||
}
|
||||
|
||||
ZEND_API void zval_property_ctor(zval **p) /* {{{ */
|
||||
{
|
||||
zval *orig_ptr = *p;
|
||||
|
||||
ALLOC_ZVAL(*p);
|
||||
**p = *orig_ptr;
|
||||
zval_copy_ctor(*p);
|
||||
Z_SET_REFCOUNT_PP(p, 1);
|
||||
Z_UNSET_ISREF_PP(p);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)
|
||||
|
||||
@@ -76,6 +76,17 @@ ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue);
|
||||
|
||||
ZEND_API void zval_add_ref(zval **p);
|
||||
|
||||
ZEND_API void zval_property_ctor(zval **);
|
||||
|
||||
#ifdef ZTS
|
||||
# define zval_shared_property_ctor zval_property_ctor
|
||||
#else
|
||||
# define zval_shared_property_ctor zval_add_ref
|
||||
#endif
|
||||
|
||||
#define zval_copy_property_ctor(ce) ((copy_ctor_func_t) (((ce)->type == ZEND_INTERNAL_CLASS) ? zval_shared_property_ctor : zval_add_ref))
|
||||
|
||||
|
||||
END_EXTERN_C()
|
||||
|
||||
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
|
||||
|
||||
+10
-3
@@ -2693,9 +2693,16 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
|
||||
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
|
||||
}
|
||||
if (OP1_TYPE == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
|
||||
Z_DELREF_PP(varptr_ptr);
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
INIT_ZVAL(**varptr_ptr);
|
||||
Z_SET_REFCOUNT_PP(varptr_ptr, 0);
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
|
||||
+64
-6
@@ -1880,6 +1880,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
||||
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
@@ -1933,6 +1943,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -5154,6 +5165,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
||||
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
@@ -5207,6 +5228,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -8341,9 +8363,16 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
|
||||
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
if (IS_VAR == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
|
||||
Z_DELREF_PP(varptr_ptr);
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
INIT_ZVAL(**varptr_ptr);
|
||||
Z_SET_REFCOUNT_PP(varptr_ptr, 0);
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
@@ -8517,6 +8546,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
||||
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
@@ -8570,6 +8609,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
@@ -22207,9 +22247,16 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
|
||||
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
if (IS_CV == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
|
||||
Z_DELREF_PP(varptr_ptr);
|
||||
ALLOC_ZVAL(*varptr_ptr);
|
||||
INIT_ZVAL(**varptr_ptr);
|
||||
Z_SET_REFCOUNT_PP(varptr_ptr, 0);
|
||||
}
|
||||
|
||||
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
|
||||
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
}
|
||||
|
||||
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
|
||||
varptr = *varptr_ptr;
|
||||
@@ -22373,6 +22420,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
||||
|
||||
return_value_used = RETURN_VALUE_USED(opline);
|
||||
|
||||
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
|
||||
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
|
||||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
|
||||
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
} else {
|
||||
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (Z_LVAL(opline->op2.u.constant)) {
|
||||
case ZEND_INCLUDE_ONCE:
|
||||
case ZEND_REQUIRE_ONCE: {
|
||||
@@ -22426,6 +22483,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
done:
|
||||
if (inc_filename==&tmp_inc_filename) {
|
||||
zval_dtor(&tmp_inc_filename);
|
||||
}
|
||||
|
||||
+20
-15
@@ -711,10 +711,7 @@ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
|
||||
AC_ARG_WITH($1,[$3],$5=[$]withval,
|
||||
[
|
||||
$5=ifelse($4,,no,$4)
|
||||
|
||||
if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
|
||||
$5=$PHP_ENABLE_ALL
|
||||
fi
|
||||
ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
|
||||
])
|
||||
PHP_ARG_ANALYZE($5,[$2],$6)
|
||||
])
|
||||
@@ -739,10 +736,7 @@ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
|
||||
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
|
||||
[
|
||||
$5=ifelse($4,,no,$4)
|
||||
|
||||
if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
|
||||
$5=$PHP_ENABLE_ALL
|
||||
fi
|
||||
ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
|
||||
])
|
||||
PHP_ARG_ANALYZE($5,[$2],$6)
|
||||
])
|
||||
@@ -884,6 +878,17 @@ dnl and optionally also the source-files for the SAPI-specific
|
||||
dnl objects.
|
||||
dnl
|
||||
AC_DEFUN([PHP_SELECT_SAPI],[
|
||||
if test "$PHP_SAPI" != "default"; then
|
||||
AC_MSG_ERROR([
|
||||
+--------------------------------------------------------------------+
|
||||
| *** ATTENTION *** |
|
||||
| |
|
||||
| You've configured multiple SAPIs to be build. You can build only |
|
||||
| one SAPI module and CLI binary at the same time. |
|
||||
+--------------------------------------------------------------------+
|
||||
])
|
||||
fi
|
||||
|
||||
PHP_SAPI=$1
|
||||
|
||||
case "$2" in
|
||||
@@ -2661,13 +2666,13 @@ EOF
|
||||
for arg in $ac_configure_args; do
|
||||
if test `expr -- $arg : "'.*"` = 0; then
|
||||
if test `expr -- $arg : "--.*"` = 0; then
|
||||
break;
|
||||
break;
|
||||
fi
|
||||
echo "'[$]arg' \\" >> $1
|
||||
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
|
||||
else
|
||||
if test `expr -- $arg : "'--.*"` = 0; then
|
||||
break;
|
||||
break;
|
||||
fi
|
||||
echo "[$]arg \\" >> $1
|
||||
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
|
||||
@@ -2687,19 +2692,19 @@ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
|
||||
for arg in $ac_configure_args; do
|
||||
case $arg in
|
||||
--with-*[)]
|
||||
arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
|
||||
arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
|
||||
;;
|
||||
--without-*[)]
|
||||
arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
|
||||
arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
|
||||
;;
|
||||
--enable-*[)]
|
||||
arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
|
||||
arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
|
||||
;;
|
||||
--disable-*[)]
|
||||
arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
|
||||
arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
|
||||
;;
|
||||
*[)]
|
||||
continue
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
case $arg_name in
|
||||
|
||||
+6
-6
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=3
|
||||
PHP_EXTRA_VERSION="-RC1"
|
||||
PHP_RELEASE_VERSION=5
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
@@ -611,7 +611,7 @@ asprintf \
|
||||
)
|
||||
|
||||
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
|
||||
PHP_CHECK_FUNC(nanosleep, rt)
|
||||
PHP_CHECK_FUNC_LIB(nanosleep, rt)
|
||||
|
||||
dnl Check for getaddrinfo, should be a better way, but...
|
||||
dnl Also check for working getaddrinfo
|
||||
@@ -764,7 +764,7 @@ if test "$PHP_DEBUG" = "yes"; then
|
||||
changequote([,])
|
||||
dnl add -O0 only if GCC or ICC is used
|
||||
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -g -O0"
|
||||
CFLAGS="$CFLAGS -O0"
|
||||
CXXFLAGS="$CXXFLAGS -g -O0"
|
||||
fi
|
||||
if test "$SUNCC" = "yes"; then
|
||||
@@ -1329,8 +1329,8 @@ dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
|
||||
dnl This hack works around it. Ugly.
|
||||
case $host_alias in
|
||||
*darwin9*|*darwin10*)
|
||||
ac_cv_exeext=
|
||||
;;
|
||||
ac_cv_exeext=
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
|
||||
|
||||
+16
-4
@@ -85,14 +85,23 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_bzdecompress, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, small)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzwrite, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, fp)
|
||||
ZEND_ARG_INFO(0, str)
|
||||
ZEND_ARG_INFO(0, length)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_bzflush, 0)
|
||||
ZEND_ARG_INFO(0, fp)
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
static const zend_function_entry bz2_functions[] = {
|
||||
PHP_FE(bzopen, arginfo_bzopen)
|
||||
PHP_FE(bzread, arginfo_bzread)
|
||||
PHP_FALIAS(bzwrite, fwrite, NULL)
|
||||
PHP_FALIAS(bzflush, fflush, NULL)
|
||||
PHP_FALIAS(bzclose, fclose, NULL)
|
||||
PHP_FALIAS(bzwrite, fwrite, arginfo_bzwrite)
|
||||
PHP_FALIAS(bzflush, fflush, arginfo_bzflush)
|
||||
PHP_FALIAS(bzclose, fclose, arginfo_bzflush)
|
||||
PHP_FE(bzerrno, arginfo_bzerrno)
|
||||
PHP_FE(bzerrstr, arginfo_bzerrstr)
|
||||
PHP_FE(bzerror, arginfo_bzerror)
|
||||
@@ -308,7 +317,7 @@ static PHP_MINFO_FUNCTION(bz2)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "BZip2 Support", "Enabled");
|
||||
php_info_print_table_row(2, "Stream Wrapper support", "compress.bz2://");
|
||||
php_info_print_table_row(2, "Stream Wrapper support", "compress.bzip2://");
|
||||
php_info_print_table_row(2, "Stream Filter support", "bzip2.decompress, bzip2.compress");
|
||||
php_info_print_table_row(2, "BZip2 Version", (char *) BZ2_bzlibVersion());
|
||||
php_info_print_table_end();
|
||||
@@ -378,6 +387,9 @@ static PHP_FUNCTION(bzopen)
|
||||
if (Z_TYPE_PP(file) == IS_STRING) {
|
||||
convert_to_string_ex(file);
|
||||
|
||||
if (strlen(Z_STRVAL_PP(file)) != Z_STRLEN_PP(file)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (Z_STRLEN_PP(file) == 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "filename cannot be empty");
|
||||
RETURN_FALSE;
|
||||
|
||||
@@ -348,8 +348,15 @@ PHP_FUNCTION(cal_days_in_month)
|
||||
sdn_next = calendar->to_jd(year, 1 + month, 1);
|
||||
|
||||
if (sdn_next == 0) {
|
||||
/* if invalid, try first month of the next year... */
|
||||
sdn_next = calendar->to_jd(year + 1, 1, 1);
|
||||
/* If the next month is invalid, then we need to try the first month of
|
||||
* the next year, bearing in mind that the next year after 1 BCE is
|
||||
* actually 1 AD and not 0. */
|
||||
if (year == -1) {
|
||||
sdn_next = calendar->to_jd(1, 1, 1);
|
||||
}
|
||||
else {
|
||||
sdn_next = calendar->to_jd(year + 1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_LONG(sdn_next - sdn_start);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #52744 (cal_days_in_month incorrect for December 1 BCE)
|
||||
--SKIPIF--
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(cal_days_in_month(CAL_GREGORIAN, 12, -1));
|
||||
var_dump(cal_days_in_month(CAL_JULIAN, 12, -1));
|
||||
?>
|
||||
--EXPECT--
|
||||
int(31)
|
||||
int(31)
|
||||
@@ -389,6 +389,9 @@ CPH_METHOD(SaveToFile)
|
||||
}
|
||||
|
||||
if (filename) {
|
||||
if (strlen(filename) != filename_len) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
fullpath = expand_filepath(filename, NULL TSRMLS_CC);
|
||||
if (!fullpath) {
|
||||
RETURN_FALSE;
|
||||
@@ -453,6 +456,10 @@ CPH_METHOD(LoadFromFile)
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen(filename) != filename_len) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
+17
-17
@@ -1252,7 +1252,6 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
#if LIBCURL_VERSION_NUM < 0x071101
|
||||
/* {{{ curl_free_string
|
||||
*/
|
||||
static void curl_free_string(void **string)
|
||||
@@ -1260,7 +1259,6 @@ static void curl_free_string(void **string)
|
||||
efree(*string);
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ curl_free_post
|
||||
*/
|
||||
@@ -1337,9 +1335,7 @@ static void alloc_curl_handle(php_curl **ch)
|
||||
|
||||
memset(&(*ch)->err, 0, sizeof((*ch)->err));
|
||||
|
||||
#if LIBCURL_VERSION_NUM < 0x071101
|
||||
zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
|
||||
#endif
|
||||
zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0);
|
||||
zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0);
|
||||
}
|
||||
@@ -1556,11 +1552,10 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
curl_easy_setopt(dupch->cp, CURLOPT_INFILE, (void *) dupch);
|
||||
curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch);
|
||||
|
||||
#if LIBCURL_VERSION_NUM < 0x071101
|
||||
zend_llist_copy(&dupch->to_free.str, &ch->to_free.str);
|
||||
/* Don't try to free copied strings, they're free'd when the original handle is destroyed */
|
||||
dupch->to_free.str.dtor = NULL;
|
||||
#endif
|
||||
|
||||
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
|
||||
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
|
||||
|
||||
@@ -1742,14 +1737,22 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071100
|
||||
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
|
||||
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
|
||||
#else
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
if (option == CURLOPT_PRIVATE) {
|
||||
char *copystr;
|
||||
#if LIBCURL_VERSION_NUM < 0x071100
|
||||
string_copy:
|
||||
#endif
|
||||
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
|
||||
error = curl_easy_setopt(ch->cp, option, copystr);
|
||||
zend_llist_add_element(&ch->to_free.str, ©str);
|
||||
} else {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071100
|
||||
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
|
||||
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
|
||||
#else
|
||||
goto string_copy;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1761,7 +1764,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
int type;
|
||||
void * what;
|
||||
|
||||
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
|
||||
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream(), php_file_le_pstream());
|
||||
if (!what) {
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
@@ -1816,7 +1819,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
}
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->std_err = *zvalue;
|
||||
zend_list_addref(Z_LVAL_PP(zvalue));
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
|
||||
RETVAL_FALSE;
|
||||
@@ -2457,9 +2459,7 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
|
||||
}
|
||||
|
||||
curl_easy_cleanup(ch->cp);
|
||||
#if LIBCURL_VERSION_NUM < 0x071101
|
||||
zend_llist_clean(&ch->to_free.str);
|
||||
#endif
|
||||
|
||||
/* cURL destructors should be invoked only by last curl handle */
|
||||
if (Z_REFCOUNT_P(ch->clone) <= 1) {
|
||||
|
||||
@@ -124,9 +124,7 @@ struct _php_curl_send_headers {
|
||||
};
|
||||
|
||||
struct _php_curl_free {
|
||||
#if LIBCURL_VERSION_NUM < 0x071100
|
||||
zend_llist str;
|
||||
#endif
|
||||
zend_llist post;
|
||||
zend_llist slist;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #52202 (CURLOPT_PRIVATE gets clobbered)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$curl = curl_init("http://www.google.com");
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_PRIVATE, "123");
|
||||
curl_exec($curl);
|
||||
|
||||
var_dump(curl_getinfo($curl, CURLINFO_PRIVATE));
|
||||
--EXPECT--
|
||||
string(3) "123"
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #52827 (curl_setopt with CURLOPT_STDERR erroneously increments the resource refcount)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
if (!extension_loaded('curl')) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s = fopen('php://temp/maxmemory=1024','wb+');
|
||||
|
||||
/* force conversion of inner stream to STDIO.
|
||||
* This is not necessary in Windows because the
|
||||
* cast to a FILE* handle in curl_setopt already
|
||||
* forces the conversion in that platform. The
|
||||
* reason for this conversion is that the memory
|
||||
* stream has an ugly but working mechanism to
|
||||
* prevent being double freed when it's encapsulated,
|
||||
* while STDIO streams don't. */
|
||||
$i = 0;
|
||||
while ($i++ < 5000) {
|
||||
fwrite($s, str_repeat('a',1024));
|
||||
}
|
||||
$handle=curl_init('http://www.example.com');
|
||||
curl_setopt($handle, CURLOPT_STDERR, $s);
|
||||
|
||||
echo "Done.";
|
||||
--EXPECTF--
|
||||
Done.
|
||||
@@ -17,7 +17,7 @@ if (!extension_loaded('curl')) print 'skip';
|
||||
|
||||
//SET URL AND OTHER OPTIONS
|
||||
curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
@@ -55,5 +55,10 @@ Disallow: /source.php
|
||||
Disallow: /search.php
|
||||
Disallow: /mod.php
|
||||
Disallow: /manual/add-note.php
|
||||
|
||||
Disallow: /harming/humans
|
||||
Disallow: /ignoring/human/orders
|
||||
Disallow: /harm/to/self
|
||||
|
||||
CURL2
|
||||
|
||||
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
|
||||
$ch2=curl_init();
|
||||
|
||||
//SET URL AND OTHER OPTIONS
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
|
||||
$ch2=curl_init();
|
||||
|
||||
//SET URL AND OTHER OPTIONS
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
|
||||
$ch2=curl_init();
|
||||
|
||||
//SET URL AND OTHER OPTIONS
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
|
||||
$ch2=curl_init();
|
||||
|
||||
//SET URL AND OTHER OPTIONS
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ curl_close($ch);
|
||||
var_dump( $curl_content );
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
|
||||
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
|
||||
*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
|
||||
|
||||
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d
|
||||
|
||||
@@ -42,3 +42,4 @@ Warning: curl_setopt() expects parameter 1 to be resource, boolean given in %s o
|
||||
|
||||
Warning: curl_setopt() expects parameter 2 to be long, %unicode_string_optional% given in %s on line %d
|
||||
|
||||
Warning: curl_setopt(): Invalid curl configuration option in %scurl_setopt_error.php on line %d
|
||||
+107
-99
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Fri Mar 26 12:00:44 2010 */
|
||||
/* Generated by re2c 0.13.5 on Sat Nov 13 14:58:02 2010 */
|
||||
#line 1 "ext/date/lib/parse_date.re"
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -91,6 +91,8 @@
|
||||
|
||||
#define TIMELIB_ERROR 999
|
||||
|
||||
/* Some compilers like AIX, defines uchar in sys/types.h */
|
||||
#undef uchar
|
||||
typedef unsigned char uchar;
|
||||
|
||||
#define BSIZE 8192
|
||||
@@ -841,11 +843,11 @@ static int scan(Scanner *s)
|
||||
std:
|
||||
s->tok = cursor;
|
||||
s->len = 0;
|
||||
#line 967 "ext/date/lib/parse_date.re"
|
||||
#line 969 "ext/date/lib/parse_date.re"
|
||||
|
||||
|
||||
|
||||
#line 849 "ext/date/lib/parse_date.c"
|
||||
#line 851 "ext/date/lib/parse_date.c"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
@@ -965,7 +967,7 @@ std:
|
||||
}
|
||||
yy2:
|
||||
YYDEBUG(2, *YYCURSOR);
|
||||
#line 1052 "ext/date/lib/parse_date.re"
|
||||
#line 1054 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("firstdayof | lastdayof");
|
||||
TIMELIB_INIT;
|
||||
@@ -981,7 +983,7 @@ yy2:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_LF_DAY_OF_MONTH;
|
||||
}
|
||||
#line 985 "ext/date/lib/parse_date.c"
|
||||
#line 987 "ext/date/lib/parse_date.c"
|
||||
yy3:
|
||||
YYDEBUG(3, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1004,7 +1006,7 @@ yy3:
|
||||
}
|
||||
yy4:
|
||||
YYDEBUG(4, *YYCURSOR);
|
||||
#line 1634 "ext/date/lib/parse_date.re"
|
||||
#line 1636 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("tzcorrection | tz");
|
||||
@@ -1017,7 +1019,7 @@ yy4:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIMEZONE;
|
||||
}
|
||||
#line 1021 "ext/date/lib/parse_date.c"
|
||||
#line 1023 "ext/date/lib/parse_date.c"
|
||||
yy5:
|
||||
YYDEBUG(5, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1328,12 +1330,12 @@ yy12:
|
||||
if (yych <= '9') goto yy1385;
|
||||
yy13:
|
||||
YYDEBUG(13, *YYCURSOR);
|
||||
#line 1729 "ext/date/lib/parse_date.re"
|
||||
#line 1731 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
add_error(s, "Unexpected character");
|
||||
goto std;
|
||||
}
|
||||
#line 1337 "ext/date/lib/parse_date.c"
|
||||
#line 1339 "ext/date/lib/parse_date.c"
|
||||
yy14:
|
||||
YYDEBUG(14, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2390,11 +2392,11 @@ yy49:
|
||||
if (yych <= '9') goto yy55;
|
||||
yy50:
|
||||
YYDEBUG(50, *YYCURSOR);
|
||||
#line 1718 "ext/date/lib/parse_date.re"
|
||||
#line 1720 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
goto std;
|
||||
}
|
||||
#line 2398 "ext/date/lib/parse_date.c"
|
||||
#line 2400 "ext/date/lib/parse_date.c"
|
||||
yy51:
|
||||
YYDEBUG(51, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2403,12 +2405,12 @@ yy52:
|
||||
YYDEBUG(52, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(53, *YYCURSOR);
|
||||
#line 1723 "ext/date/lib/parse_date.re"
|
||||
#line 1725 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
s->pos = cursor; s->line++;
|
||||
goto std;
|
||||
}
|
||||
#line 2412 "ext/date/lib/parse_date.c"
|
||||
#line 2414 "ext/date/lib/parse_date.c"
|
||||
yy54:
|
||||
YYDEBUG(54, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2795,7 +2797,7 @@ yy72:
|
||||
if (yych == 's') goto yy74;
|
||||
yy73:
|
||||
YYDEBUG(73, *YYCURSOR);
|
||||
#line 1702 "ext/date/lib/parse_date.re"
|
||||
#line 1704 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_ull i;
|
||||
DEBUG_OUTPUT("relative");
|
||||
@@ -2810,7 +2812,7 @@ yy73:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 2814 "ext/date/lib/parse_date.c"
|
||||
#line 2816 "ext/date/lib/parse_date.c"
|
||||
yy74:
|
||||
YYDEBUG(74, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3572,7 +3574,7 @@ yy166:
|
||||
}
|
||||
yy167:
|
||||
YYDEBUG(167, *YYCURSOR);
|
||||
#line 1565 "ext/date/lib/parse_date.re"
|
||||
#line 1567 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
const timelib_relunit* relunit;
|
||||
DEBUG_OUTPUT("daytext");
|
||||
@@ -3589,7 +3591,7 @@ yy167:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEKDAY;
|
||||
}
|
||||
#line 3593 "ext/date/lib/parse_date.c"
|
||||
#line 3595 "ext/date/lib/parse_date.c"
|
||||
yy168:
|
||||
YYDEBUG(168, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -4109,7 +4111,7 @@ yy193:
|
||||
}
|
||||
yy194:
|
||||
YYDEBUG(194, *YYCURSOR);
|
||||
#line 1624 "ext/date/lib/parse_date.re"
|
||||
#line 1626 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("monthtext");
|
||||
TIMELIB_INIT;
|
||||
@@ -4118,7 +4120,7 @@ yy194:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 4122 "ext/date/lib/parse_date.c"
|
||||
#line 4124 "ext/date/lib/parse_date.c"
|
||||
yy195:
|
||||
YYDEBUG(195, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -4169,7 +4171,7 @@ yy198:
|
||||
}
|
||||
yy199:
|
||||
YYDEBUG(199, *YYCURSOR);
|
||||
#line 1374 "ext/date/lib/parse_date.re"
|
||||
#line 1376 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datetextual | datenoyear");
|
||||
TIMELIB_INIT;
|
||||
@@ -4181,7 +4183,7 @@ yy199:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 4185 "ext/date/lib/parse_date.c"
|
||||
#line 4187 "ext/date/lib/parse_date.c"
|
||||
yy200:
|
||||
YYDEBUG(200, *YYCURSOR);
|
||||
yyaccept = 6;
|
||||
@@ -4450,7 +4452,7 @@ yy222:
|
||||
}
|
||||
yy223:
|
||||
YYDEBUG(223, *YYCURSOR);
|
||||
#line 1672 "ext/date/lib/parse_date.re"
|
||||
#line 1674 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
|
||||
@@ -4479,7 +4481,7 @@ yy223:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||
}
|
||||
#line 4483 "ext/date/lib/parse_date.c"
|
||||
#line 4485 "ext/date/lib/parse_date.c"
|
||||
yy224:
|
||||
YYDEBUG(224, *YYCURSOR);
|
||||
yyaccept = 7;
|
||||
@@ -5177,7 +5179,7 @@ yy278:
|
||||
YYDEBUG(278, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(279, *YYCURSOR);
|
||||
#line 1648 "ext/date/lib/parse_date.re"
|
||||
#line 1650 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
|
||||
TIMELIB_INIT;
|
||||
@@ -5200,7 +5202,7 @@ yy278:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||
}
|
||||
#line 5204 "ext/date/lib/parse_date.c"
|
||||
#line 5206 "ext/date/lib/parse_date.c"
|
||||
yy280:
|
||||
YYDEBUG(280, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -5378,7 +5380,7 @@ yy294:
|
||||
++YYCURSOR;
|
||||
yy295:
|
||||
YYDEBUG(295, *YYCURSOR);
|
||||
#line 1348 "ext/date/lib/parse_date.re"
|
||||
#line 1350 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenoday");
|
||||
TIMELIB_INIT;
|
||||
@@ -5390,7 +5392,7 @@ yy295:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NO_DAY;
|
||||
}
|
||||
#line 5394 "ext/date/lib/parse_date.c"
|
||||
#line 5396 "ext/date/lib/parse_date.c"
|
||||
yy296:
|
||||
YYDEBUG(296, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -6610,7 +6612,7 @@ yy362:
|
||||
if (yych <= '9') goto yy365;
|
||||
yy364:
|
||||
YYDEBUG(364, *YYCURSOR);
|
||||
#line 1488 "ext/date/lib/parse_date.re"
|
||||
#line 1490 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pgtextshort");
|
||||
TIMELIB_INIT;
|
||||
@@ -6622,7 +6624,7 @@ yy364:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_TEXT;
|
||||
}
|
||||
#line 6626 "ext/date/lib/parse_date.c"
|
||||
#line 6628 "ext/date/lib/parse_date.c"
|
||||
yy365:
|
||||
YYDEBUG(365, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -7260,7 +7262,7 @@ yy392:
|
||||
}
|
||||
yy393:
|
||||
YYDEBUG(393, *YYCURSOR);
|
||||
#line 1544 "ext/date/lib/parse_date.re"
|
||||
#line 1546 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("ago");
|
||||
TIMELIB_INIT;
|
||||
@@ -7280,7 +7282,7 @@ yy393:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_AGO;
|
||||
}
|
||||
#line 7284 "ext/date/lib/parse_date.c"
|
||||
#line 7286 "ext/date/lib/parse_date.c"
|
||||
yy394:
|
||||
YYDEBUG(394, *YYCURSOR);
|
||||
yyaccept = 5;
|
||||
@@ -9030,7 +9032,7 @@ yy454:
|
||||
++YYCURSOR;
|
||||
yy455:
|
||||
YYDEBUG(455, *YYCURSOR);
|
||||
#line 1258 "ext/date/lib/parse_date.re"
|
||||
#line 1260 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
|
||||
TIMELIB_INIT;
|
||||
@@ -9041,7 +9043,7 @@ yy455:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 9045 "ext/date/lib/parse_date.c"
|
||||
#line 9047 "ext/date/lib/parse_date.c"
|
||||
yy456:
|
||||
YYDEBUG(456, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -9601,7 +9603,7 @@ yy475:
|
||||
}
|
||||
yy476:
|
||||
YYDEBUG(476, *YYCURSOR);
|
||||
#line 1387 "ext/date/lib/parse_date.re"
|
||||
#line 1389 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenoyearrev");
|
||||
TIMELIB_INIT;
|
||||
@@ -9612,7 +9614,7 @@ yy476:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 9616 "ext/date/lib/parse_date.c"
|
||||
#line 9618 "ext/date/lib/parse_date.c"
|
||||
yy477:
|
||||
YYDEBUG(477, *YYCURSOR);
|
||||
yyaccept = 10;
|
||||
@@ -9753,7 +9755,7 @@ yy488:
|
||||
YYDEBUG(488, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(489, *YYCURSOR);
|
||||
#line 1114 "ext/date/lib/parse_date.re"
|
||||
#line 1116 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
|
||||
TIMELIB_INIT;
|
||||
@@ -9769,7 +9771,7 @@ yy488:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME12;
|
||||
}
|
||||
#line 9773 "ext/date/lib/parse_date.c"
|
||||
#line 9775 "ext/date/lib/parse_date.c"
|
||||
yy490:
|
||||
YYDEBUG(490, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -9782,7 +9784,7 @@ yy490:
|
||||
}
|
||||
yy491:
|
||||
YYDEBUG(491, *YYCURSOR);
|
||||
#line 1151 "ext/date/lib/parse_date.re"
|
||||
#line 1153 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
|
||||
@@ -9807,7 +9809,7 @@ yy491:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME24_WITH_ZONE;
|
||||
}
|
||||
#line 9811 "ext/date/lib/parse_date.c"
|
||||
#line 9813 "ext/date/lib/parse_date.c"
|
||||
yy492:
|
||||
YYDEBUG(492, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -10117,7 +10119,7 @@ yy523:
|
||||
YYDEBUG(523, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(524, *YYCURSOR);
|
||||
#line 1131 "ext/date/lib/parse_date.re"
|
||||
#line 1133 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("mssqltime");
|
||||
TIMELIB_INIT;
|
||||
@@ -10136,7 +10138,7 @@ yy523:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME24_WITH_ZONE;
|
||||
}
|
||||
#line 10140 "ext/date/lib/parse_date.c"
|
||||
#line 10142 "ext/date/lib/parse_date.c"
|
||||
yy525:
|
||||
YYDEBUG(525, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -10242,7 +10244,7 @@ yy534:
|
||||
if (yych <= '9') goto yy541;
|
||||
yy535:
|
||||
YYDEBUG(535, *YYCURSOR);
|
||||
#line 1309 "ext/date/lib/parse_date.re"
|
||||
#line 1311 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datefull");
|
||||
TIMELIB_INIT;
|
||||
@@ -10255,7 +10257,7 @@ yy535:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL;
|
||||
}
|
||||
#line 10259 "ext/date/lib/parse_date.c"
|
||||
#line 10261 "ext/date/lib/parse_date.c"
|
||||
yy536:
|
||||
YYDEBUG(536, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -10992,7 +10994,7 @@ yy605:
|
||||
YYDEBUG(606, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(607, *YYCURSOR);
|
||||
#line 1323 "ext/date/lib/parse_date.re"
|
||||
#line 1325 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pointed date YYYY");
|
||||
TIMELIB_INIT;
|
||||
@@ -11003,7 +11005,7 @@ yy605:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL_POINTED;
|
||||
}
|
||||
#line 11007 "ext/date/lib/parse_date.c"
|
||||
#line 11009 "ext/date/lib/parse_date.c"
|
||||
yy608:
|
||||
YYDEBUG(608, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -11039,7 +11041,7 @@ yy611:
|
||||
if (yych <= '9') goto yy605;
|
||||
yy612:
|
||||
YYDEBUG(612, *YYCURSOR);
|
||||
#line 1335 "ext/date/lib/parse_date.re"
|
||||
#line 1337 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pointed date YY");
|
||||
TIMELIB_INIT;
|
||||
@@ -11051,7 +11053,7 @@ yy612:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL_POINTED;
|
||||
}
|
||||
#line 11055 "ext/date/lib/parse_date.c"
|
||||
#line 11057 "ext/date/lib/parse_date.c"
|
||||
yy613:
|
||||
YYDEBUG(613, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -11692,7 +11694,7 @@ yy656:
|
||||
}
|
||||
yy657:
|
||||
YYDEBUG(657, *YYCURSOR);
|
||||
#line 1296 "ext/date/lib/parse_date.re"
|
||||
#line 1298 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnudateshort");
|
||||
TIMELIB_INIT;
|
||||
@@ -11704,7 +11706,7 @@ yy657:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 11708 "ext/date/lib/parse_date.c"
|
||||
#line 11710 "ext/date/lib/parse_date.c"
|
||||
yy658:
|
||||
YYDEBUG(658, *YYCURSOR);
|
||||
yyaccept = 13;
|
||||
@@ -11810,7 +11812,7 @@ yy666:
|
||||
}
|
||||
yy667:
|
||||
YYDEBUG(667, *YYCURSOR);
|
||||
#line 1243 "ext/date/lib/parse_date.re"
|
||||
#line 1245 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("americanshort | american");
|
||||
TIMELIB_INIT;
|
||||
@@ -11824,7 +11826,7 @@ yy667:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_AMERICAN;
|
||||
}
|
||||
#line 11828 "ext/date/lib/parse_date.c"
|
||||
#line 11830 "ext/date/lib/parse_date.c"
|
||||
yy668:
|
||||
YYDEBUG(668, *YYCURSOR);
|
||||
yyaccept = 14;
|
||||
@@ -12057,7 +12059,7 @@ yy700:
|
||||
if (yych <= ':') goto yy704;
|
||||
yy701:
|
||||
YYDEBUG(701, *YYCURSOR);
|
||||
#line 1514 "ext/date/lib/parse_date.re"
|
||||
#line 1516 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("clf");
|
||||
@@ -12077,7 +12079,7 @@ yy701:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_CLF;
|
||||
}
|
||||
#line 12081 "ext/date/lib/parse_date.c"
|
||||
#line 12083 "ext/date/lib/parse_date.c"
|
||||
yy702:
|
||||
YYDEBUG(702, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12629,7 +12631,7 @@ yy763:
|
||||
}
|
||||
yy764:
|
||||
YYDEBUG(764, *YYCURSOR);
|
||||
#line 1270 "ext/date/lib/parse_date.re"
|
||||
#line 1272 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("iso8601date2");
|
||||
TIMELIB_INIT;
|
||||
@@ -12641,7 +12643,7 @@ yy764:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 12645 "ext/date/lib/parse_date.c"
|
||||
#line 12647 "ext/date/lib/parse_date.c"
|
||||
yy765:
|
||||
YYDEBUG(765, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12680,7 +12682,7 @@ yy771:
|
||||
YYDEBUG(771, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(772, *YYCURSOR);
|
||||
#line 1501 "ext/date/lib/parse_date.re"
|
||||
#line 1503 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pgtextreverse");
|
||||
TIMELIB_INIT;
|
||||
@@ -12692,7 +12694,7 @@ yy771:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_TEXT;
|
||||
}
|
||||
#line 12696 "ext/date/lib/parse_date.c"
|
||||
#line 12698 "ext/date/lib/parse_date.c"
|
||||
yy773:
|
||||
YYDEBUG(773, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12830,7 +12832,7 @@ yy783:
|
||||
}
|
||||
yy784:
|
||||
YYDEBUG(784, *YYCURSOR);
|
||||
#line 1535 "ext/date/lib/parse_date.re"
|
||||
#line 1537 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("year4");
|
||||
TIMELIB_INIT;
|
||||
@@ -12838,7 +12840,7 @@ yy784:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_CLF;
|
||||
}
|
||||
#line 12842 "ext/date/lib/parse_date.c"
|
||||
#line 12844 "ext/date/lib/parse_date.c"
|
||||
yy785:
|
||||
YYDEBUG(785, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12989,7 +12991,7 @@ yy793:
|
||||
}
|
||||
yy794:
|
||||
YYDEBUG(794, *YYCURSOR);
|
||||
#line 1361 "ext/date/lib/parse_date.re"
|
||||
#line 1363 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenodayrev");
|
||||
TIMELIB_INIT;
|
||||
@@ -13001,7 +13003,7 @@ yy794:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NO_DAY;
|
||||
}
|
||||
#line 13005 "ext/date/lib/parse_date.c"
|
||||
#line 13007 "ext/date/lib/parse_date.c"
|
||||
yy795:
|
||||
YYDEBUG(795, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13216,7 +13218,7 @@ yy814:
|
||||
if (yych <= '7') goto yy817;
|
||||
yy815:
|
||||
YYDEBUG(815, *YYCURSOR);
|
||||
#line 1469 "ext/date/lib/parse_date.re"
|
||||
#line 1471 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll w, d;
|
||||
DEBUG_OUTPUT("isoweek");
|
||||
@@ -13234,7 +13236,7 @@ yy815:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_WEEK;
|
||||
}
|
||||
#line 13238 "ext/date/lib/parse_date.c"
|
||||
#line 13240 "ext/date/lib/parse_date.c"
|
||||
yy816:
|
||||
YYDEBUG(816, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13244,7 +13246,7 @@ yy817:
|
||||
YYDEBUG(817, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(818, *YYCURSOR);
|
||||
#line 1450 "ext/date/lib/parse_date.re"
|
||||
#line 1452 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll w, d;
|
||||
DEBUG_OUTPUT("isoweekday");
|
||||
@@ -13262,7 +13264,7 @@ yy817:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_WEEK;
|
||||
}
|
||||
#line 13266 "ext/date/lib/parse_date.c"
|
||||
#line 13268 "ext/date/lib/parse_date.c"
|
||||
yy819:
|
||||
YYDEBUG(819, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13326,7 +13328,7 @@ yy821:
|
||||
}
|
||||
yy822:
|
||||
YYDEBUG(822, *YYCURSOR);
|
||||
#line 1437 "ext/date/lib/parse_date.re"
|
||||
#line 1439 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pgydotd");
|
||||
TIMELIB_INIT;
|
||||
@@ -13338,7 +13340,7 @@ yy822:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_YEARDAY;
|
||||
}
|
||||
#line 13342 "ext/date/lib/parse_date.c"
|
||||
#line 13344 "ext/date/lib/parse_date.c"
|
||||
yy823:
|
||||
YYDEBUG(823, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13441,7 +13443,7 @@ yy842:
|
||||
++YYCURSOR;
|
||||
yy843:
|
||||
YYDEBUG(843, *YYCURSOR);
|
||||
#line 1411 "ext/date/lib/parse_date.re"
|
||||
#line 1413 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
|
||||
@@ -13466,7 +13468,7 @@ yy843:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_XMLRPC_SOAP;
|
||||
}
|
||||
#line 13470 "ext/date/lib/parse_date.c"
|
||||
#line 13472 "ext/date/lib/parse_date.c"
|
||||
yy844:
|
||||
YYDEBUG(844, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13728,7 +13730,7 @@ yy848:
|
||||
}
|
||||
yy849:
|
||||
YYDEBUG(849, *YYCURSOR);
|
||||
#line 1399 "ext/date/lib/parse_date.re"
|
||||
#line 1401 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenocolon");
|
||||
TIMELIB_INIT;
|
||||
@@ -13739,7 +13741,7 @@ yy849:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NOCOLON;
|
||||
}
|
||||
#line 13743 "ext/date/lib/parse_date.c"
|
||||
#line 13745 "ext/date/lib/parse_date.c"
|
||||
yy850:
|
||||
YYDEBUG(850, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -14659,7 +14661,7 @@ yy973:
|
||||
if (yych <= '9') goto yy996;
|
||||
yy974:
|
||||
YYDEBUG(974, *YYCURSOR);
|
||||
#line 1283 "ext/date/lib/parse_date.re"
|
||||
#line 1285 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnudateshorter");
|
||||
TIMELIB_INIT;
|
||||
@@ -14671,7 +14673,7 @@ yy974:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 14675 "ext/date/lib/parse_date.c"
|
||||
#line 14677 "ext/date/lib/parse_date.c"
|
||||
yy975:
|
||||
YYDEBUG(975, *YYCURSOR);
|
||||
yyaccept = 22;
|
||||
@@ -15680,7 +15682,7 @@ yy1066:
|
||||
}
|
||||
yy1068:
|
||||
YYDEBUG(1068, *YYCURSOR);
|
||||
#line 1177 "ext/date/lib/parse_date.re"
|
||||
#line 1179 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnunocolon");
|
||||
TIMELIB_INIT;
|
||||
@@ -15702,7 +15704,7 @@ yy1068:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_GNU_NOCOLON;
|
||||
}
|
||||
#line 15706 "ext/date/lib/parse_date.c"
|
||||
#line 15708 "ext/date/lib/parse_date.c"
|
||||
yy1069:
|
||||
YYDEBUG(1069, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -15794,7 +15796,7 @@ yy1075:
|
||||
}
|
||||
yy1076:
|
||||
YYDEBUG(1076, *YYCURSOR);
|
||||
#line 1223 "ext/date/lib/parse_date.re"
|
||||
#line 1225 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("iso8601nocolon");
|
||||
@@ -15813,7 +15815,7 @@ yy1076:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_NOCOLON;
|
||||
}
|
||||
#line 15817 "ext/date/lib/parse_date.c"
|
||||
#line 15819 "ext/date/lib/parse_date.c"
|
||||
yy1077:
|
||||
YYDEBUG(1077, *YYCURSOR);
|
||||
yyaccept = 25;
|
||||
@@ -16711,7 +16713,7 @@ yy1117:
|
||||
}
|
||||
yy1118:
|
||||
YYDEBUG(1118, *YYCURSOR);
|
||||
#line 1607 "ext/date/lib/parse_date.re"
|
||||
#line 1609 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16727,7 +16729,7 @@ yy1118:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 16731 "ext/date/lib/parse_date.c"
|
||||
#line 16733 "ext/date/lib/parse_date.c"
|
||||
yy1119:
|
||||
YYDEBUG(1119, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -16778,7 +16780,7 @@ yy1126:
|
||||
YYDEBUG(1126, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(1127, *YYCURSOR);
|
||||
#line 1092 "ext/date/lib/parse_date.re"
|
||||
#line 1094 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16799,7 +16801,7 @@ yy1126:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEK_DAY_OF_MONTH;
|
||||
}
|
||||
#line 16803 "ext/date/lib/parse_date.c"
|
||||
#line 16805 "ext/date/lib/parse_date.c"
|
||||
yy1128:
|
||||
YYDEBUG(1128, *YYCURSOR);
|
||||
yyaccept = 26;
|
||||
@@ -16907,7 +16909,7 @@ yy1141:
|
||||
}
|
||||
yy1142:
|
||||
YYDEBUG(1142, *YYCURSOR);
|
||||
#line 1583 "ext/date/lib/parse_date.re"
|
||||
#line 1585 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16930,7 +16932,7 @@ yy1142:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 16934 "ext/date/lib/parse_date.c"
|
||||
#line 16936 "ext/date/lib/parse_date.c"
|
||||
yy1143:
|
||||
YYDEBUG(1143, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -19607,7 +19609,7 @@ yy1294:
|
||||
goto yy1298;
|
||||
yy1295:
|
||||
YYDEBUG(1295, *YYCURSOR);
|
||||
#line 1069 "ext/date/lib/parse_date.re"
|
||||
#line 1071 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("backof | frontof");
|
||||
TIMELIB_INIT;
|
||||
@@ -19629,7 +19631,7 @@ yy1295:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_LF_DAY_OF_MONTH;
|
||||
}
|
||||
#line 19633 "ext/date/lib/parse_date.c"
|
||||
#line 19635 "ext/date/lib/parse_date.c"
|
||||
yy1296:
|
||||
YYDEBUG(1296, *YYCURSOR);
|
||||
yyaccept = 28;
|
||||
@@ -21320,7 +21322,7 @@ yy1385:
|
||||
if (yych <= '9') goto yy1385;
|
||||
yy1387:
|
||||
YYDEBUG(1387, *YYCURSOR);
|
||||
#line 1027 "ext/date/lib/parse_date.re"
|
||||
#line 1029 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_ull i;
|
||||
|
||||
@@ -21344,7 +21346,7 @@ yy1387:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21348 "ext/date/lib/parse_date.c"
|
||||
#line 21350 "ext/date/lib/parse_date.c"
|
||||
yy1388:
|
||||
YYDEBUG(1388, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -21780,7 +21782,7 @@ yy1416:
|
||||
++YYCURSOR;
|
||||
yy1417:
|
||||
YYDEBUG(1417, *YYCURSOR);
|
||||
#line 1015 "ext/date/lib/parse_date.re"
|
||||
#line 1017 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("tomorrow");
|
||||
TIMELIB_INIT;
|
||||
@@ -21791,7 +21793,7 @@ yy1417:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21795 "ext/date/lib/parse_date.c"
|
||||
#line 21797 "ext/date/lib/parse_date.c"
|
||||
yy1418:
|
||||
YYDEBUG(1418, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -21826,7 +21828,7 @@ yy1419:
|
||||
}
|
||||
yy1420:
|
||||
YYDEBUG(1420, *YYCURSOR);
|
||||
#line 1005 "ext/date/lib/parse_date.re"
|
||||
#line 1007 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("midnight | today");
|
||||
TIMELIB_INIT;
|
||||
@@ -21835,7 +21837,7 @@ yy1420:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21839 "ext/date/lib/parse_date.c"
|
||||
#line 21841 "ext/date/lib/parse_date.c"
|
||||
yy1421:
|
||||
YYDEBUG(1421, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -23847,7 +23849,7 @@ yy1499:
|
||||
}
|
||||
yy1500:
|
||||
YYDEBUG(1500, *YYCURSOR);
|
||||
#line 984 "ext/date/lib/parse_date.re"
|
||||
#line 986 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("now");
|
||||
TIMELIB_INIT;
|
||||
@@ -23855,7 +23857,7 @@ yy1500:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 23859 "ext/date/lib/parse_date.c"
|
||||
#line 23861 "ext/date/lib/parse_date.c"
|
||||
yy1501:
|
||||
YYDEBUG(1501, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -23994,7 +23996,7 @@ yy1507:
|
||||
}
|
||||
yy1508:
|
||||
YYDEBUG(1508, *YYCURSOR);
|
||||
#line 993 "ext/date/lib/parse_date.re"
|
||||
#line 995 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("noon");
|
||||
TIMELIB_INIT;
|
||||
@@ -24005,7 +24007,7 @@ yy1508:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 24009 "ext/date/lib/parse_date.c"
|
||||
#line 24011 "ext/date/lib/parse_date.c"
|
||||
yy1509:
|
||||
YYDEBUG(1509, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -24538,7 +24540,7 @@ yy1530:
|
||||
++YYCURSOR;
|
||||
yy1531:
|
||||
YYDEBUG(1531, *YYCURSOR);
|
||||
#line 972 "ext/date/lib/parse_date.re"
|
||||
#line 974 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("yesterday");
|
||||
TIMELIB_INIT;
|
||||
@@ -24549,7 +24551,7 @@ yy1531:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 24553 "ext/date/lib/parse_date.c"
|
||||
#line 24555 "ext/date/lib/parse_date.c"
|
||||
yy1532:
|
||||
YYDEBUG(1532, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -24722,7 +24724,7 @@ yy1537:
|
||||
goto yy1531;
|
||||
}
|
||||
}
|
||||
#line 1733 "ext/date/lib/parse_date.re"
|
||||
#line 1735 "ext/date/lib/parse_date.re"
|
||||
|
||||
}
|
||||
|
||||
@@ -24789,6 +24791,10 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
|
||||
#endif
|
||||
} while(t != EOI);
|
||||
|
||||
/* do funky checking whether the parsed time was valid time */
|
||||
if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) {
|
||||
add_warning(&in, "The parsed time was invalid");
|
||||
}
|
||||
/* do funky checking whether the parsed date was valid date */
|
||||
if (in.time->have_date && !timelib_valid_date( in.time->y, in.time->m, in.time->d)) {
|
||||
add_warning(&in, "The parsed date was invalid");
|
||||
@@ -24984,7 +24990,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
break;
|
||||
|
||||
case '#': /* separation symbol */
|
||||
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-') {
|
||||
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') {
|
||||
++ptr;
|
||||
} else {
|
||||
add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
|
||||
@@ -24997,6 +25003,8 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
case '.':
|
||||
case ',':
|
||||
case '-':
|
||||
case '(':
|
||||
case ')':
|
||||
if (*ptr == *fptr) {
|
||||
++ptr;
|
||||
} else {
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
|
||||
#define TIMELIB_ERROR 999
|
||||
|
||||
/* Some compilers like AIX, defines uchar in sys/types.h */
|
||||
#undef uchar
|
||||
typedef unsigned char uchar;
|
||||
|
||||
#define BSIZE 8192
|
||||
@@ -1796,6 +1798,10 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
|
||||
#endif
|
||||
} while(t != EOI);
|
||||
|
||||
/* do funky checking whether the parsed time was valid time */
|
||||
if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) {
|
||||
add_warning(&in, "The parsed time was invalid");
|
||||
}
|
||||
/* do funky checking whether the parsed date was valid date */
|
||||
if (in.time->have_date && !timelib_valid_date( in.time->y, in.time->m, in.time->d)) {
|
||||
add_warning(&in, "The parsed date was invalid");
|
||||
@@ -1991,7 +1997,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
break;
|
||||
|
||||
case '#': /* separation symbol */
|
||||
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-') {
|
||||
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') {
|
||||
++ptr;
|
||||
} else {
|
||||
add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
|
||||
@@ -2004,6 +2010,8 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
case '.':
|
||||
case ',':
|
||||
case '-':
|
||||
case '(':
|
||||
case ')':
|
||||
if (*ptr == *fptr) {
|
||||
++ptr;
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Fri Mar 26 12:12:03 2010 */
|
||||
/* Generated by re2c 0.13.5 on Sat Nov 13 14:57:59 2010 */
|
||||
#line 1 "ext/date/lib/parse_iso_intervals.re"
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
+13
-2
@@ -46,6 +46,19 @@ timelib_rel_time* timelib_rel_time_ctor(void)
|
||||
return t;
|
||||
}
|
||||
|
||||
timelib_time* timelib_time_clone(timelib_time *orig)
|
||||
{
|
||||
timelib_time *tmp = timelib_time_ctor();
|
||||
memcpy(tmp, orig, sizeof(timelib_time));
|
||||
if (orig->tz_abbr) {
|
||||
tmp->tz_abbr = strdup(orig->tz_abbr);
|
||||
}
|
||||
if (orig->tz_info) {
|
||||
tmp->tz_info = orig->tz_info;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
timelib_rel_time* timelib_rel_time_clone(timelib_rel_time *rel)
|
||||
{
|
||||
timelib_rel_time *tmp = timelib_rel_time_ctor();
|
||||
@@ -217,8 +230,6 @@ void timelib_dump_date(timelib_time *d, int options)
|
||||
printf(" %05d%s", d->z, d->dst == 1 ? " (DST)" : "");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
printf(" GMT 00000");
|
||||
}
|
||||
|
||||
if ((options & 1) == 1) {
|
||||
|
||||
@@ -109,6 +109,7 @@ timelib_rel_time* timelib_rel_time_clone(timelib_rel_time *tz);
|
||||
timelib_time* timelib_time_ctor(void);
|
||||
void timelib_time_set_option(timelib_time* tm, int option, void* option_value);
|
||||
void timelib_time_dtor(timelib_time* t);
|
||||
timelib_time* timelib_time_clone(timelib_time* orig);
|
||||
|
||||
timelib_time_offset* timelib_time_offset_ctor(void);
|
||||
void timelib_time_offset_dtor(timelib_time_offset* t);
|
||||
|
||||
+699
-638
File diff suppressed because it is too large.
Load diff
@@ -444,6 +444,7 @@ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi)
|
||||
time->sse = res;
|
||||
|
||||
time->sse_uptodate = 1;
|
||||
time->have_relative = time->relative.have_weekday_relative = time->relative.have_special_relative = 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -55,6 +55,12 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)
|
||||
|
||||
if (ts >= 0) {
|
||||
tmp_days = days + 1;
|
||||
|
||||
if (tmp_days >= DAYS_PER_LYEAR_PERIOD || tmp_days <= -DAYS_PER_LYEAR_PERIOD) {
|
||||
cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
|
||||
tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
|
||||
}
|
||||
|
||||
while (tmp_days >= DAYS_PER_LYEAR) {
|
||||
cur_year++;
|
||||
if (timelib_is_leap(cur_year)) {
|
||||
|
||||
+32
-31
@@ -475,7 +475,6 @@ const zend_function_entry date_funcs_period[] = {
|
||||
|
||||
static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
|
||||
static void date_register_classes(TSRMLS_D);
|
||||
static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
|
||||
/* }}} */
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(date)
|
||||
@@ -1211,11 +1210,11 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
|
||||
int retval = -1;
|
||||
timelib_time_offset *offset = NULL;
|
||||
timelib_sll isoweek, isoyear;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
t = timelib_time_ctor();
|
||||
|
||||
if (!localtime) {
|
||||
TSRMLS_FETCH();
|
||||
tzi = get_timezone_info(TSRMLS_C);
|
||||
t->tz_info = tzi;
|
||||
t->zone_type = TIMELIB_ZONETYPE_ID;
|
||||
@@ -1822,7 +1821,7 @@ static int date_period_it_has_more(zend_object_iterator *iter TSRMLS_DC)
|
||||
{
|
||||
date_period_it *iterator = (date_period_it *)iter;
|
||||
php_period_obj *object = iterator->object;
|
||||
timelib_time *it_time = object->start;
|
||||
timelib_time *it_time = object->current;
|
||||
|
||||
/* apply modification if it's not the first iteration */
|
||||
if (!object->include_start_date || iterator->current_index > 0) {
|
||||
@@ -1834,7 +1833,7 @@ static int date_period_it_has_more(zend_object_iterator *iter TSRMLS_DC)
|
||||
}
|
||||
|
||||
if (object->end) {
|
||||
return object->start->sse < object->end->sse ? SUCCESS : FAILURE;
|
||||
return object->current->sse < object->end->sse ? SUCCESS : FAILURE;
|
||||
} else {
|
||||
return (iterator->current_index < object->recurrences) ? SUCCESS : FAILURE;
|
||||
}
|
||||
@@ -1847,12 +1846,12 @@ static void date_period_it_current_data(zend_object_iterator *iter, zval ***data
|
||||
{
|
||||
date_period_it *iterator = (date_period_it *)iter;
|
||||
php_period_obj *object = iterator->object;
|
||||
timelib_time *it_time = object->start;
|
||||
timelib_time *it_time = object->current;
|
||||
php_date_obj *newdateobj;
|
||||
|
||||
/* Create new object */
|
||||
MAKE_STD_ZVAL(iterator->current);
|
||||
date_instantiate(date_ce_date, iterator->current TSRMLS_CC);
|
||||
php_date_instantiate(date_ce_date, iterator->current TSRMLS_CC);
|
||||
newdateobj = (php_date_obj *) zend_object_store_get_object(iterator->current TSRMLS_CC);
|
||||
newdateobj->time = timelib_time_ctor();
|
||||
*newdateobj->time = *it_time;
|
||||
@@ -1895,6 +1894,10 @@ static void date_period_it_rewind(zend_object_iterator *iter TSRMLS_DC)
|
||||
date_period_it *iterator = (date_period_it *)iter;
|
||||
|
||||
iterator->current_index = 0;
|
||||
if (iterator->object->current) {
|
||||
timelib_time_dtor(iterator->object->current);
|
||||
}
|
||||
iterator->object->current = timelib_time_clone(iterator->object->start);
|
||||
date_period_it_invalidate_current(iter TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2085,7 +2088,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
|
||||
|
||||
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
props = dateobj->std.properties;
|
||||
props = zend_std_get_properties(object TSRMLS_CC);
|
||||
|
||||
if (!dateobj->time || GC_G(gc_active)) {
|
||||
return props;
|
||||
@@ -2228,7 +2231,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
|
||||
|
||||
intervalobj = (php_interval_obj *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
props = intervalobj->std.properties;
|
||||
props = zend_std_get_properties(object TSRMLS_CC);
|
||||
|
||||
if (!intervalobj->initialized || GC_G(gc_active)) {
|
||||
return props;
|
||||
@@ -2335,6 +2338,10 @@ static void date_object_free_storage_period(void *object TSRMLS_DC)
|
||||
timelib_time_dtor(intern->start);
|
||||
}
|
||||
|
||||
if (intern->current) {
|
||||
timelib_time_dtor(intern->current);
|
||||
}
|
||||
|
||||
if (intern->end) {
|
||||
timelib_time_dtor(intern->end);
|
||||
}
|
||||
@@ -2345,7 +2352,7 @@ static void date_object_free_storage_period(void *object TSRMLS_DC)
|
||||
}
|
||||
|
||||
/* Advanced Interface */
|
||||
static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
|
||||
PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
|
||||
{
|
||||
Z_TYPE_P(object) = IS_OBJECT;
|
||||
object_init_ex(object, pce);
|
||||
@@ -2365,7 +2372,7 @@ static void update_errors_warnings(timelib_error_container *last_errors TSRMLS_D
|
||||
DATEG(last_errors) = last_errors;
|
||||
}
|
||||
|
||||
static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC)
|
||||
PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC)
|
||||
{
|
||||
timelib_time *now;
|
||||
timelib_tzinfo *tzi;
|
||||
@@ -2460,8 +2467,8 @@ PHP_FUNCTION(date_create)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
if (!date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
|
||||
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
if (!php_date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -2480,8 +2487,8 @@ PHP_FUNCTION(date_create_from_format)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
if (!date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
|
||||
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
if (!php_date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -2499,7 +2506,7 @@ PHP_METHOD(DateTime, __construct)
|
||||
|
||||
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
|
||||
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
|
||||
date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
|
||||
php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
|
||||
}
|
||||
zend_restore_error_handling(&error_handling TSRMLS_CC);
|
||||
}
|
||||
@@ -2526,7 +2533,7 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
|
||||
case TIMELIB_ZONETYPE_ABBR: {
|
||||
char *tmp = emalloc(Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2);
|
||||
snprintf(tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2, "%s %s", Z_STRVAL_PP(z_date), Z_STRVAL_PP(z_timezone));
|
||||
date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
|
||||
php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
|
||||
efree(tmp);
|
||||
return 1;
|
||||
}
|
||||
@@ -2537,12 +2544,12 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
|
||||
tzi = php_date_parse_tzfile(Z_STRVAL_PP(z_timezone), DATE_TIMEZONEDB TSRMLS_CC);
|
||||
|
||||
ALLOC_INIT_ZVAL(tmp_obj);
|
||||
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC);
|
||||
tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC);
|
||||
tzobj->type = TIMELIB_ZONETYPE_ID;
|
||||
tzobj->tzi.tz = tzi;
|
||||
tzobj->initialized = 1;
|
||||
|
||||
date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
|
||||
php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
|
||||
zval_ptr_dtor(&tmp_obj);
|
||||
return 1;
|
||||
}
|
||||
@@ -2566,7 +2573,7 @@ PHP_METHOD(DateTime, __set_state)
|
||||
|
||||
myht = HASH_OF(array);
|
||||
|
||||
date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
dateobj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
php_date_initialize_from_hash(&return_value, &dateobj, myht TSRMLS_CC);
|
||||
}
|
||||
@@ -2907,7 +2914,7 @@ PHP_FUNCTION(date_timezone_get)
|
||||
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
|
||||
if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) {
|
||||
date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
|
||||
php_date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
|
||||
tzobj = (php_timezone_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
tzobj->initialized = 1;
|
||||
tzobj->type = dateobj->time->zone_type;
|
||||
@@ -3131,7 +3138,7 @@ PHP_FUNCTION(date_diff)
|
||||
timelib_update_ts(dateobj1->time, NULL);
|
||||
timelib_update_ts(dateobj2->time, NULL);
|
||||
|
||||
date_instantiate(date_ce_interval, return_value TSRMLS_CC);
|
||||
php_date_instantiate(date_ce_interval, return_value TSRMLS_CC);
|
||||
interval = zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
interval->diff = timelib_diff(dateobj1->time, dateobj2->time);
|
||||
if (absolute) {
|
||||
@@ -3177,7 +3184,7 @@ PHP_FUNCTION(timezone_open)
|
||||
if (SUCCESS != timezone_initialize(&tzi, tz TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC);
|
||||
tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC);
|
||||
tzobj->type = TIMELIB_ZONETYPE_ID;
|
||||
tzobj->tzi.tz = tzi;
|
||||
tzobj->initialized = 1;
|
||||
@@ -3569,7 +3576,7 @@ PHP_FUNCTION(date_interval_create_from_date_string)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
date_instantiate(date_ce_interval, return_value TSRMLS_CC);
|
||||
php_date_instantiate(date_ce_interval, return_value TSRMLS_CC);
|
||||
|
||||
time = timelib_strtotime(time_str, time_str_len, &err, DATE_TIMEZONEDB);
|
||||
diobj = (php_interval_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
@@ -3713,6 +3720,7 @@ PHP_METHOD(DatePeriod, __construct)
|
||||
}
|
||||
|
||||
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
|
||||
dpobj->current = NULL;
|
||||
|
||||
if (isostr_len) {
|
||||
date_period_initialize(&(dpobj->start), &(dpobj->end), &(dpobj->interval), (int*) &recurrences, isostr, isostr_len TSRMLS_CC);
|
||||
@@ -3754,14 +3762,7 @@ PHP_METHOD(DatePeriod, __construct)
|
||||
/* end date */
|
||||
if (end) {
|
||||
dateobj = (php_date_obj *) zend_object_store_get_object(end TSRMLS_CC);
|
||||
clone = timelib_time_ctor();
|
||||
memcpy(clone, dateobj->time, sizeof(timelib_time));
|
||||
if (dateobj->time->tz_abbr) {
|
||||
clone->tz_abbr = strdup(dateobj->time->tz_abbr);
|
||||
}
|
||||
if (dateobj->time->tz_info) {
|
||||
clone->tz_info = dateobj->time->tz_info;
|
||||
}
|
||||
clone = timelib_time_clone(dateobj->time);
|
||||
dpobj->end = clone;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ struct _php_interval_obj {
|
||||
struct _php_period_obj {
|
||||
zend_object std;
|
||||
timelib_time *start;
|
||||
timelib_time *current;
|
||||
timelib_time *end;
|
||||
timelib_rel_time *interval;
|
||||
int recurrences;
|
||||
@@ -177,4 +178,9 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D);
|
||||
PHPAPI zend_class_entry *php_date_get_date_ce(void);
|
||||
PHPAPI zend_class_entry *php_date_get_timezone_ce(void);
|
||||
|
||||
/* Functions for creating DateTime objects, and initializing them from a string */
|
||||
PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
|
||||
PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC);
|
||||
|
||||
|
||||
#endif /* PHP_DATE_H */
|
||||
+18
-585
@@ -4,649 +4,82 @@ timezone_abbreviations_list() tests
|
||||
<?php
|
||||
date_default_timezone_set('UTC');
|
||||
$timezone_abbreviations = timezone_abbreviations_list();
|
||||
var_dump($timezone_abbreviations["est"]);
|
||||
var_dump($timezone_abbreviations["utc"]);
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(71) {
|
||||
array(8) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(16) "America/New_York"
|
||||
string(13) "Etc/Universal"
|
||||
}
|
||||
[1]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Antigua"
|
||||
string(7) "Etc/UTC"
|
||||
}
|
||||
[2]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(16) "America/Atikokan"
|
||||
string(8) "Etc/Zulu"
|
||||
}
|
||||
[3]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(21) "America/Cambridge_Bay"
|
||||
string(3) "GMT"
|
||||
}
|
||||
[4]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(14) "America/Cancun"
|
||||
string(9) "Universal"
|
||||
}
|
||||
[5]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(14) "America/Cayman"
|
||||
string(3) "UTC"
|
||||
}
|
||||
[6]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Chicago"
|
||||
string(4) "Zulu"
|
||||
}
|
||||
[7]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
int(0)
|
||||
["timezone_id"]=>
|
||||
string(21) "America/Coral_Harbour"
|
||||
}
|
||||
[8]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Detroit"
|
||||
}
|
||||
[9]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(18) "America/Fort_Wayne"
|
||||
}
|
||||
[10]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(18) "America/Grand_Turk"
|
||||
}
|
||||
[11]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(28) "America/Indiana/Indianapolis"
|
||||
}
|
||||
[12]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(20) "America/Indiana/Knox"
|
||||
}
|
||||
[13]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(23) "America/Indiana/Marengo"
|
||||
}
|
||||
[14]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(26) "America/Indiana/Petersburg"
|
||||
}
|
||||
[15]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(21) "America/Indiana/Vevay"
|
||||
}
|
||||
[16]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(25) "America/Indiana/Vincennes"
|
||||
}
|
||||
[17]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(23) "America/Indiana/Winamac"
|
||||
}
|
||||
[18]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(20) "America/Indianapolis"
|
||||
}
|
||||
[19]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Iqaluit"
|
||||
}
|
||||
[20]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Jamaica"
|
||||
}
|
||||
[21]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(27) "America/Kentucky/Louisville"
|
||||
}
|
||||
[22]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(27) "America/Kentucky/Monticello"
|
||||
}
|
||||
[23]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Knox_IN"
|
||||
}
|
||||
[24]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(18) "America/Louisville"
|
||||
}
|
||||
[25]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Managua"
|
||||
}
|
||||
[26]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(17) "America/Menominee"
|
||||
}
|
||||
[27]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(14) "America/Merida"
|
||||
}
|
||||
[28]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(16) "America/Montreal"
|
||||
}
|
||||
[29]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(14) "America/Nassau"
|
||||
}
|
||||
[30]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Nipigon"
|
||||
}
|
||||
[31]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(14) "America/Panama"
|
||||
}
|
||||
[32]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(19) "America/Pangnirtung"
|
||||
}
|
||||
[33]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(22) "America/Port-au-Prince"
|
||||
}
|
||||
[34]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(20) "America/Rankin_Inlet"
|
||||
}
|
||||
[35]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(21) "America/Santo_Domingo"
|
||||
}
|
||||
[36]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(19) "America/Thunder_Bay"
|
||||
}
|
||||
[37]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "America/Toronto"
|
||||
}
|
||||
[38]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(14) "Canada/Eastern"
|
||||
}
|
||||
[39]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(3) "EST"
|
||||
}
|
||||
[40]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(7) "EST5EDT"
|
||||
}
|
||||
[41]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(7) "Jamaica"
|
||||
}
|
||||
[42]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(10) "US/Central"
|
||||
}
|
||||
[43]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(15) "US/East-Indiana"
|
||||
}
|
||||
[44]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(10) "US/Eastern"
|
||||
}
|
||||
[45]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(17) "US/Indiana-Starke"
|
||||
}
|
||||
[46]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(-18000)
|
||||
["timezone_id"]=>
|
||||
string(11) "US/Michigan"
|
||||
}
|
||||
[47]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(13) "Australia/ACT"
|
||||
}
|
||||
[48]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Brisbane"
|
||||
}
|
||||
[49]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Canberra"
|
||||
}
|
||||
[50]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Currie"
|
||||
}
|
||||
[51]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Hobart"
|
||||
}
|
||||
[52]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Lindeman"
|
||||
}
|
||||
[53]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(19) "Australia/Melbourne"
|
||||
}
|
||||
[54]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(13) "Australia/NSW"
|
||||
}
|
||||
[55]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(20) "Australia/Queensland"
|
||||
}
|
||||
[56]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Sydney"
|
||||
}
|
||||
[57]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Tasmania"
|
||||
}
|
||||
[58]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(false)
|
||||
["offset"]=>
|
||||
int(36000)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Victoria"
|
||||
}
|
||||
[59]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(19) "Australia/Melbourne"
|
||||
}
|
||||
[60]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(13) "Australia/ACT"
|
||||
}
|
||||
[61]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Brisbane"
|
||||
}
|
||||
[62]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Canberra"
|
||||
}
|
||||
[63]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Currie"
|
||||
}
|
||||
[64]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Hobart"
|
||||
}
|
||||
[65]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Lindeman"
|
||||
}
|
||||
[66]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(13) "Australia/NSW"
|
||||
}
|
||||
[67]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(20) "Australia/Queensland"
|
||||
}
|
||||
[68]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(16) "Australia/Sydney"
|
||||
}
|
||||
[69]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Tasmania"
|
||||
}
|
||||
[70]=>
|
||||
array(3) {
|
||||
["dst"]=>
|
||||
bool(true)
|
||||
["offset"]=>
|
||||
int(39600)
|
||||
["timezone_id"]=>
|
||||
string(18) "Australia/Victoria"
|
||||
string(3) "UTC"
|
||||
}
|
||||
}
|
||||
Done
|
||||
@@ -26,7 +26,7 @@ var_dump( $abbr["acst"] );
|
||||
--EXPECT--
|
||||
*** Testing DateTimeZone::listAbbreviations() : basic functionality ***
|
||||
string(5) "array"
|
||||
int(338)
|
||||
int(399)
|
||||
|
||||
-- Format a sample entry --
|
||||
array(4) {
|
||||
|
||||
@@ -111,44 +111,24 @@ fclose( $file_handle );
|
||||
*** Testing DateTime::modify() : usage variation - unexpected values to first argument $modify***
|
||||
|
||||
-- int 0 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- int 1 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- int 12345 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- int -12345 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- float 10.5 --
|
||||
object(DateTime)#3 (3) {
|
||||
@@ -161,14 +141,9 @@ object(DateTime)#3 (3) {
|
||||
}
|
||||
|
||||
-- float -10.5 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- float .5 --
|
||||
object(DateTime)#3 (3) {
|
||||
@@ -182,181 +157,106 @@ object(DateTime)#3 (3) {
|
||||
|
||||
-- empty array --
|
||||
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- int indexed array --
|
||||
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- associative array --
|
||||
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- nested arrays --
|
||||
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- lowercase null --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- lowercase true --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- lowercase false --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- empty string DQ --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- empty string SQ --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- string DQ --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- string SQ --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- mixed case string --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- heredoc --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- instance of classWithToString --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- instance of classWithoutToString --
|
||||
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, object given in %s on line %d
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- undefined var --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- unset var --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(19) "2009-01-31 14:28:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
|
||||
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
|
||||
-- resource --
|
||||
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, resource given in %s on line %d
|
||||
Warning: DateTime::modify() expects parameter 1 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
|
||||
bool(false)
|
||||
===DONE===
|
||||
Loaded 100 of 708 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user