mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-25 01:45:41 +00:00
Compare commits
367
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4bc3416fd | ||
|
|
5312c39cfb | ||
|
|
0bf50a8302 | ||
|
|
5cf0084a92 | ||
|
|
857cd18cf4 | ||
|
|
d472434ea0 | ||
|
|
51f79846bf | ||
|
|
e715038920 | ||
|
|
03214a2aef | ||
|
|
7b6757d99a | ||
|
|
0c840ced7c | ||
|
|
494034901e | ||
|
|
f8acf826c3 | ||
|
|
1939b34c78 | ||
|
|
604de67b7d | ||
|
|
5516963633 | ||
|
|
0e1599afe0 | ||
|
|
c402956178 | ||
|
|
a7d1cad4c3 | ||
|
|
96c9cc315d | ||
|
|
8ba240a70b | ||
|
|
897b7b68cc | ||
|
|
8ddf9a2dc4 | ||
|
|
6c8a570a96 | ||
|
|
c291033469 | ||
|
|
716d2a3937 | ||
|
|
c5fec9e09d | ||
|
|
2034ace052 | ||
|
|
533b1df732 | ||
|
|
e17bfb472e | ||
|
|
213e9a0a3c | ||
|
|
18989420b6 | ||
|
|
c66a4e84bb | ||
|
|
37a13d2df7 | ||
|
|
8c4156ed28 | ||
|
|
3cc6bd10ac | ||
|
|
d9ebd0f3d6 | ||
|
|
22882a9d89 | ||
|
|
df78c48354 | ||
|
|
131e60ce56 | ||
|
|
5efda71e54 | ||
|
|
49e175be42 | ||
|
|
1e06c73192 | ||
|
|
34e686c556 | ||
|
|
2e02f18b15 | ||
|
|
899fe3d8af | ||
|
|
5d687afa89 | ||
|
|
f326713e42 | ||
|
|
6081dd781a | ||
|
|
4965d1c2ce | ||
|
|
af5f997a5d | ||
|
|
e5fdb5b3f0 | ||
|
|
af9ce6e650 | ||
|
|
48df4464ea | ||
|
|
9c8b42960d | ||
|
|
803cfe32e6 | ||
|
|
12885ef489 | ||
|
|
a52616b759 | ||
|
|
a7d1656b96 | ||
|
|
293a48cb9d | ||
|
|
cc22f021fe | ||
|
|
6c72ea87fd | ||
|
|
13c5bb9600 | ||
|
|
334758794d | ||
|
|
bf328b1681 | ||
|
|
a0ecb3794f | ||
|
|
b1433d86b2 | ||
|
|
2db96fea2d | ||
|
|
b23460063f | ||
|
|
b5003c3a86 | ||
|
|
d4267ce03a | ||
|
|
ad9ed232e7 | ||
|
|
2ee09835c1 | ||
|
|
9d1d25e625 | ||
|
|
e2ed4874b5 | ||
|
|
3488cf6fd8 | ||
|
|
7ffcb48184 | ||
|
|
08e7252abf | ||
|
|
79457d1964 | ||
|
|
6d97b4b2b3 | ||
|
|
232ab8d795 | ||
|
|
fb0128af2a | ||
|
|
f3dd77714d | ||
|
|
342240fd7f | ||
|
|
c42d5cf5de | ||
|
|
88223c5245 | ||
|
|
6027c56fd7 | ||
|
|
aef6432fbe | ||
|
|
300e0418a4 | ||
|
|
f0639611cf | ||
|
|
680ddabac1 | ||
|
|
21c9a9388f | ||
|
|
728c554f93 | ||
|
|
a3bd2d268c | ||
|
|
d2bdedbcfc | ||
|
|
4106d48d1c | ||
|
|
945938d33c | ||
|
|
c38b73a701 | ||
|
|
6f3bcb0d6e | ||
|
|
2d576c2a99 | ||
|
|
e667d23178 | ||
|
|
e93f8e74d4 | ||
|
|
0a3979e08b | ||
|
|
03ee0ddc5f | ||
|
|
4053dbe29f | ||
|
|
6c9c44905e | ||
|
|
4555779c39 | ||
|
|
a84a2d4ace | ||
|
|
2c327599a3 | ||
|
|
d9432d6a50 | ||
|
|
1d802ad5e5 | ||
|
|
85d3ac5763 | ||
|
|
f5f1c702cd | ||
|
|
ca29063da5 | ||
|
|
b2b3ce717f | ||
|
|
55c2721229 | ||
|
|
21525d0413 | ||
|
|
b053c4f4f6 | ||
|
|
c06ccf7c70 | ||
|
|
ce70b920e4 | ||
|
|
2546434008 | ||
|
|
b51f82f260 | ||
|
|
e956ba9357 | ||
|
|
fe67674809 | ||
|
|
aa3a5f7681 | ||
|
|
1b9cbab9a7 | ||
|
|
16e0dcea72 | ||
|
|
5f2a30e111 | ||
|
|
ace35a3d3b | ||
|
|
1978f41c8a | ||
|
|
4f73394fdd | ||
|
|
a6e0751079 | ||
|
|
2b04d68972 | ||
|
|
495e6719e0 | ||
|
|
f11bba4929 | ||
|
|
317bcb96d0 | ||
|
|
979eed5c6b | ||
|
|
0235a8acdc | ||
|
|
e8699d75da | ||
|
|
a4d709afe2 | ||
|
|
12a62ce868 | ||
|
|
6256b79a35 | ||
|
|
25b1dc917a | ||
|
|
20b03c84ec | ||
|
|
ff66c90af0 | ||
|
|
da5d40bae6 | ||
|
|
40ef6e07e0 | ||
|
|
9d0ca077ee | ||
|
|
f6fee381be | ||
|
|
2b33a41162 | ||
|
|
5c9f967999 | ||
|
|
da399ce6a8 | ||
|
|
18ff81eb1a | ||
|
|
d02aa44090 | ||
|
|
e77659a8c8 | ||
|
|
d440bb3e68 | ||
|
|
95fcf868d3 | ||
|
|
949cab09f2 | ||
|
|
58c6a08e00 | ||
|
|
954632e9ce | ||
|
|
4b0b032676 | ||
|
|
62857998c5 | ||
|
|
af5057bea7 | ||
|
|
5c8c57aa6c | ||
|
|
1b8d4695e2 | ||
|
|
9b5d56fd61 | ||
|
|
aebb23e4db | ||
|
|
e07083c378 | ||
|
|
7ddbfae022 | ||
|
|
e43270cb2a | ||
|
|
8f78c3b9eb | ||
|
|
f47976dd9b | ||
|
|
e030efa4f6 | ||
|
|
38343856e1 | ||
|
|
33926b19d0 | ||
|
|
e51eaaf665 | ||
|
|
4946dc1ab9 | ||
|
|
76a7fd893b | ||
|
|
da6abc8db4 | ||
|
|
5fd7c2b01d | ||
|
|
a53b884c47 | ||
|
|
38e11dfaee | ||
|
|
811f35d0ed | ||
|
|
91bcadd85e | ||
|
|
e31b51f9a0 | ||
|
|
56c9e22c1f | ||
|
|
67f1a58ac9 | ||
|
|
127651e9ae | ||
|
|
ab848ea400 | ||
|
|
15d8c80ead | ||
|
|
c61c24ad79 | ||
|
|
9ea9064779 | ||
|
|
3f47368738 | ||
|
|
1fe9f1e4f5 | ||
|
|
4b4a5bc1d3 | ||
|
|
846e076492 | ||
|
|
e06c4f7fe5 | ||
|
|
bf50218983 | ||
|
|
e2710310a0 | ||
|
|
20568e5028 | ||
|
|
97b86c3c4a | ||
|
|
0817a2c767 | ||
|
|
f5333418d7 | ||
|
|
2d59b87527 | ||
|
|
21986f98db | ||
|
|
4fcb9a9d1b | ||
|
|
0218e4eb19 | ||
|
|
9bb5867fad | ||
|
|
38be99b739 | ||
|
|
43e3a83d51 | ||
|
|
b5d9983ff4 | ||
|
|
4ef561c7ba | ||
|
|
546797f329 | ||
|
|
d2765e4b8c | ||
|
|
a2f8c9c1ae | ||
|
|
76b06780d5 | ||
|
|
091b7642c2 | ||
|
|
3b8bdb7164 | ||
|
|
abfd977410 | ||
|
|
92d54f81d6 | ||
|
|
56bcb22afb | ||
|
|
1696166466 | ||
|
|
91e7b3b84f | ||
|
|
076c25bfec | ||
|
|
d184f07b3c | ||
|
|
15ee33eb21 | ||
|
|
5ce11c2698 | ||
|
|
4005f06df6 | ||
|
|
57225f09ed | ||
|
|
21f579b338 | ||
|
|
70699d7f68 | ||
|
|
19be8b676c | ||
|
|
980c63651c | ||
|
|
f9357b44f3 | ||
|
|
4a773c0e58 | ||
|
|
2260fca3dd | ||
|
|
6d9cc92238 | ||
|
|
319611ffbd | ||
|
|
e5e6ba093f | ||
|
|
5d1bfd6fbf | ||
|
|
d39377924c | ||
|
|
fdb2709dd2 | ||
|
|
69d4a0b8d5 | ||
|
|
00a22d4d06 | ||
|
|
fc076ef605 | ||
|
|
fa6aaf8c03 | ||
|
|
adc070ca99 | ||
|
|
5164b81324 | ||
|
|
b4c92f31ad | ||
|
|
b17efe82ff | ||
|
|
b1c944dfd2 | ||
|
|
6b6a58c904 | ||
|
|
de95dc7297 | ||
|
|
09ea489aef | ||
|
|
ffd74a0a29 | ||
|
|
a03a1ab88c | ||
|
|
dc92e81922 | ||
|
|
0094fd0969 | ||
|
|
9103c9eb4f | ||
|
|
e3a48b3a43 | ||
|
|
3e276d6728 | ||
|
|
e3ca87265d | ||
|
|
6ef8e0f088 | ||
|
|
8a22540a95 | ||
|
|
c507c9f01b | ||
|
|
466b8aa444 | ||
|
|
1e2818b143 | ||
|
|
0a80849250 | ||
|
|
3e9cb6a4a5 | ||
|
|
af5cc61cf3 | ||
|
|
291b45afb5 | ||
|
|
2b475eebbe | ||
|
|
14dd6c2d54 | ||
|
|
cdd1c1122e | ||
|
|
5bc4eb714a | ||
|
|
62b2eb666d | ||
|
|
5bf6a093ad | ||
|
|
b99862e7ae | ||
|
|
fb3b8de98d | ||
|
|
16b293de50 | ||
|
|
c575ab0c88 | ||
|
|
8bea8cf9cd | ||
|
|
345f6d90d5 | ||
|
|
2379ec474e | ||
|
|
5bd443a452 | ||
|
|
c62f32c3cc | ||
|
|
cf2b9955d4 | ||
|
|
4392339c3e | ||
|
|
e9be93b333 | ||
|
|
a444900c8d | ||
|
|
0cc18fdfba | ||
|
|
8e2d396b52 | ||
|
|
8517001b25 | ||
|
|
579898e338 | ||
|
|
f880013c4d | ||
|
|
58f4bf441a | ||
|
|
d8ff8f6f20 | ||
|
|
f7cb87f333 | ||
|
|
192b35382a | ||
|
|
ea60d79e23 | ||
|
|
eb46096608 | ||
|
|
941c39bd06 | ||
|
|
0842200501 | ||
|
|
b14b8dfc10 | ||
|
|
ef7821506a | ||
|
|
1c13ad7c0e | ||
|
|
b79301d11f | ||
|
|
54fee59598 | ||
|
|
220e0d4a55 | ||
|
|
770fcdab90 | ||
|
|
35ceea928b | ||
|
|
ea1d42641c | ||
|
|
4cad8fcad2 | ||
|
|
35d213c9ce | ||
|
|
3fbacdc6e8 | ||
|
|
b22f33afe2 | ||
|
|
2d625b5f81 | ||
|
|
aa1c4fd0be | ||
|
|
a827fa9cd8 | ||
|
|
bb422cb60e | ||
|
|
dbcd6304bb | ||
|
|
b576cbbf05 | ||
|
|
1c7f4d2b4b | ||
|
|
d3dcd61623 | ||
|
|
46344b11b4 | ||
|
|
cc9f02751b | ||
|
|
c1aa9baf29 | ||
|
|
81098de41c | ||
|
|
f6841d250a | ||
|
|
03c703b8bd | ||
|
|
a328803803 | ||
|
|
db960e82b4 | ||
|
|
d7bb09cc1d | ||
|
|
03fa5501a8 | ||
|
|
acfed1c4c7 | ||
|
|
03be983398 | ||
|
|
aca526a13b | ||
|
|
61499bf282 | ||
|
|
dafb2af705 | ||
|
|
ea4cee93c8 | ||
|
|
8b903f24d5 | ||
|
|
68283c9f4a | ||
|
|
6bad228b4e | ||
|
|
49341e992a | ||
|
|
5addf223d5 | ||
|
|
a18cec1b86 | ||
|
|
3586d14b61 | ||
|
|
fae4f64865 | ||
|
|
53c68811ba | ||
|
|
d963cf94a5 | ||
|
|
7c400dc867 | ||
|
|
c2acdbdd3d | ||
|
|
5e988a888a | ||
|
|
0ec122b804 | ||
|
|
6e1e98d7b8 | ||
|
|
de6f297e7c | ||
|
|
dc407c2402 | ||
|
|
5328d42899 | ||
|
|
ba03830241 | ||
|
|
947b20bc67 | ||
|
|
7a5f1663c6 | ||
|
|
228a3537d3 | ||
|
|
444690eca8 | ||
|
|
5224614f23 | ||
|
|
9eb726b3ab | ||
|
|
6bf7c10b20 | ||
|
|
1d34d82231 |
No files matched your search
+12
-2
@@ -5,7 +5,11 @@ php:
|
||||
- 5.4
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
email:
|
||||
on_failure: change
|
||||
|
||||
cache:
|
||||
- apt
|
||||
|
||||
env:
|
||||
global:
|
||||
@@ -15,8 +19,14 @@ env:
|
||||
- PDO_MYSQL_TEST_USER=travis
|
||||
- PDO_MYSQL_TEST_PASS=
|
||||
- PDO_MYSQL_TEST_HOST=127.0.0.1
|
||||
matrix:
|
||||
- REPORT_EXIT_STATUS=1
|
||||
matrix:
|
||||
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
|
||||
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
|
||||
|
||||
before_install:
|
||||
- sudo cp ./travis/de /var/lib/locales/supported.d/de
|
||||
- sudo dpkg-reconfigure locales
|
||||
|
||||
before_script:
|
||||
# Compile PHP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2012 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2014 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
|
||||
@rm -rf lcov_data/
|
||||
@$(mkinstalldirs) lcov_data/
|
||||
@echo
|
||||
-@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
|
||||
-@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | sed -e 's/.libs/zzzz/g' | sort | sed -e 's/zzzz/.libs/g' | uniq` ;\
|
||||
for x in $$files; do \
|
||||
echo -n . ;\
|
||||
y=`echo $$x | sed -e 's!\.libs/!!'`; \
|
||||
|
||||
@@ -1,6 +1,162 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
01 May 2014, PHP 5.5.12
|
||||
10 Jul 2014, PHP 5.5.15RC1
|
||||
|
||||
- Core:
|
||||
. Fixed bug #67428 (header('Location: foo') will override a 308-399 response
|
||||
code). (Adam)
|
||||
. Fixed bug #67436 (Autoloader isn't called if two method definitions don't
|
||||
match). (Bob)
|
||||
. Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
|
||||
(Ferenc)
|
||||
. Fixed bug #67497 (eval with parse error causes segmentation fault in
|
||||
generator). (Nikita)
|
||||
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
|
||||
. Fixed bug #67407 (Windows 8.1/Server 2012 R2 reported as Windows 8/Server
|
||||
2012). (Christian Wenz)
|
||||
|
||||
- CLI server:
|
||||
. Implemented FR #67429 (CLI server is missing some new HTTP response codes).
|
||||
(Adam)
|
||||
. Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
|
||||
(Adam)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #67530 (error_log=syslog ignored). (Remi)
|
||||
. Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #66921 (Wrong argument type hint for function
|
||||
intltz_from_date_time_zone). (Stas)
|
||||
. Fixed bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting).
|
||||
(Stas)
|
||||
|
||||
- OPCache:
|
||||
. Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault
|
||||
happen) (Dmitry, Laruence)
|
||||
|
||||
- pgsql:
|
||||
. Fixed bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
|
||||
which affected builds against libpq < 7.3. (Adam)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #67587 (Redirection loop on nginx with FPM). (Christian Weiske)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #67539 (ArrayIterator use-after-free due to object change during
|
||||
sorting). (research at insighti dot org, Laruence)
|
||||
. Fixed bug #67538 (SPL Iterators use-after-free). (CVE-2014-4670) (Laruence)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam)
|
||||
|
||||
27 Jun 2014, PHP 5.5.14
|
||||
|
||||
- Core:
|
||||
. Fixed BC break introduced by patch for bug #67072. (Anatol, Stas)
|
||||
. Fixed bug #66622 (Closures do not correctly capture the late bound class
|
||||
(static::) in some cases). (Levi Morrison)
|
||||
. Fixed bug #67390 (insecure temporary file use in the configure script).
|
||||
(Remi) (CVE-2014-3981)
|
||||
. Fixed bug #67399 (putenv with empty variable may lead to crash). (Stas)
|
||||
|
||||
- CLI server:
|
||||
. Fixed Bug #67406 (built-in web-server segfaults on startup). (Remi)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #67308 (Serialize of DateTime truncates fractions of second).
|
||||
(Adam)
|
||||
. Fixed regression in fix for bug #67118 (constructor can't be called twice).
|
||||
(Remi)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #67326 (fileinfo: cdf_read_short_sector insufficient boundary check).
|
||||
. Fixed bug #67410 (fileinfo: mconvert incorrect handling of truncated pascal
|
||||
string size). (Francisco Alonso, Jan Kaluza, Remi)
|
||||
. Fixed bug #67411 (fileinfo: cdf_check_stream_offset insufficient boundary
|
||||
check). (Francisco Alonso, Jan Kaluza, Remi)
|
||||
. Fixed bug #67412 (fileinfo: cdf_count_chain insufficient boundary check).
|
||||
(Francisco Alonso, Jan Kaluza, Remi)
|
||||
. Fixed bug #67413 (fileinfo: cdf_read_property_info insufficient boundary
|
||||
check). (Francisco Alonso, Jan Kaluza, Remi)
|
||||
|
||||
- Network:
|
||||
. Fixed bug #67432 (Fix potential segfault in dns_get_record()).
|
||||
(CVE-2014-4049). (Sara)
|
||||
|
||||
- OPCache:
|
||||
. Fixed issue #183 (TMP_VAR is not only used once). (Dmitry, Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #65698 (certificates validity parsing does not work past 2050).
|
||||
(Paul Oehler)
|
||||
. Fixed bug #66636 (openssl_x509_parse warning with V_ASN1_GENERALIZEDTIME).
|
||||
(Paul Oehler)
|
||||
|
||||
- PDO-ODBC:
|
||||
. Fixed bug #50444 (PDO-ODBC changes for 64-bit).
|
||||
|
||||
- SOAP:
|
||||
. Implemented FR #49898 (Add SoapClient::__getCookies()). (Boro Sitnikovski)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #66127 (Segmentation fault with ArrayObject unset). (Stas)
|
||||
. Fixed bug #67359 (Segfault in recursiveDirectoryIterator). (Laruence)
|
||||
. Fixed bug #67360 (Missing element after ArrayObject::getIterator). (Adam)
|
||||
|
||||
29 May 2014, PHP 5.5.13
|
||||
|
||||
- CLI server:
|
||||
. Fixed bug #67079 (Missing MIME types for XML/XSL files). (Anatol)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #66431 (Special Character via COM Interface (CP_UTF8)). (Anatol)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #65701 (copy() doesn't work when destination filename is created
|
||||
by tempnam()). (Boro Sitnikovski)
|
||||
. Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
|
||||
. Fixed bug #67245 (usage of memcpy() with overlapping src and dst in
|
||||
zend_exceptions.c). (Bob)
|
||||
. Fixed bug #67247 (spl_fixedarray_resize integer overflow). (Stas)
|
||||
. Fixed bug #67249 (printf out-of-bounds read). (Stas)
|
||||
. Fixed bug #67250 (iptcparse out-of-bounds read). (Stas)
|
||||
. Fixed bug #67252 (convert_uudecode out-of-bounds read). (Stas)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #64247 (CURLOPT_INFILE doesn't allow reset). (Mike)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #67118 (DateTime constructor crash with invalid data). (Anatol)
|
||||
. Fixed bug #67251 (date_parse_from_format out-of-bounds read). (Stas)
|
||||
. Fixed bug #67253 (timelib_meridian_with_check out-of-bounds read). (Stas)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
|
||||
not only the subset). (Anatol)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
|
||||
. Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS) (CVE-2014-0238).
|
||||
. Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
|
||||
performance degradation) (CVE-2014-0237).
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
|
||||
(Julio Pintos)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #67248 (imageaffinematrixget missing check of parameters). (Stas)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #67238 (Ungreedy and min/max quantifier bug, applied patch
|
||||
from the upstream). (Anatol)
|
||||
|
||||
- Phar:
|
||||
. Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent
|
||||
in its name). (PR #588)
|
||||
|
||||
30 Apr 2014, PHP 5.5.12
|
||||
- Core:
|
||||
. Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike)
|
||||
. Fixed bug #64330 (stream_socket_server() creates wrong Abstract Namespace
|
||||
@@ -10,6 +166,7 @@ PHP NEWS
|
||||
. Fixed bug #67024 (getimagesize should recognize BMP files with negative
|
||||
height). (Gabor Buella)
|
||||
. Fixed bug #67043 (substr_compare broke by previous change) (Tjerk)
|
||||
. Fixed bug #67033 (Remove reference to Windows 95). (Anatol)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #66562 (curl_exec returns differently than curl_multi_getcontent).
|
||||
@@ -28,7 +185,8 @@ PHP NEWS
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #66482 (unknown entry 'priority' in php-fpm.conf).
|
||||
. Fixed bug #67060 (possible privilege escalation due to insecure default configuration). (CVE-2014-0185) (christian at hoffie dot info)
|
||||
. Fixed bug #67060 (sapi/fpm: possible privilege escalation due to insecure
|
||||
default configuration) (CVE-2014-0185). (Stas)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #66021 (Blank line inside empty array/object when
|
||||
@@ -1236,7 +1394,8 @@ spaces) (willfitch, iliaa)
|
||||
. Fixed bug #63999 (php with fpm fails to build on Solaris 10 or 11). (Adam)
|
||||
|
||||
- Litespeed:
|
||||
. Fixed bug #63228 (-Werror=format-security error in lsapi code). (George)
|
||||
. Fixed bug #63228 (-Werror=format-security error in lsapi code).
|
||||
(Elan Ruusamäe, George)
|
||||
|
||||
- ext/sqlite3:
|
||||
. Fixed bug #63921 (sqlite3::bindvalue and relative PHP functions aren't
|
||||
|
||||
+32
-19
@@ -11,17 +11,27 @@ because the sysadmins can not upgrade stuff then.
|
||||
2. Package two days before a release. So if the release is to be on Thursday,
|
||||
package on Tuesday. Think about timezones as well.
|
||||
|
||||
3. Ensure that Windows builds will work before packaging
|
||||
3. Ensure that the tests on Travis CI are green.
|
||||
See: https://travis-ci.org/php/php-src/builds
|
||||
It is recommended to do so a couple of days before the packaging day, to
|
||||
have enough time to investigate failures, communicate with the authors and
|
||||
commit the fixes.
|
||||
The RM for the branch is also responsible for keeping the CI green on
|
||||
ongoing bases between the releases. Check the CI status for your branch
|
||||
periodically and resolve the failures ASAP. See more in:
|
||||
https://wiki.php.net/rfc/travis_ci
|
||||
|
||||
4. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
|
||||
4. Ensure that Windows builds will work before packaging
|
||||
|
||||
5. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
|
||||
Johannes/Stas/Derick/Ilia) before proceeding. Ideally make sure that for the
|
||||
first releases one of the previous RM's is around to answer questions. For the
|
||||
steps related to the php/QA/bug websites try to have someone from the webmaster
|
||||
team (Bjori) on hand.
|
||||
|
||||
5. Verify the tags to be extra sure everything was tagged properly.
|
||||
6. Verify the tags to be extra sure everything was tagged properly.
|
||||
|
||||
6. Moving extensions from/to PECL requires write acces to the destination.
|
||||
7. Moving extensions from/to PECL requires write acces to the destination.
|
||||
Most developers should have this.
|
||||
|
||||
Moving extensions from php-src to PECL
|
||||
@@ -48,47 +58,49 @@ Rolling a non stable release (alpha/beta/RC)
|
||||
|
||||
1. Check windows snapshot builder logs (http://windows.php.net/downloads/snaps/ the last revision)
|
||||
|
||||
2. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
2. Check the tests at https://travis-ci.org/php/php-src/builds
|
||||
|
||||
3. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
|
||||
3. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
|
||||
4. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
|
||||
|
||||
4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
5. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
Do not use abbreviations for alpha and beta. Do not use dashes, you should
|
||||
``#define PHP_VERSION "5.4.22RC1"`` and not ``#define PHP_VERSION "5.4.22-RC1"``
|
||||
|
||||
5. Compile and make test, with and without ZTS, using the right Bison version
|
||||
6. Compile and make test, with and without ZTS, using the right Bison version
|
||||
(for example, for 5.5, Bison 2.4.1 is used)
|
||||
|
||||
6. Check ./sapi/cli/php -v output for version matching.
|
||||
7. Check ./sapi/cli/php -v output for version matching.
|
||||
|
||||
7. If all is right, commit the changes to the release branch with ``git commit -a``.
|
||||
8. If all is right, commit the changes to the release branch with ``git commit -a``.
|
||||
|
||||
8. Tag the repository release branch with the version, e.g.:
|
||||
9. Tag the repository release branch with the version, e.g.:
|
||||
``git tag -u YOURKEYID php-5.4.2RC2``
|
||||
|
||||
9. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
|
||||
10. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
|
||||
in the *main* branch (PHP-5.4 for example) to prepare for the **next** version.
|
||||
F.e. if the RC is "5.4.1RC1" then the new one should be "5.4.2-dev" - regardless if we get
|
||||
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
|
||||
Commit the changes to the main branch.
|
||||
|
||||
10. Push the changes to the main repo, the tag, the main branch and the release branch :
|
||||
11. Push the changes to the main repo, the tag, the main branch and the release branch :
|
||||
``git push --tags origin HEAD``
|
||||
``git push origin {main branch}``
|
||||
``git push origin {release branch}``
|
||||
|
||||
11. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
|
||||
12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
|
||||
and build three tarballs (gz, bz2 and xz).
|
||||
|
||||
12. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
|
||||
13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
|
||||
directory "downloads/". Copy them into there, so that the system can generate
|
||||
MD5 sums. If you do not have this directory, talk to Derick or Dan.
|
||||
|
||||
13. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
14. Now the RC can be found on http://downloads.php.net/yourname,
|
||||
f.e. http://downloads.php.net/derick/
|
||||
|
||||
14. Once the release has been tagged, contact the PHP Windows development team
|
||||
15. Once the release has been tagged, contact the PHP Windows development team
|
||||
(internals-win@lists.php.net) so that Windows binaries can be created. Once
|
||||
those are made, they should be placed into the same directory as the source snapshots.
|
||||
|
||||
@@ -144,7 +156,8 @@ the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
|
||||
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
|
||||
Don't forget to update NEWS manually in an extra commit then.
|
||||
|
||||
3. Commit those changes
|
||||
3. Commit those changes. Ensure the tests at https://travis-ci.org/php/php-src/builds are
|
||||
still passing.
|
||||
|
||||
4. run the "scripts/dev/credits" script in php-src and commit the changes in the
|
||||
credits files in ext/standard.
|
||||
@@ -154,7 +167,7 @@ credits files in ext/standard.
|
||||
|
||||
6. Check ./sapi/cli/php -v output for version matching.
|
||||
|
||||
7. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
|
||||
7. tag the repository with the version f.e. "``git tag -u YOURKEYID -s php-5.4.1``"
|
||||
|
||||
8. Push the tag f.e. "``git push origin php-5.4.1``"
|
||||
|
||||
|
||||
Executable → Regular
File mode changed.
@@ -7,6 +7,7 @@ PHP 5.5 UPGRADE NOTES
|
||||
2. Changes in SAPI modules
|
||||
3. Deprecated Functionality
|
||||
4. Changed Functions
|
||||
a. unserialize() change
|
||||
5. New Functions
|
||||
6. New Classes and Interfaces
|
||||
7. Removed Extensions
|
||||
@@ -85,6 +86,10 @@ PHP 5.5 UPGRADE NOTES
|
||||
configure this. The service can now use Type=notify in the systemd
|
||||
unit file. (Remi)
|
||||
|
||||
- Support for several XML MIME types in the built-in CLI server. For static
|
||||
files with extensions .xml, .xsl, .xsd the Content-Type header
|
||||
application/xml is now sent automatically.
|
||||
|
||||
========================================
|
||||
3. Deprecated Functionality
|
||||
========================================
|
||||
@@ -189,6 +194,47 @@ PHP 5.5 UPGRADE NOTES
|
||||
- Since 5.5.4, fputcsv() has fifth parameter escape_char, allowing to
|
||||
specify escape char.
|
||||
|
||||
4a. unserialize() change
|
||||
------------------------
|
||||
|
||||
- Starting PHP 5.5.13, the bug fix for bug #67072 introduces a change to
|
||||
unserialize() function, detailed below:
|
||||
|
||||
If the string looking like 'O:..:"ClassName":...' is unserialized, and
|
||||
the class named is an internal class that declares custom unserializer
|
||||
function, or extends such class, unserialize would fail.
|
||||
|
||||
Using O: for user classes not extending internal classes (including
|
||||
those implementing Serializable) is still supported in 5.4, though
|
||||
it is deprecated and may not be supported in 5.6 for classes that do not
|
||||
originally serialize to O:. Same for using O: for internal classes
|
||||
implementing Serializable (like ArrayObject) and classes that extend
|
||||
them.
|
||||
|
||||
The reason for that is that O: format is meant to be used with classes
|
||||
that do not define custom handlers, and was never intended for the use
|
||||
with classes that do. When used with the class that relies on custom
|
||||
unserializer, it can leave the object of such internal class in an
|
||||
inconsistent state which has been observed to result in crashes and may
|
||||
also lead to memory corruption and ultimately even arbitrary code
|
||||
execution. This was never the intended use of unserializer, and mere
|
||||
possibility of doing this constitutes a bug, since the data passed to
|
||||
unserialize() is not a valid serialization of any object. Since there
|
||||
are many applications applying unserialize() to untrusted data, this
|
||||
presents a potential security vulnerability. Thus, keeping such bug in
|
||||
the code base was considered too dangerous.
|
||||
|
||||
We are aware that some applications use O: format as a way to
|
||||
instantiate classes. This was never the intended usage of serializer,
|
||||
and ReflectionClass methods such as newInstance or
|
||||
newInstanceWithoutConstructor can be used for that. We're working on
|
||||
providing more comprehensive solution for such use cases in PHP 5.6 and
|
||||
welcome the ideas in this area.
|
||||
|
||||
We note also that using unserialize() on any data that is not the result
|
||||
of serialize() call continues to be an unsupported scenario and should
|
||||
not be relied on to produce any specific result.
|
||||
|
||||
========================================
|
||||
5. New Functions
|
||||
========================================
|
||||
@@ -302,6 +348,9 @@ PHP 5.5 UPGRADE NOTES
|
||||
- LDAP:
|
||||
- ldap_modify_batch() (5.5.10)
|
||||
|
||||
- SOAP:
|
||||
- SoapClient::__getCookies() (5.5.14)
|
||||
|
||||
- Sockets:
|
||||
- socket_sendmsg()
|
||||
- socket_recvmsg()
|
||||
|
||||
@@ -8,6 +8,7 @@ UPGRADE NOTES - PHP X.Y
|
||||
c. Lowercasing and locales
|
||||
d. zend_qsort_r
|
||||
e. get_current_key
|
||||
f. unserialization of manipulated object strings
|
||||
|
||||
2. Build system changes
|
||||
a. Unix build system changes
|
||||
@@ -108,6 +109,21 @@ void (*get_current_key)(zend_object_iterator *iter, zval *key TSRMLS_DC);
|
||||
|
||||
The key should be written into the zval* using the ZVAL_* macros.
|
||||
|
||||
f. unserialization of manipulated object strings
|
||||
|
||||
Strings requiring unserialization of objects are now explicitly checked
|
||||
whether the object they contain implements the Serializable interface.
|
||||
This solves the situation where manipulated strings could be passed for
|
||||
objects using Serializable to disallow serialization. An object
|
||||
implementing Serializable will always start with "C:" in the serialized
|
||||
string, all other objects are represented with starting "O:". Objects
|
||||
implementing Serializable to disable serialization using
|
||||
zend_class_unserialize_deny and zend_class_serialize_deny, when
|
||||
instantiated from the serializer with a manipulated "O:" string at the
|
||||
start, will most likely be defectively initialized. This is now
|
||||
fixed at the appropriate place by checking for the presence of the
|
||||
serialize callback in the class entry.
|
||||
|
||||
========================
|
||||
2. Build system changes
|
||||
========================
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
class a {
|
||||
public function test($arg = c::TESTCONSTANT) {
|
||||
echo __METHOD__ . "($arg)\n";
|
||||
}
|
||||
|
||||
static public function staticTest() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
class b extends a {
|
||||
public function test() {
|
||||
echo __METHOD__ . "()\n";
|
||||
parent::test();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
bug67436: Autoloader isn't called if user defined error handler is present
|
||||
|
||||
--INI--
|
||||
error_reporting=
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
spl_autoload_register(function($classname) {
|
||||
if (in_array($classname, array('a','b','c'))) {
|
||||
require_once ($classname . '.php');
|
||||
}
|
||||
});
|
||||
|
||||
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
|
||||
}, error_reporting());
|
||||
|
||||
a::staticTest();
|
||||
|
||||
$b = new b();
|
||||
$b->test();
|
||||
|
||||
--EXPECT--
|
||||
b::test()
|
||||
a::test(c::TESTCONSTANT)
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
bug67436: E_STRICT instead of custom error handler
|
||||
|
||||
--INI--
|
||||
error_reporting=-1
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
spl_autoload_register(function($classname) {
|
||||
if (in_array($classname, array('a','b','c'))) {
|
||||
require_once ($classname . '.php');
|
||||
}
|
||||
});
|
||||
|
||||
a::staticTest();
|
||||
|
||||
$b = new b();
|
||||
$b->test();
|
||||
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s/bug67436/b.php on line %d
|
||||
b::test()
|
||||
a::test(c::TESTCONSTANT)
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
class c {
|
||||
const TESTCONSTANT = "c::TESTCONSTANT";
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Closure 049: static::class in static closure in non-static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function foo() {
|
||||
$f = static function() {
|
||||
return static::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
$b = new B;
|
||||
|
||||
var_dump($b->foo());
|
||||
--EXPECT--
|
||||
string(1) "B"
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Closure 050: static::class in non-static closure in non-static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function foo() {
|
||||
$f = function() {
|
||||
return static::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
$b = new B;
|
||||
var_dump($b->foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "B"
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Closure 051: static::class in static closure in static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static function foo() {
|
||||
$f = static function() {
|
||||
return static::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
var_dump(B::foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "B"
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Closure 052: static::class in non-static closure in static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static function foo() {
|
||||
$f = function() {
|
||||
return static::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
var_dump(B::foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "B"
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Closure 053: self::class in static closure in non-static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function foo() {
|
||||
$f = static function() {
|
||||
return self::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
$b = new B;
|
||||
var_dump($b->foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "A"
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Closure 054: self::class in non-static closure in non-static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
function foo() {
|
||||
$f = function() {
|
||||
return self::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
$b = new B;
|
||||
var_dump($b->foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "A"
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Closure 055: self::class in static closure in static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static function foo() {
|
||||
$f = static function() {
|
||||
return self::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
var_dump(B::foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "A"
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Closure 056: self::class in non-static closure in static method.
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static function foo() {
|
||||
$f = function() {
|
||||
return self::class;
|
||||
};
|
||||
return $f();
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {}
|
||||
|
||||
var_dump(B::foo());
|
||||
|
||||
--EXPECT--
|
||||
string(1) "A"
|
||||
@@ -0,0 +1,37 @@
|
||||
--TEST--
|
||||
Bug 66622: Closures do not correctly capture the late bound class (static::) in some cases
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
static function name() { return 'A'; }
|
||||
function foo() {
|
||||
$fn = function() { return static::name(); };
|
||||
echo static::name() . ' vs ' . $fn() . "\n";
|
||||
}
|
||||
function bar() {
|
||||
$fn = static function() { return static::name(); };
|
||||
echo static::name() . ' vs ' . $fn() . "\n";
|
||||
}
|
||||
static function baz() {
|
||||
$fn = function() { return static::name(); };
|
||||
echo static::name() . ' vs ' . $fn() . "\n";
|
||||
}
|
||||
}
|
||||
class B extends A {
|
||||
static function name() { return 'B'; }
|
||||
}
|
||||
|
||||
function test() {
|
||||
(new B)->foo();
|
||||
(new B)->bar();
|
||||
(new B)->baz();
|
||||
B::baz();
|
||||
}
|
||||
test();
|
||||
|
||||
--EXPECT--
|
||||
B vs B
|
||||
B vs B
|
||||
B vs B
|
||||
B vs B
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #67467: eval with parse error causes segmentation fault in generator
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function gen() {
|
||||
$a = 1;
|
||||
yield $a;
|
||||
}
|
||||
|
||||
@eval('abc');
|
||||
|
||||
$values = gen();
|
||||
$values->next();
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -32,12 +32,11 @@ Stack trace:
|
||||
#0 %s(%d): serialize(Object(Generator))
|
||||
#1 {main}
|
||||
|
||||
exception 'Exception' with message 'Unserialization of 'Generator' is not allowed' in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: Generator->__wakeup()
|
||||
#1 %s(%d): unserialize('O:9:"Generator"...')
|
||||
#2 {main}
|
||||
|
||||
Warning: Erroneous data format for unserializing 'Generator' in %sserialize_unserialize_error.php on line %d
|
||||
|
||||
Notice: unserialize(): Error at offset 19 of 20 bytes in %sserialize_unserialize_error.php on line %s
|
||||
bool(false)
|
||||
exception 'Exception' with message 'Unserialization of 'Generator' is not allowed' in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): unserialize('C:9:"Generator"...')
|
||||
|
||||
@@ -245,16 +245,16 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
ZEND_FE(func_num_args, arginfo_zend__void)
|
||||
ZEND_FE(func_get_arg, arginfo_func_get_arg)
|
||||
ZEND_FE(func_get_args, arginfo_zend__void)
|
||||
ZEND_FE(strlen, arginfo_strlen)
|
||||
ZEND_FE(strcmp, arginfo_strcmp)
|
||||
ZEND_FE(strncmp, arginfo_strncmp)
|
||||
ZEND_FE(strcasecmp, arginfo_strcmp)
|
||||
ZEND_FE(strlen, arginfo_strlen)
|
||||
ZEND_FE(strcmp, arginfo_strcmp)
|
||||
ZEND_FE(strncmp, arginfo_strncmp)
|
||||
ZEND_FE(strcasecmp, arginfo_strcmp)
|
||||
ZEND_FE(strncasecmp, arginfo_strncmp)
|
||||
ZEND_FE(each, arginfo_each)
|
||||
ZEND_FE(each, arginfo_each)
|
||||
ZEND_FE(error_reporting, arginfo_error_reporting)
|
||||
ZEND_FE(define, arginfo_define)
|
||||
ZEND_FE(defined, arginfo_defined)
|
||||
ZEND_FE(get_class, arginfo_get_class)
|
||||
ZEND_FE(define, arginfo_define)
|
||||
ZEND_FE(defined, arginfo_defined)
|
||||
ZEND_FE(get_class, arginfo_get_class)
|
||||
ZEND_FE(get_called_class, arginfo_zend__void)
|
||||
ZEND_FE(get_parent_class, arginfo_get_class)
|
||||
ZEND_FE(method_exists, arginfo_method_exists)
|
||||
@@ -274,13 +274,13 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
ZEND_FE(get_included_files, arginfo_zend__void)
|
||||
ZEND_FALIAS(get_required_files, get_included_files, arginfo_zend__void)
|
||||
ZEND_FE(is_subclass_of, arginfo_is_subclass_of)
|
||||
ZEND_FE(is_a, arginfo_is_subclass_of)
|
||||
ZEND_FE(is_a, arginfo_is_subclass_of)
|
||||
ZEND_FE(get_class_vars, arginfo_get_class_vars)
|
||||
ZEND_FE(get_object_vars, arginfo_get_object_vars)
|
||||
ZEND_FE(get_class_methods, arginfo_get_class_methods)
|
||||
ZEND_FE(trigger_error, arginfo_trigger_error)
|
||||
ZEND_FALIAS(user_error, trigger_error, arginfo_trigger_error)
|
||||
ZEND_FE(set_error_handler, arginfo_set_error_handler)
|
||||
ZEND_FE(set_error_handler, arginfo_set_error_handler)
|
||||
ZEND_FE(restore_error_handler, arginfo_zend__void)
|
||||
ZEND_FE(set_exception_handler, arginfo_set_exception_handler)
|
||||
ZEND_FE(restore_exception_handler, arginfo_zend__void)
|
||||
@@ -288,14 +288,14 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
ZEND_FE(get_declared_traits, arginfo_zend__void)
|
||||
ZEND_FE(get_declared_interfaces, arginfo_zend__void)
|
||||
ZEND_FE(get_defined_functions, arginfo_zend__void)
|
||||
ZEND_FE(get_defined_vars, arginfo_zend__void)
|
||||
ZEND_FE(create_function, arginfo_create_function)
|
||||
ZEND_FE(get_resource_type, arginfo_get_resource_type)
|
||||
ZEND_FE(get_defined_vars, arginfo_zend__void)
|
||||
ZEND_FE(create_function, arginfo_create_function)
|
||||
ZEND_FE(get_resource_type, arginfo_get_resource_type)
|
||||
ZEND_FE(get_loaded_extensions, arginfo_get_loaded_extensions)
|
||||
ZEND_FE(extension_loaded, arginfo_extension_loaded)
|
||||
ZEND_FE(extension_loaded, arginfo_extension_loaded)
|
||||
ZEND_FE(get_extension_funcs, arginfo_extension_loaded)
|
||||
ZEND_FE(get_defined_constants, arginfo_get_defined_constants)
|
||||
ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
|
||||
ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
|
||||
ZEND_FE(debug_print_backtrace, arginfo_debug_print_backtrace)
|
||||
#if ZEND_DEBUG
|
||||
ZEND_FE(zend_test_func, NULL)
|
||||
@@ -305,7 +305,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
#endif
|
||||
ZEND_FE(gc_collect_cycles, arginfo_zend__void)
|
||||
ZEND_FE(gc_enabled, arginfo_zend__void)
|
||||
ZEND_FE(gc_enable, arginfo_zend__void)
|
||||
ZEND_FE(gc_enable, arginfo_zend__void)
|
||||
ZEND_FE(gc_disable, arginfo_zend__void)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
@@ -486,6 +486,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
|
||||
}
|
||||
}
|
||||
|
||||
closure->this_ptr = NULL;
|
||||
/* Invariants:
|
||||
* If the closure is unscoped, it has no bound object.
|
||||
* The the closure is scoped, it's either static or it's bound */
|
||||
@@ -497,10 +498,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
|
||||
Z_ADDREF_P(this_ptr);
|
||||
} else {
|
||||
closure->func.common.fn_flags |= ZEND_ACC_STATIC;
|
||||
closure->this_ptr = NULL;
|
||||
}
|
||||
} else {
|
||||
closure->this_ptr = NULL;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+6
-3
@@ -3336,8 +3336,11 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
|
||||
*zv = *precv->op2.zv;
|
||||
zval_copy_ctor(zv);
|
||||
INIT_PZVAL(zv);
|
||||
zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
|
||||
if (Z_TYPE_P(zv) == IS_BOOL) {
|
||||
if ((Z_TYPE_P(zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
|
||||
REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN_P(zv));
|
||||
memcpy(offset, Z_STRVAL_P(zv), Z_STRLEN_P(zv));
|
||||
offset += Z_STRLEN_P(zv);
|
||||
} else if (Z_TYPE_P(zv) == IS_BOOL) {
|
||||
if (Z_LVAL_P(zv)) {
|
||||
memcpy(offset, "true", 4);
|
||||
offset += 4;
|
||||
@@ -3359,7 +3362,7 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
|
||||
*(offset++) = '.';
|
||||
}
|
||||
*(offset++) = '\'';
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY || (Z_TYPE_P(zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT_ARRAY) {
|
||||
memcpy(offset, "Array", 5);
|
||||
offset += 5;
|
||||
} else {
|
||||
|
||||
@@ -363,7 +363,7 @@ ZEND_METHOD(error_exception, getSeverity)
|
||||
|
||||
#define TRACE_ARG_APPEND(vallen) \
|
||||
*str = (char*)erealloc(*str, *len + 1 + vallen); \
|
||||
memcpy((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
|
||||
memmove((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -448,8 +448,6 @@ ZEND_API int zend_is_true(zval *op) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#include "../TSRM/tsrm_strtok_r.h"
|
||||
|
||||
#define IS_VISITED_CONSTANT IS_CONSTANT_INDEX
|
||||
#define IS_CONSTANT_VISITED(p) (Z_TYPE_P(p) & IS_VISITED_CONSTANT)
|
||||
#define Z_REAL_TYPE_P(p) (Z_TYPE_P(p) & ~IS_VISITED_CONSTANT)
|
||||
|
||||
@@ -125,6 +125,7 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
|
||||
/* A fatal error / die occurred during the generator execution. Trying to clean
|
||||
* up the stack may not be safe in this case. */
|
||||
if (CG(unclean_shutdown)) {
|
||||
generator->execute_data = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+8
-1
@@ -5179,6 +5179,7 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
|
||||
{
|
||||
USE_OPLINE
|
||||
zend_function *op_array;
|
||||
int closure_is_static, closure_is_being_defined_inside_static_context;
|
||||
|
||||
SAVE_OPLINE();
|
||||
|
||||
@@ -5187,7 +5188,13 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
|
||||
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
|
||||
}
|
||||
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
|
||||
closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
|
||||
closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
|
||||
if (closure_is_static || closure_is_being_defined_inside_static_context) {
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
|
||||
} else {
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
|
||||
}
|
||||
|
||||
CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
|
||||
@@ -6487,6 +6487,7 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
|
||||
{
|
||||
USE_OPLINE
|
||||
zend_function *op_array;
|
||||
int closure_is_static, closure_is_being_defined_inside_static_context;
|
||||
|
||||
SAVE_OPLINE();
|
||||
|
||||
@@ -6495,7 +6496,13 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
|
||||
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
|
||||
}
|
||||
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
|
||||
closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
|
||||
closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
|
||||
if (closure_is_static || closure_is_being_defined_inside_static_context) {
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
|
||||
} else {
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
|
||||
}
|
||||
|
||||
CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
|
||||
@@ -1189,7 +1189,7 @@ function gen_vm($def, $skel) {
|
||||
fputs($f,"#define $op $code\n");
|
||||
}
|
||||
|
||||
fputs($f, "\n#endif");
|
||||
fputs($f, "\n#endif\n");
|
||||
fclose($f);
|
||||
echo "zend_vm_opcodes.h generated successfully.\n";
|
||||
|
||||
|
||||
@@ -170,4 +170,4 @@ ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);
|
||||
#define ZEND_FAST_CALL 162
|
||||
#define ZEND_FAST_RET 163
|
||||
|
||||
#endif
|
||||
#endif
|
||||
+1
-1
@@ -1711,7 +1711,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
FILE *fp;
|
||||
long position;
|
||||
char *filename = "/tmp/phpglibccheck";
|
||||
char *filename = tmpnam(NULL);
|
||||
|
||||
fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
|
||||
Vendored
-8
@@ -1532,10 +1532,6 @@ dgux*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
@@ -5843,10 +5839,6 @@ _LT_EOF
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
|
||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||
# does not break anything, and helps significantly (at the cost of a little
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=5
|
||||
PHP_RELEASE_VERSION=12
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_RELEASE_VERSION=15
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
#endif
|
||||
|
||||
if (php_check_open_basedir(path_copy TSRMLS_CC)) {
|
||||
#ifdef VIRTUAL_DIR
|
||||
free(path_copy);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -238,6 +241,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
|
||||
if (opened_path && bz_file) {
|
||||
*opened_path = estrdup(path_copy);
|
||||
}
|
||||
#ifdef VIRTUAL_DIR
|
||||
free(path_copy);
|
||||
#endif
|
||||
path_copy = NULL;
|
||||
|
||||
if (bz_file == NULL) {
|
||||
|
||||
@@ -46,7 +46,13 @@ PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, uint strin
|
||||
|
||||
if (string_len > 0) {
|
||||
olestring = (OLECHAR*)safe_emalloc(string_len, sizeof(OLECHAR), 0);
|
||||
/* XXX if that's a real multibyte string, olestring is obviously allocated excessively.
|
||||
This should be fixed by reallocating the olestring, but as emalloc is used, that doesn't
|
||||
matter much. */
|
||||
ok = MultiByteToWideChar(codepage, flags, string, string_len, olestring, string_len);
|
||||
if (ok > 0 && ok < string_len) {
|
||||
olestring[ok] = '\0';
|
||||
}
|
||||
} else {
|
||||
ok = FALSE;
|
||||
olestring = (OLECHAR*)emalloc(sizeof(OLECHAR));
|
||||
|
||||
@@ -154,7 +154,11 @@ PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codep
|
||||
case IS_STRING:
|
||||
V_VT(v) = VT_BSTR;
|
||||
olestring = php_com_string_to_olestring(Z_STRVAL_P(z), Z_STRLEN_P(z), codepage TSRMLS_CC);
|
||||
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR));
|
||||
if (CP_UTF8 == codepage) {
|
||||
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, wcslen(olestring) * sizeof(OLECHAR));
|
||||
} else {
|
||||
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR));
|
||||
}
|
||||
efree(olestring);
|
||||
break;
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
--TEST--
|
||||
Bug #66431 Special Character via COM Interface (CP_UTF8), Scripting.FileSystemObject
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$text= "Xin chào cộng đồng PHP";
|
||||
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt");
|
||||
|
||||
$fso = new COM("Scripting.FileSystemObject");
|
||||
$fh = $fso->OpenTextFile($fpath, 2, true);
|
||||
$fh->Write($text);
|
||||
$fh->Close();
|
||||
|
||||
$check_text = file_get_contents($fpath);
|
||||
|
||||
$result = ($check_text == $text);
|
||||
|
||||
var_dump($result);
|
||||
|
||||
if (!$result) {
|
||||
echo "Expected: '$check_text'\n";
|
||||
echo "Have: '$text'\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
||||
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt");
|
||||
|
||||
if (file_exists($fpath)) {
|
||||
unlink($fpath);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
===DONE===
|
||||
@@ -0,0 +1,60 @@
|
||||
--TEST--
|
||||
Bug #66431 Special Character via COM Interface (CP_UTF8), Application.Word
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
|
||||
|
||||
try {
|
||||
new COM("word.application", NULL, CP_UTF8);
|
||||
} catch (Exception $e) {
|
||||
die('skip ' . $e->getMessage();
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$text= "Xin chào cộng đồng PHP";
|
||||
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.docx");
|
||||
|
||||
com_load_typelib('Word.Application');
|
||||
|
||||
$Wrd = new COM("word.application", NULL, CP_UTF8);
|
||||
$Wrd->Documents->Add();
|
||||
$Wrd->Selection->TypeText($text);
|
||||
$Wrd->ActiveDocument->SaveAs($fpath);
|
||||
$Wrd->ActiveDocument->Close(false);
|
||||
$Wrd->Application->Quit();
|
||||
unset($Wrd);
|
||||
|
||||
$Wrd = new COM("word.application", NULL, CP_UTF8);
|
||||
$Wrd->Documents->Open($fpath, NULL, false);
|
||||
$check_text = $Wrd->ActiveDocument->Range($Wrd->ActiveDocument->Sentences(1)->Start, $Wrd->ActiveDocument->Sentences(1)->End)->Text;
|
||||
$Wrd->ActiveDocument->Close(false);
|
||||
$Wrd->Application->Quit();
|
||||
unset($Wrd);
|
||||
|
||||
/* trim the returned text as we'll get windows eol from a word doc. */
|
||||
$result = (trim($check_text) == $text);
|
||||
|
||||
var_dump($result);
|
||||
|
||||
if (!$result) {
|
||||
echo "Expected: '$check_text'\n";
|
||||
echo "Have: '$text'\n";
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
||||
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.docx");
|
||||
|
||||
if (file_exists($fpath)) {
|
||||
unlink($fpath);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
===DONE===
|
||||
+49
-19
@@ -2351,25 +2351,34 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue TSRMLS_DC)
|
||||
case CURLOPT_WRITEHEADER: {
|
||||
FILE *fp = NULL;
|
||||
int type;
|
||||
void * what;
|
||||
void *what = NULL;
|
||||
|
||||
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream(), php_file_le_pstream());
|
||||
if (!what) {
|
||||
return FAILURE;
|
||||
}
|
||||
if (Z_TYPE_PP(zvalue) != IS_NULL) {
|
||||
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream(), php_file_le_pstream());
|
||||
if (!what) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (FAILURE == php_stream_cast((php_stream *) what, PHP_STREAM_AS_STDIO, (void *) &fp, REPORT_ERRORS)) {
|
||||
return FAILURE;
|
||||
}
|
||||
if (FAILURE == php_stream_cast((php_stream *) what, PHP_STREAM_AS_STDIO, (void *) &fp, REPORT_ERRORS)) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (!fp) {
|
||||
return FAILURE;
|
||||
if (!fp) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
error = CURLE_OK;
|
||||
switch (option) {
|
||||
case CURLOPT_FILE:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (!what) {
|
||||
if (ch->handlers->write->stream) {
|
||||
Z_DELREF_P(ch->handlers->write->stream);
|
||||
ch->handlers->write->stream = NULL;
|
||||
}
|
||||
ch->handlers->write->fp = NULL;
|
||||
ch->handlers->write->method = PHP_CURL_STDOUT;
|
||||
} else if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (ch->handlers->write->stream) {
|
||||
Z_DELREF_P(ch->handlers->write->stream);
|
||||
}
|
||||
@@ -2383,7 +2392,14 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue TSRMLS_DC)
|
||||
}
|
||||
break;
|
||||
case CURLOPT_WRITEHEADER:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (!what) {
|
||||
if (ch->handlers->write_header->stream) {
|
||||
Z_DELREF_P(ch->handlers->write_header->stream);
|
||||
ch->handlers->write_header->stream = NULL;
|
||||
}
|
||||
ch->handlers->write_header->fp = NULL;
|
||||
ch->handlers->write_header->method = PHP_CURL_IGNORE;
|
||||
} else if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (ch->handlers->write_header->stream) {
|
||||
Z_DELREF_P(ch->handlers->write_header->stream);
|
||||
}
|
||||
@@ -2397,16 +2413,30 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue TSRMLS_DC)
|
||||
}
|
||||
break;
|
||||
case CURLOPT_INFILE:
|
||||
if (ch->handlers->read->stream) {
|
||||
Z_DELREF_P(ch->handlers->read->stream);
|
||||
if (!what) {
|
||||
if (ch->handlers->read->stream) {
|
||||
Z_DELREF_P(ch->handlers->read->stream);
|
||||
ch->handlers->read->stream = NULL;
|
||||
}
|
||||
ch->handlers->read->fp = NULL;
|
||||
ch->handlers->read->fd = 0;
|
||||
} else {
|
||||
if (ch->handlers->read->stream) {
|
||||
Z_DELREF_P(ch->handlers->read->stream);
|
||||
}
|
||||
Z_ADDREF_PP(zvalue);
|
||||
ch->handlers->read->fp = fp;
|
||||
ch->handlers->read->fd = Z_LVAL_PP(zvalue);
|
||||
ch->handlers->read->stream = *zvalue;
|
||||
}
|
||||
Z_ADDREF_PP(zvalue);
|
||||
ch->handlers->read->fp = fp;
|
||||
ch->handlers->read->fd = Z_LVAL_PP(zvalue);
|
||||
ch->handlers->read->stream = *zvalue;
|
||||
break;
|
||||
case CURLOPT_STDERR:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (!what) {
|
||||
if (ch->handlers->std_err) {
|
||||
zval_ptr_dtor(&ch->handlers->std_err);
|
||||
ch->handlers->std_err = NULL;
|
||||
}
|
||||
} else if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
if (ch->handlers->std_err) {
|
||||
zval_ptr_dtor(&ch->handlers->std_err);
|
||||
}
|
||||
|
||||
@@ -4,18 +4,15 @@ Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files)
|
||||
error_reporting = E_ALL & ~E_DEPRECATED
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
include 'skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 0);
|
||||
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
--TEST--
|
||||
Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files)
|
||||
--INI--
|
||||
error_reporting = E_ALL & ~E_DEPRECATED
|
||||
--SKIPIF--
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
|
||||
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt');
|
||||
$params = array('file' => $file);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
||||
var_dump(curl_exec($ch));
|
||||
|
||||
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain");
|
||||
$params = array('file' => $file);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
||||
var_dump(curl_exec($ch));
|
||||
|
||||
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', null, "foo.txt");
|
||||
$params = array('file' => $file);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
||||
var_dump(curl_exec($ch));
|
||||
|
||||
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain", "foo.txt");
|
||||
$params = array('file' => $file);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
||||
var_dump(curl_exec($ch));
|
||||
|
||||
|
||||
curl_close($ch);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "curl_testdata1.txt|application/octet-stream"
|
||||
string(%d) "curl_testdata1.txt|text/plain"
|
||||
string(%d) "foo.txt|application/octet-stream"
|
||||
string(%d) "foo.txt|text/plain"
|
||||
@@ -8,9 +8,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x071100) {
|
||||
exit("skip: test works only with curl >= 7.17.0");
|
||||
|
||||
@@ -5,9 +5,6 @@ Bug #46711 (lost memory when foreach is used for values passed to curl_setopt())
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
--TEST--
|
||||
Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
include 'server.inc';
|
||||
$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
|
||||
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
||||
curl_setopt($ch, CURLOPT_STDERR, $fp);
|
||||
curl_setopt($ch, CURLOPT_URL, getenv('PHP_CURL_HTTP_REMOTE_SERVER'));
|
||||
curl_setopt($ch, CURLOPT_URL, curl_cli_server_start());
|
||||
|
||||
fclose($fp); // <-- premature close of $fp caused a crash!
|
||||
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
include 'skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
include 'server.inc';
|
||||
function checkForClosedFilePointer($curl_option, $description) {
|
||||
$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
|
||||
|
||||
@@ -21,7 +16,7 @@ function checkForClosedFilePointer($curl_option, $description) {
|
||||
$options = array(
|
||||
CURLOPT_RETURNTRANSFER => 1,
|
||||
$curl_option => $fp,
|
||||
CURLOPT_URL => getenv("PHP_CURL_HTTP_REMOTE_SERVER")
|
||||
CURLOPT_URL => curl_cli_server_start()
|
||||
);
|
||||
|
||||
// we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly
|
||||
|
||||
@@ -4,7 +4,7 @@ Test curl_setopt() CURLOPT_FILE readonly file handle
|
||||
Mark van der Velden
|
||||
#testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
@@ -14,7 +14,8 @@ Mark van der Velden
|
||||
*/
|
||||
|
||||
// Figure out what handler to use
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
if(!empty($host)) {
|
||||
|
||||
// Use the set Environment variable
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
include 'skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -47,25 +42,20 @@ $options_to_check = array(
|
||||
"CURLOPT_INFILE"
|
||||
);
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
foreach($options_to_check as $option) {
|
||||
checkForClosedFilePointer($host, constant($option), $option);
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?>
|
||||
--EXPECTF--
|
||||
Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug54798.php on line %d
|
||||
* About to connect() %a
|
||||
* Closing connection %d
|
||||
Ok for CURLOPT_STDERR
|
||||
|
||||
Warning: curl_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug54798.php on line 24
|
||||
Ok for CURLOPT_WRITEHEADER
|
||||
|
||||
Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug54798.php on line 24
|
||||
%a
|
||||
%aOk for CURLOPT_STDERR
|
||||
%aOk for CURLOPT_WRITEHEADER
|
||||
%aOk for CURLOPT_FILE
|
||||
|
||||
Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug54798.php on line %d
|
||||
Ok for CURLOPT_INFILE
|
||||
%aOk for CURLOPT_INFILE
|
||||
===DONE===
|
||||
@@ -2,20 +2,16 @@
|
||||
Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
include 'skipif.inc';
|
||||
|
||||
if ($curl_version['version_number'] > 0x070a08) {
|
||||
exit("skip: tests works a versions of curl >= 7.10.8");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
Test curl_opt() function with POST params from array with a numeric key
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
include 'skipinf.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -13,7 +12,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl sending through GET an POST ***' . "\n";
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Bug #64267 (CURLOPT_INFILE doesn't allow reset)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
extension_loaded("curl") or die("skip need ext/curl");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
echo "TEST\n";
|
||||
|
||||
$c = curl_init("http://google.com");
|
||||
$f = fopen(__FILE__,"r");
|
||||
var_dump(curl_setopt_array($c, [
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_UPLOAD => true,
|
||||
CURLOPT_INFILE => $f,
|
||||
CURLOPT_INFILESIZE => filesize(__FILE__)
|
||||
]));
|
||||
fclose($f);
|
||||
var_dump(curl_setopt_array($c, [
|
||||
CURLOPT_UPLOAD => false,
|
||||
CURLOPT_INFILE => null,
|
||||
CURLOPT_INFILESIZE => 0,
|
||||
]));
|
||||
curl_exec($c);
|
||||
var_dump(curl_getinfo($c, CURLINFO_RESPONSE_CODE));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
TEST
|
||||
bool(true)
|
||||
bool(true)
|
||||
int(30%d)
|
||||
===DONE===
|
||||
@@ -1,18 +1,11 @@
|
||||
--TEST--
|
||||
Bug #66109 (Option CURLOPT_CUSTOMREQUEST can't be reset to default.)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=method");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
@@ -4,12 +4,14 @@ Test CURLOPT_READDATA without a callback function
|
||||
Mattijs Hoitink mattijshoitink@gmail.com
|
||||
#Testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
// The URL to POST to
|
||||
$url = getenv('PHP_CURL_HTTP_REMOTE_SERVER') . '/get.php?test=post';
|
||||
$url = $host . '/get.php?test=post';
|
||||
|
||||
// Create a temporary file to read the data from
|
||||
$tempname = tempnam(sys_get_temp_dir(), 'CURL_DATA');
|
||||
|
||||
@@ -4,10 +4,7 @@ Test curl_exec() function with basic functionality
|
||||
Sebastian Deutsch <sebastian.deutsch@9elements.com>
|
||||
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_exec(resource ch)
|
||||
@@ -15,8 +12,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Source code: ext/curl/interface.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo "*** Testing curl_exec() : basic functionality ***\n";
|
||||
|
||||
@@ -4,10 +4,7 @@ Test curl_opt() function with CURLOPT_RETURNTRANSFER parameter set to 1
|
||||
Sebastian Deutsch <sebastian.deutsch@9elements.com>
|
||||
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ***' . "\n";
|
||||
|
||||
@@ -4,10 +4,7 @@ Test curl_opt() function with POST parameters
|
||||
Sebastian Deutsch <sebastian.deutsch@9elements.com>
|
||||
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl sending through GET an POST ***' . "\n";
|
||||
|
||||
@@ -4,10 +4,7 @@ Test curl_opt() function with setting referer
|
||||
Sebastian Deutsch <sebastian.deutsch@9elements.com>
|
||||
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl setting referer ***' . "\n";
|
||||
|
||||
@@ -4,10 +4,7 @@ Test curl_opt() function with user agent
|
||||
Sebastian Deutsch <sebastian.deutsch@9elements.com>
|
||||
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl with user agent ***' . "\n";
|
||||
|
||||
@@ -4,10 +4,7 @@ Test curl_opt() function with CURLOPT_WRITEFUNCTION parameter set to a closure
|
||||
?
|
||||
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -16,23 +13,26 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl_setopt($ch, CURLOPT_WRITEFUNCTION, <closure>); ***' . "\n";
|
||||
|
||||
$url = "{$host}/get.php?test=get";
|
||||
$ch = curl_init();
|
||||
|
||||
$alldata = '';
|
||||
ob_start(); // start output buffering
|
||||
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
|
||||
curl_setopt($ch, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
|
||||
echo 'Data: '.$data;
|
||||
$GLOBALS['alldata'] .= $data;
|
||||
return strlen ($data);
|
||||
});
|
||||
|
||||
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
ob_end_flush();
|
||||
echo "Data: $alldata";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
@@ -25,5 +25,5 @@ curl_close($ch);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
%unicode|string%(%d) "%r(Couldn't resolve host|Could not resolve host:)%r %Swww.%s"
|
||||
%s resolve%s
|
||||
int(6)
|
||||
@@ -26,5 +26,5 @@ curl_close($ch);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
%unicode|string%(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:|Could not resolve host:)%r %s"
|
||||
%unicode|string%(%d) "%r(Couldn't resolve proxy|Could not resolve proxy:|Could not resolve host:|Could not resolve:)%r %s"
|
||||
int(5)
|
||||
@@ -3,7 +3,7 @@ Test curl_opt() function with COOKIE
|
||||
--CREDITS--
|
||||
TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl with cookie ***' . "\n";
|
||||
|
||||
@@ -3,7 +3,7 @@ Test curl_opt() function with CURLOPT_HTTP_VERSION/CURL_HTTP_VERSION_1_0
|
||||
--CREDITS--
|
||||
TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl with HTTP/1.0 ***' . "\n";
|
||||
|
||||
@@ -3,7 +3,7 @@ Test curl_opt() function with CURLOPT_HTTP_VERSION/CURL_HTTP_VERSION_1_1
|
||||
--CREDITS--
|
||||
TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo '*** Testing curl with HTTP/1.1 ***' . "\n";
|
||||
|
||||
@@ -3,7 +3,7 @@ Test curl_multi_exec() function with basic functionality
|
||||
--CREDITS--
|
||||
TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_multi_exec(resource ch)
|
||||
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo "*** Testing curl_exec() : basic functionality ***\n";
|
||||
|
||||
@@ -3,7 +3,7 @@ Test curl_setopt() with curl_multi function with basic functionality
|
||||
--CREDITS--
|
||||
TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
|
||||
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo "*** Testing curl_exec() : basic functionality ***\n";
|
||||
|
||||
@@ -3,22 +3,19 @@ Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter
|
||||
--CREDITS--
|
||||
Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
$url = "{$host}/get.php?test=";
|
||||
$url = "http://{$host}/get.php?test=";
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_exec($ch);
|
||||
$info = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
|
||||
var_dump($url == $info);
|
||||
|
||||
curl_close($ch);
|
||||
?>
|
||||
===DONE===
|
||||
|
||||
@@ -3,13 +3,11 @@ Test curl_getinfo() function with CURLINFO_HTTP_CODE parameter
|
||||
--CREDITS--
|
||||
Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
$url = "{$host}/get.php?test=";
|
||||
$ch = curl_init();
|
||||
|
||||
@@ -3,13 +3,11 @@ Test curl_getinfo() function with CURLINFO_CONTENT_TYPE parameter
|
||||
--CREDITS--
|
||||
Jean-Marc Fontaine <jmf@durcommefaire.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$url = "{$host}/get.php?test=contenttype";
|
||||
|
||||
$ch = curl_init();
|
||||
|
||||
@@ -4,11 +4,12 @@ Test curl_copy_handle() with simple get
|
||||
Rick Buitenman <rick@meritos.nl>
|
||||
#testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
echo '*** Testing curl copy handle with simple GET ***' . "\n";
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@ Test curl_copy_handle() with simple POST
|
||||
Rick Buitenman <rick@meritos.nl>
|
||||
#testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
echo '*** Testing curl copy handle with simple POST ***' . "\n";
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@ Test curl_copy_handle() after exec()
|
||||
Rick Buitenman <rick@meritos.nl>
|
||||
#testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
echo '*** Test curl_copy_handle() after exec() ***' . "\n";
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@ Test curl_copy_handle() after exec() with POST
|
||||
Rick Buitenman <rick@meritos.nl>
|
||||
#testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
echo '*** Test curl_copy_handle() after exec() with POST ***' . "\n";
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@ Test curl_copy_handle() with User Agent
|
||||
Rick Buitenman <rick@meritos.nl>
|
||||
#testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
echo '*** Testing curl copy handle with User Agent ***' . "\n";
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--TEST--
|
||||
Test curl_copy_handle() with simple POST
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
echo '*** Testing curl copy handle with simple POST using array as arguments ***' . "\n";
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--TEST--
|
||||
Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
$url = "{$host}/get.php";
|
||||
$ch = curl_init($url);
|
||||
|
||||
@@ -3,11 +3,13 @@ Memory corruption error if fp of just created file is closed before curl_close.
|
||||
--CREDITS--
|
||||
Alexey Shein <confik@gmail.com>
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$ch = curl_init(getenv('PHP_CURL_HTTP_REMOTE_SERVER'));
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$ch = curl_init($host);
|
||||
|
||||
$temp_file = dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp';
|
||||
if (file_exists($temp_file)) {
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
--TEST--
|
||||
CURL file uploading
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -25,7 +18,8 @@ function testcurl($ch, $name, $mime = '', $postname = '')
|
||||
var_dump(curl_exec($ch));
|
||||
}
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
@@ -4,12 +4,7 @@ Curl_multi_getcontent() basic test with different sources (local file/http)
|
||||
Rein Velt (rein@velt.org)
|
||||
#TestFest Utrecht 20090509
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('curl')) print 'skip need ext/curl';
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
//CURL_MULTI_GETCONTENT TEST
|
||||
@@ -19,7 +14,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
$ch2=curl_init();
|
||||
|
||||
//SET URL AND OTHER OPTIONS
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=getpost&get_param=Hello%20World");
|
||||
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
|
||||
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
@@ -36,5 +36,8 @@ unlink($test_file);
|
||||
unlink($log_file);
|
||||
|
||||
?>
|
||||
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
testtest
|
||||
===DONE===
|
||||
@@ -4,7 +4,7 @@ curl_setopt_array() function - tests setting multiple cURL options with curl_set
|
||||
Mattijs Hoitink mattijshoitink@gmail.com
|
||||
#Testfest Utrecht 2009
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) print "skip"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
@@ -15,7 +15,8 @@ Mattijs Hoitink mattijshoitink@gmail.com
|
||||
*/
|
||||
|
||||
// Figure out what handler to use
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
if (!empty($host)) {
|
||||
// Use the set Environment variable
|
||||
$url = "{$host}/get.php?test=get";
|
||||
|
||||
@@ -4,11 +4,12 @@ curl_setopt basic tests with CURLOPT_STDERR.
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo "*** Testing curl_setopt with CURLOPT_STDERR\n";
|
||||
|
||||
@@ -4,11 +4,12 @@ curl_setopt() call with CURLOPT_HTTPHEADER
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo "*** curl_setopt() call with CURLOPT_HTTPHEADER\n";
|
||||
|
||||
@@ -4,11 +4,12 @@ curl_setopt() call with CURLOPT_RETURNTRANSFER
|
||||
Paul Sohier
|
||||
#phptestfest utrecht
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
// start testing
|
||||
echo "*** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 1\n";
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
--TEST--
|
||||
Test curl_version() function : error conditions
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
die('skip - curl extension not available in this build');
|
||||
}
|
||||
if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
|
||||
}
|
||||
?>
|
||||
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
--TEST--
|
||||
Test curl_version() function : usage variations - test values for $ascii argument
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
echo "skip - curl extension not available in this build";
|
||||
}
|
||||
if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
|
||||
}
|
||||
?>
|
||||
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -4,16 +4,9 @@ Test curl option CURLOPT_HEADERFUNCTION
|
||||
Mathieu Kooiman <mathieuk@gmail.com>
|
||||
Dutch UG, TestFest 2009, Utrecht
|
||||
--DESCRIPTION--
|
||||
Hit the host identified by PHP_CURL_HTTP_REMOTE_SERVER and determine that the headers are sent to the callback specified for CURLOPT_HEADERFUNCTION. Different test servers specified for PHP_CURL_HTTP_REMOTE_SERVER might return different sets of headers. Just test for HTTP/1.1 200 OK.
|
||||
Hit the host and determine that the headers are sent to the callback specified for CURLOPT_HEADERFUNCTION. Different test servers might return different sets of headers. Just test for HTTP/1.1 200 OK.
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
echo "skip - curl extension not available in this build";
|
||||
}
|
||||
if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
|
||||
}
|
||||
?>
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -23,7 +16,8 @@ function curl_header_callback($curl_handle, $data)
|
||||
echo $data;
|
||||
}
|
||||
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
include 'server.inc';
|
||||
$host = curl_cli_server_start();
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
define ("PHP_CURL_SERVER_HOSTNAME", "localhost");
|
||||
define ("PHP_CURL_SERVER_PORT", 8964);
|
||||
define ("PHP_CURL_SERVER_ADDRESS", PHP_CURL_SERVER_HOSTNAME.":".PHP_CURL_SERVER_PORT);
|
||||
|
||||
function curl_cli_server_start() {
|
||||
if(getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
return getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
}
|
||||
|
||||
$php_executable = getenv('TEST_PHP_EXECUTABLE');
|
||||
$doc_root = __DIR__;
|
||||
$router = "responder/get.php";
|
||||
|
||||
$descriptorspec = array(
|
||||
0 => STDIN,
|
||||
1 => STDOUT,
|
||||
2 => STDERR,
|
||||
);
|
||||
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
|
||||
$cmd .= " {$router}";
|
||||
$handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true));
|
||||
} else {
|
||||
$cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
|
||||
$cmd .= " {$router}";
|
||||
$cmd .= " 2>/dev/null";
|
||||
|
||||
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
|
||||
}
|
||||
|
||||
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
|
||||
// it might not be listening yet...need to wait until fsockopen() call returns
|
||||
$i = 0;
|
||||
while (($i++ < 30) && !($fp = @fsockopen(PHP_CURL_SERVER_HOSTNAME, PHP_CURL_SERVER_PORT))) {
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
if ($fp) {
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
register_shutdown_function(
|
||||
function($handle) use($router) {
|
||||
proc_terminate($handle);
|
||||
},
|
||||
$handle
|
||||
);
|
||||
// don't bother sleeping, server is already up
|
||||
// server can take a variable amount of time to be up, so just sleeping a guessed amount of time
|
||||
// does not work. this is why tests sometimes pass and sometimes fail. to get a reliable pass
|
||||
// sleeping doesn't work.
|
||||
return PHP_CURL_SERVER_ADDRESS;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if(false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
if (php_sapi_name() != "cli") {
|
||||
die("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
}
|
||||
+108
-101
@@ -1,10 +1,10 @@
|
||||
/* Generated by re2c 0.13.5 on Thu Feb 6 07:35:53 2014 */
|
||||
/* Generated by re2c 0.13.5 on Tue May 13 17:01:57 2014 */
|
||||
#line 1 "ext/date/lib/parse_date.re"
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
| Copyright (c) 1997-2014 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -401,9 +401,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
|
||||
{
|
||||
timelib_sll retval = 0;
|
||||
|
||||
while (!strchr("AaPp", **ptr)) {
|
||||
while (**ptr && !strchr("AaPp", **ptr)) {
|
||||
++*ptr;
|
||||
}
|
||||
if(!**ptr) {
|
||||
return TIMELIB_UNSET;
|
||||
}
|
||||
if (**ptr == 'a' || **ptr == 'A') {
|
||||
if (h == 12) {
|
||||
retval = -12;
|
||||
@@ -837,11 +840,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
|
||||
std:
|
||||
s->tok = cursor;
|
||||
s->len = 0;
|
||||
#line 963 "ext/date/lib/parse_date.re"
|
||||
#line 966 "ext/date/lib/parse_date.re"
|
||||
|
||||
|
||||
|
||||
#line 845 "ext/date/lib/parse_date.c"
|
||||
#line 848 "ext/date/lib/parse_date.c"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
@@ -961,7 +964,7 @@ std:
|
||||
}
|
||||
yy2:
|
||||
YYDEBUG(2, *YYCURSOR);
|
||||
#line 1049 "ext/date/lib/parse_date.re"
|
||||
#line 1052 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("firstdayof | lastdayof");
|
||||
TIMELIB_INIT;
|
||||
@@ -977,7 +980,7 @@ yy2:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_LF_DAY_OF_MONTH;
|
||||
}
|
||||
#line 981 "ext/date/lib/parse_date.c"
|
||||
#line 984 "ext/date/lib/parse_date.c"
|
||||
yy3:
|
||||
YYDEBUG(3, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1000,7 +1003,7 @@ yy3:
|
||||
}
|
||||
yy4:
|
||||
YYDEBUG(4, *YYCURSOR);
|
||||
#line 1643 "ext/date/lib/parse_date.re"
|
||||
#line 1646 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("tzcorrection | tz");
|
||||
@@ -1013,7 +1016,7 @@ yy4:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIMEZONE;
|
||||
}
|
||||
#line 1017 "ext/date/lib/parse_date.c"
|
||||
#line 1020 "ext/date/lib/parse_date.c"
|
||||
yy5:
|
||||
YYDEBUG(5, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1324,12 +1327,12 @@ yy12:
|
||||
if (yych <= '9') goto yy1385;
|
||||
yy13:
|
||||
YYDEBUG(13, *YYCURSOR);
|
||||
#line 1738 "ext/date/lib/parse_date.re"
|
||||
#line 1741 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
add_error(s, "Unexpected character");
|
||||
goto std;
|
||||
}
|
||||
#line 1333 "ext/date/lib/parse_date.c"
|
||||
#line 1336 "ext/date/lib/parse_date.c"
|
||||
yy14:
|
||||
YYDEBUG(14, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2386,11 +2389,11 @@ yy49:
|
||||
if (yych <= '9') goto yy55;
|
||||
yy50:
|
||||
YYDEBUG(50, *YYCURSOR);
|
||||
#line 1727 "ext/date/lib/parse_date.re"
|
||||
#line 1730 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
goto std;
|
||||
}
|
||||
#line 2394 "ext/date/lib/parse_date.c"
|
||||
#line 2397 "ext/date/lib/parse_date.c"
|
||||
yy51:
|
||||
YYDEBUG(51, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2399,12 +2402,12 @@ yy52:
|
||||
YYDEBUG(52, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(53, *YYCURSOR);
|
||||
#line 1732 "ext/date/lib/parse_date.re"
|
||||
#line 1735 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
s->pos = cursor; s->line++;
|
||||
goto std;
|
||||
}
|
||||
#line 2408 "ext/date/lib/parse_date.c"
|
||||
#line 2411 "ext/date/lib/parse_date.c"
|
||||
yy54:
|
||||
YYDEBUG(54, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2791,7 +2794,7 @@ yy72:
|
||||
if (yych == 's') goto yy74;
|
||||
yy73:
|
||||
YYDEBUG(73, *YYCURSOR);
|
||||
#line 1711 "ext/date/lib/parse_date.re"
|
||||
#line 1714 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_ull i;
|
||||
DEBUG_OUTPUT("relative");
|
||||
@@ -2806,7 +2809,7 @@ yy73:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 2810 "ext/date/lib/parse_date.c"
|
||||
#line 2813 "ext/date/lib/parse_date.c"
|
||||
yy74:
|
||||
YYDEBUG(74, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3568,7 +3571,7 @@ yy166:
|
||||
}
|
||||
yy167:
|
||||
YYDEBUG(167, *YYCURSOR);
|
||||
#line 1574 "ext/date/lib/parse_date.re"
|
||||
#line 1577 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
const timelib_relunit* relunit;
|
||||
DEBUG_OUTPUT("daytext");
|
||||
@@ -3585,7 +3588,7 @@ yy167:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEKDAY;
|
||||
}
|
||||
#line 3589 "ext/date/lib/parse_date.c"
|
||||
#line 3592 "ext/date/lib/parse_date.c"
|
||||
yy168:
|
||||
YYDEBUG(168, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -4105,7 +4108,7 @@ yy193:
|
||||
}
|
||||
yy194:
|
||||
YYDEBUG(194, *YYCURSOR);
|
||||
#line 1633 "ext/date/lib/parse_date.re"
|
||||
#line 1636 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("monthtext");
|
||||
TIMELIB_INIT;
|
||||
@@ -4114,7 +4117,7 @@ yy194:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 4118 "ext/date/lib/parse_date.c"
|
||||
#line 4121 "ext/date/lib/parse_date.c"
|
||||
yy195:
|
||||
YYDEBUG(195, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -4165,7 +4168,7 @@ yy198:
|
||||
}
|
||||
yy199:
|
||||
YYDEBUG(199, *YYCURSOR);
|
||||
#line 1379 "ext/date/lib/parse_date.re"
|
||||
#line 1382 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("datetextual | datenoyear");
|
||||
@@ -4178,7 +4181,7 @@ yy199:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 4182 "ext/date/lib/parse_date.c"
|
||||
#line 4185 "ext/date/lib/parse_date.c"
|
||||
yy200:
|
||||
YYDEBUG(200, *YYCURSOR);
|
||||
yyaccept = 6;
|
||||
@@ -4447,7 +4450,7 @@ yy222:
|
||||
}
|
||||
yy223:
|
||||
YYDEBUG(223, *YYCURSOR);
|
||||
#line 1681 "ext/date/lib/parse_date.re"
|
||||
#line 1684 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
|
||||
@@ -4476,7 +4479,7 @@ yy223:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||
}
|
||||
#line 4480 "ext/date/lib/parse_date.c"
|
||||
#line 4483 "ext/date/lib/parse_date.c"
|
||||
yy224:
|
||||
YYDEBUG(224, *YYCURSOR);
|
||||
yyaccept = 7;
|
||||
@@ -5174,7 +5177,7 @@ yy278:
|
||||
YYDEBUG(278, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(279, *YYCURSOR);
|
||||
#line 1657 "ext/date/lib/parse_date.re"
|
||||
#line 1660 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
|
||||
TIMELIB_INIT;
|
||||
@@ -5197,7 +5200,7 @@ yy278:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_SHORTDATE_WITH_TIME;
|
||||
}
|
||||
#line 5201 "ext/date/lib/parse_date.c"
|
||||
#line 5204 "ext/date/lib/parse_date.c"
|
||||
yy280:
|
||||
YYDEBUG(280, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -5375,7 +5378,7 @@ yy294:
|
||||
++YYCURSOR;
|
||||
yy295:
|
||||
YYDEBUG(295, *YYCURSOR);
|
||||
#line 1351 "ext/date/lib/parse_date.re"
|
||||
#line 1354 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("datenoday");
|
||||
@@ -5388,7 +5391,7 @@ yy295:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NO_DAY;
|
||||
}
|
||||
#line 5392 "ext/date/lib/parse_date.c"
|
||||
#line 5395 "ext/date/lib/parse_date.c"
|
||||
yy296:
|
||||
YYDEBUG(296, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -6608,7 +6611,7 @@ yy362:
|
||||
if (yych <= '9') goto yy365;
|
||||
yy364:
|
||||
YYDEBUG(364, *YYCURSOR);
|
||||
#line 1495 "ext/date/lib/parse_date.re"
|
||||
#line 1498 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("pgtextshort");
|
||||
@@ -6621,7 +6624,7 @@ yy364:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_TEXT;
|
||||
}
|
||||
#line 6625 "ext/date/lib/parse_date.c"
|
||||
#line 6628 "ext/date/lib/parse_date.c"
|
||||
yy365:
|
||||
YYDEBUG(365, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -7259,7 +7262,7 @@ yy392:
|
||||
}
|
||||
yy393:
|
||||
YYDEBUG(393, *YYCURSOR);
|
||||
#line 1553 "ext/date/lib/parse_date.re"
|
||||
#line 1556 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("ago");
|
||||
TIMELIB_INIT;
|
||||
@@ -7279,7 +7282,7 @@ yy393:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_AGO;
|
||||
}
|
||||
#line 7283 "ext/date/lib/parse_date.c"
|
||||
#line 7286 "ext/date/lib/parse_date.c"
|
||||
yy394:
|
||||
YYDEBUG(394, *YYCURSOR);
|
||||
yyaccept = 5;
|
||||
@@ -9029,7 +9032,7 @@ yy454:
|
||||
++YYCURSOR;
|
||||
yy455:
|
||||
YYDEBUG(455, *YYCURSOR);
|
||||
#line 1256 "ext/date/lib/parse_date.re"
|
||||
#line 1259 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
|
||||
TIMELIB_INIT;
|
||||
@@ -9040,7 +9043,7 @@ yy455:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 9044 "ext/date/lib/parse_date.c"
|
||||
#line 9047 "ext/date/lib/parse_date.c"
|
||||
yy456:
|
||||
YYDEBUG(456, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -9600,7 +9603,7 @@ yy475:
|
||||
}
|
||||
yy476:
|
||||
YYDEBUG(476, *YYCURSOR);
|
||||
#line 1393 "ext/date/lib/parse_date.re"
|
||||
#line 1396 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenoyearrev");
|
||||
TIMELIB_INIT;
|
||||
@@ -9611,7 +9614,7 @@ yy476:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_TEXT;
|
||||
}
|
||||
#line 9615 "ext/date/lib/parse_date.c"
|
||||
#line 9618 "ext/date/lib/parse_date.c"
|
||||
yy477:
|
||||
YYDEBUG(477, *YYCURSOR);
|
||||
yyaccept = 10;
|
||||
@@ -9752,7 +9755,7 @@ yy488:
|
||||
YYDEBUG(488, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(489, *YYCURSOR);
|
||||
#line 1111 "ext/date/lib/parse_date.re"
|
||||
#line 1114 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
|
||||
TIMELIB_INIT;
|
||||
@@ -9768,7 +9771,7 @@ yy488:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME12;
|
||||
}
|
||||
#line 9772 "ext/date/lib/parse_date.c"
|
||||
#line 9775 "ext/date/lib/parse_date.c"
|
||||
yy490:
|
||||
YYDEBUG(490, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -9781,7 +9784,7 @@ yy490:
|
||||
}
|
||||
yy491:
|
||||
YYDEBUG(491, *YYCURSOR);
|
||||
#line 1148 "ext/date/lib/parse_date.re"
|
||||
#line 1151 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
|
||||
@@ -9806,7 +9809,7 @@ yy491:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME24_WITH_ZONE;
|
||||
}
|
||||
#line 9810 "ext/date/lib/parse_date.c"
|
||||
#line 9813 "ext/date/lib/parse_date.c"
|
||||
yy492:
|
||||
YYDEBUG(492, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -10116,7 +10119,7 @@ yy523:
|
||||
YYDEBUG(523, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(524, *YYCURSOR);
|
||||
#line 1128 "ext/date/lib/parse_date.re"
|
||||
#line 1131 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("mssqltime");
|
||||
TIMELIB_INIT;
|
||||
@@ -10135,7 +10138,7 @@ yy523:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_TIME24_WITH_ZONE;
|
||||
}
|
||||
#line 10139 "ext/date/lib/parse_date.c"
|
||||
#line 10142 "ext/date/lib/parse_date.c"
|
||||
yy525:
|
||||
YYDEBUG(525, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -10241,7 +10244,7 @@ yy534:
|
||||
if (yych <= '9') goto yy541;
|
||||
yy535:
|
||||
YYDEBUG(535, *YYCURSOR);
|
||||
#line 1310 "ext/date/lib/parse_date.re"
|
||||
#line 1313 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("datefull");
|
||||
@@ -10255,7 +10258,7 @@ yy535:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL;
|
||||
}
|
||||
#line 10259 "ext/date/lib/parse_date.c"
|
||||
#line 10262 "ext/date/lib/parse_date.c"
|
||||
yy536:
|
||||
YYDEBUG(536, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -10992,7 +10995,7 @@ yy605:
|
||||
YYDEBUG(606, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(607, *YYCURSOR);
|
||||
#line 1325 "ext/date/lib/parse_date.re"
|
||||
#line 1328 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("pointed date YYYY");
|
||||
TIMELIB_INIT;
|
||||
@@ -11003,7 +11006,7 @@ yy605:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL_POINTED;
|
||||
}
|
||||
#line 11007 "ext/date/lib/parse_date.c"
|
||||
#line 11010 "ext/date/lib/parse_date.c"
|
||||
yy608:
|
||||
YYDEBUG(608, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -11039,7 +11042,7 @@ yy611:
|
||||
if (yych <= '9') goto yy605;
|
||||
yy612:
|
||||
YYDEBUG(612, *YYCURSOR);
|
||||
#line 1337 "ext/date/lib/parse_date.re"
|
||||
#line 1340 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("pointed date YY");
|
||||
@@ -11052,7 +11055,7 @@ yy612:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_FULL_POINTED;
|
||||
}
|
||||
#line 11056 "ext/date/lib/parse_date.c"
|
||||
#line 11059 "ext/date/lib/parse_date.c"
|
||||
yy613:
|
||||
YYDEBUG(613, *YYCURSOR);
|
||||
yyaccept = 11;
|
||||
@@ -11693,7 +11696,7 @@ yy656:
|
||||
}
|
||||
yy657:
|
||||
YYDEBUG(657, *YYCURSOR);
|
||||
#line 1296 "ext/date/lib/parse_date.re"
|
||||
#line 1299 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("gnudateshort");
|
||||
@@ -11706,7 +11709,7 @@ yy657:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 11710 "ext/date/lib/parse_date.c"
|
||||
#line 11713 "ext/date/lib/parse_date.c"
|
||||
yy658:
|
||||
YYDEBUG(658, *YYCURSOR);
|
||||
yyaccept = 13;
|
||||
@@ -11812,7 +11815,7 @@ yy666:
|
||||
}
|
||||
yy667:
|
||||
YYDEBUG(667, *YYCURSOR);
|
||||
#line 1240 "ext/date/lib/parse_date.re"
|
||||
#line 1243 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("americanshort | american");
|
||||
@@ -11827,7 +11830,7 @@ yy667:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_AMERICAN;
|
||||
}
|
||||
#line 11831 "ext/date/lib/parse_date.c"
|
||||
#line 11834 "ext/date/lib/parse_date.c"
|
||||
yy668:
|
||||
YYDEBUG(668, *YYCURSOR);
|
||||
yyaccept = 14;
|
||||
@@ -12060,7 +12063,7 @@ yy700:
|
||||
if (yych <= ':') goto yy704;
|
||||
yy701:
|
||||
YYDEBUG(701, *YYCURSOR);
|
||||
#line 1523 "ext/date/lib/parse_date.re"
|
||||
#line 1526 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("clf");
|
||||
@@ -12080,7 +12083,7 @@ yy701:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_CLF;
|
||||
}
|
||||
#line 12084 "ext/date/lib/parse_date.c"
|
||||
#line 12087 "ext/date/lib/parse_date.c"
|
||||
yy702:
|
||||
YYDEBUG(702, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12632,7 +12635,7 @@ yy763:
|
||||
}
|
||||
yy764:
|
||||
YYDEBUG(764, *YYCURSOR);
|
||||
#line 1268 "ext/date/lib/parse_date.re"
|
||||
#line 1271 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("iso8601date2");
|
||||
@@ -12645,7 +12648,7 @@ yy764:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 12649 "ext/date/lib/parse_date.c"
|
||||
#line 12652 "ext/date/lib/parse_date.c"
|
||||
yy765:
|
||||
YYDEBUG(765, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12684,7 +12687,7 @@ yy771:
|
||||
YYDEBUG(771, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(772, *YYCURSOR);
|
||||
#line 1509 "ext/date/lib/parse_date.re"
|
||||
#line 1512 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("pgtextreverse");
|
||||
@@ -12697,7 +12700,7 @@ yy771:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_TEXT;
|
||||
}
|
||||
#line 12701 "ext/date/lib/parse_date.c"
|
||||
#line 12704 "ext/date/lib/parse_date.c"
|
||||
yy773:
|
||||
YYDEBUG(773, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12835,7 +12838,7 @@ yy783:
|
||||
}
|
||||
yy784:
|
||||
YYDEBUG(784, *YYCURSOR);
|
||||
#line 1544 "ext/date/lib/parse_date.re"
|
||||
#line 1547 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("year4");
|
||||
TIMELIB_INIT;
|
||||
@@ -12843,7 +12846,7 @@ yy784:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_CLF;
|
||||
}
|
||||
#line 12847 "ext/date/lib/parse_date.c"
|
||||
#line 12850 "ext/date/lib/parse_date.c"
|
||||
yy785:
|
||||
YYDEBUG(785, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -12994,7 +12997,7 @@ yy793:
|
||||
}
|
||||
yy794:
|
||||
YYDEBUG(794, *YYCURSOR);
|
||||
#line 1365 "ext/date/lib/parse_date.re"
|
||||
#line 1368 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("datenodayrev");
|
||||
@@ -13007,7 +13010,7 @@ yy794:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NO_DAY;
|
||||
}
|
||||
#line 13011 "ext/date/lib/parse_date.c"
|
||||
#line 13014 "ext/date/lib/parse_date.c"
|
||||
yy795:
|
||||
YYDEBUG(795, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13222,7 +13225,7 @@ yy814:
|
||||
if (yych <= '7') goto yy817;
|
||||
yy815:
|
||||
YYDEBUG(815, *YYCURSOR);
|
||||
#line 1476 "ext/date/lib/parse_date.re"
|
||||
#line 1479 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll w, d;
|
||||
DEBUG_OUTPUT("isoweek");
|
||||
@@ -13240,7 +13243,7 @@ yy815:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_WEEK;
|
||||
}
|
||||
#line 13244 "ext/date/lib/parse_date.c"
|
||||
#line 13247 "ext/date/lib/parse_date.c"
|
||||
yy816:
|
||||
YYDEBUG(816, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13250,7 +13253,7 @@ yy817:
|
||||
YYDEBUG(817, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(818, *YYCURSOR);
|
||||
#line 1457 "ext/date/lib/parse_date.re"
|
||||
#line 1460 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll w, d;
|
||||
DEBUG_OUTPUT("isoweekday");
|
||||
@@ -13268,7 +13271,7 @@ yy817:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_WEEK;
|
||||
}
|
||||
#line 13272 "ext/date/lib/parse_date.c"
|
||||
#line 13275 "ext/date/lib/parse_date.c"
|
||||
yy819:
|
||||
YYDEBUG(819, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13332,7 +13335,7 @@ yy821:
|
||||
}
|
||||
yy822:
|
||||
YYDEBUG(822, *YYCURSOR);
|
||||
#line 1443 "ext/date/lib/parse_date.re"
|
||||
#line 1446 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("pgydotd");
|
||||
@@ -13345,7 +13348,7 @@ yy822:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PG_YEARDAY;
|
||||
}
|
||||
#line 13349 "ext/date/lib/parse_date.c"
|
||||
#line 13352 "ext/date/lib/parse_date.c"
|
||||
yy823:
|
||||
YYDEBUG(823, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13448,7 +13451,7 @@ yy842:
|
||||
++YYCURSOR;
|
||||
yy843:
|
||||
YYDEBUG(843, *YYCURSOR);
|
||||
#line 1417 "ext/date/lib/parse_date.re"
|
||||
#line 1420 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
|
||||
@@ -13473,7 +13476,7 @@ yy843:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_XMLRPC_SOAP;
|
||||
}
|
||||
#line 13477 "ext/date/lib/parse_date.c"
|
||||
#line 13480 "ext/date/lib/parse_date.c"
|
||||
yy844:
|
||||
YYDEBUG(844, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -13735,7 +13738,7 @@ yy848:
|
||||
}
|
||||
yy849:
|
||||
YYDEBUG(849, *YYCURSOR);
|
||||
#line 1405 "ext/date/lib/parse_date.re"
|
||||
#line 1408 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("datenocolon");
|
||||
TIMELIB_INIT;
|
||||
@@ -13746,7 +13749,7 @@ yy849:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_DATE_NOCOLON;
|
||||
}
|
||||
#line 13750 "ext/date/lib/parse_date.c"
|
||||
#line 13753 "ext/date/lib/parse_date.c"
|
||||
yy850:
|
||||
YYDEBUG(850, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -14666,7 +14669,7 @@ yy973:
|
||||
if (yych <= '9') goto yy996;
|
||||
yy974:
|
||||
YYDEBUG(974, *YYCURSOR);
|
||||
#line 1282 "ext/date/lib/parse_date.re"
|
||||
#line 1285 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int length = 0;
|
||||
DEBUG_OUTPUT("gnudateshorter");
|
||||
@@ -14679,7 +14682,7 @@ yy974:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 14683 "ext/date/lib/parse_date.c"
|
||||
#line 14686 "ext/date/lib/parse_date.c"
|
||||
yy975:
|
||||
YYDEBUG(975, *YYCURSOR);
|
||||
yyaccept = 22;
|
||||
@@ -15688,7 +15691,7 @@ yy1066:
|
||||
}
|
||||
yy1068:
|
||||
YYDEBUG(1068, *YYCURSOR);
|
||||
#line 1174 "ext/date/lib/parse_date.re"
|
||||
#line 1177 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("gnunocolon");
|
||||
TIMELIB_INIT;
|
||||
@@ -15710,7 +15713,7 @@ yy1068:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_GNU_NOCOLON;
|
||||
}
|
||||
#line 15714 "ext/date/lib/parse_date.c"
|
||||
#line 15717 "ext/date/lib/parse_date.c"
|
||||
yy1069:
|
||||
YYDEBUG(1069, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -15802,7 +15805,7 @@ yy1075:
|
||||
}
|
||||
yy1076:
|
||||
YYDEBUG(1076, *YYCURSOR);
|
||||
#line 1220 "ext/date/lib/parse_date.re"
|
||||
#line 1223 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
int tz_not_found;
|
||||
DEBUG_OUTPUT("iso8601nocolon");
|
||||
@@ -15821,7 +15824,7 @@ yy1076:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_NOCOLON;
|
||||
}
|
||||
#line 15825 "ext/date/lib/parse_date.c"
|
||||
#line 15828 "ext/date/lib/parse_date.c"
|
||||
yy1077:
|
||||
YYDEBUG(1077, *YYCURSOR);
|
||||
yyaccept = 25;
|
||||
@@ -16719,7 +16722,7 @@ yy1117:
|
||||
}
|
||||
yy1118:
|
||||
YYDEBUG(1118, *YYCURSOR);
|
||||
#line 1616 "ext/date/lib/parse_date.re"
|
||||
#line 1619 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16735,7 +16738,7 @@ yy1118:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 16739 "ext/date/lib/parse_date.c"
|
||||
#line 16742 "ext/date/lib/parse_date.c"
|
||||
yy1119:
|
||||
YYDEBUG(1119, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -16786,7 +16789,7 @@ yy1126:
|
||||
YYDEBUG(1126, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(1127, *YYCURSOR);
|
||||
#line 1089 "ext/date/lib/parse_date.re"
|
||||
#line 1092 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16807,7 +16810,7 @@ yy1126:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_WEEK_DAY_OF_MONTH;
|
||||
}
|
||||
#line 16811 "ext/date/lib/parse_date.c"
|
||||
#line 16814 "ext/date/lib/parse_date.c"
|
||||
yy1128:
|
||||
YYDEBUG(1128, *YYCURSOR);
|
||||
yyaccept = 26;
|
||||
@@ -16915,7 +16918,7 @@ yy1141:
|
||||
}
|
||||
yy1142:
|
||||
YYDEBUG(1142, *YYCURSOR);
|
||||
#line 1592 "ext/date/lib/parse_date.re"
|
||||
#line 1595 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_sll i;
|
||||
int behavior = 0;
|
||||
@@ -16938,7 +16941,7 @@ yy1142:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 16942 "ext/date/lib/parse_date.c"
|
||||
#line 16945 "ext/date/lib/parse_date.c"
|
||||
yy1143:
|
||||
YYDEBUG(1143, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -19615,7 +19618,7 @@ yy1294:
|
||||
goto yy1298;
|
||||
yy1295:
|
||||
YYDEBUG(1295, *YYCURSOR);
|
||||
#line 1066 "ext/date/lib/parse_date.re"
|
||||
#line 1069 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("backof | frontof");
|
||||
TIMELIB_INIT;
|
||||
@@ -19637,7 +19640,7 @@ yy1295:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_LF_DAY_OF_MONTH;
|
||||
}
|
||||
#line 19641 "ext/date/lib/parse_date.c"
|
||||
#line 19644 "ext/date/lib/parse_date.c"
|
||||
yy1296:
|
||||
YYDEBUG(1296, *YYCURSOR);
|
||||
yyaccept = 28;
|
||||
@@ -21328,7 +21331,7 @@ yy1385:
|
||||
if (yych <= '9') goto yy1385;
|
||||
yy1387:
|
||||
YYDEBUG(1387, *YYCURSOR);
|
||||
#line 1023 "ext/date/lib/parse_date.re"
|
||||
#line 1026 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
timelib_ull i;
|
||||
|
||||
@@ -21353,7 +21356,7 @@ yy1387:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21357 "ext/date/lib/parse_date.c"
|
||||
#line 21360 "ext/date/lib/parse_date.c"
|
||||
yy1388:
|
||||
YYDEBUG(1388, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -21789,7 +21792,7 @@ yy1416:
|
||||
++YYCURSOR;
|
||||
yy1417:
|
||||
YYDEBUG(1417, *YYCURSOR);
|
||||
#line 1011 "ext/date/lib/parse_date.re"
|
||||
#line 1014 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("tomorrow");
|
||||
TIMELIB_INIT;
|
||||
@@ -21800,7 +21803,7 @@ yy1417:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21804 "ext/date/lib/parse_date.c"
|
||||
#line 21807 "ext/date/lib/parse_date.c"
|
||||
yy1418:
|
||||
YYDEBUG(1418, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -21835,7 +21838,7 @@ yy1419:
|
||||
}
|
||||
yy1420:
|
||||
YYDEBUG(1420, *YYCURSOR);
|
||||
#line 1001 "ext/date/lib/parse_date.re"
|
||||
#line 1004 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("midnight | today");
|
||||
TIMELIB_INIT;
|
||||
@@ -21844,7 +21847,7 @@ yy1420:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 21848 "ext/date/lib/parse_date.c"
|
||||
#line 21851 "ext/date/lib/parse_date.c"
|
||||
yy1421:
|
||||
YYDEBUG(1421, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -23856,7 +23859,7 @@ yy1499:
|
||||
}
|
||||
yy1500:
|
||||
YYDEBUG(1500, *YYCURSOR);
|
||||
#line 980 "ext/date/lib/parse_date.re"
|
||||
#line 983 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("now");
|
||||
TIMELIB_INIT;
|
||||
@@ -23864,7 +23867,7 @@ yy1500:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 23868 "ext/date/lib/parse_date.c"
|
||||
#line 23871 "ext/date/lib/parse_date.c"
|
||||
yy1501:
|
||||
YYDEBUG(1501, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -24003,7 +24006,7 @@ yy1507:
|
||||
}
|
||||
yy1508:
|
||||
YYDEBUG(1508, *YYCURSOR);
|
||||
#line 989 "ext/date/lib/parse_date.re"
|
||||
#line 992 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("noon");
|
||||
TIMELIB_INIT;
|
||||
@@ -24014,7 +24017,7 @@ yy1508:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 24018 "ext/date/lib/parse_date.c"
|
||||
#line 24021 "ext/date/lib/parse_date.c"
|
||||
yy1509:
|
||||
YYDEBUG(1509, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -24547,7 +24550,7 @@ yy1530:
|
||||
++YYCURSOR;
|
||||
yy1531:
|
||||
YYDEBUG(1531, *YYCURSOR);
|
||||
#line 968 "ext/date/lib/parse_date.re"
|
||||
#line 971 "ext/date/lib/parse_date.re"
|
||||
{
|
||||
DEBUG_OUTPUT("yesterday");
|
||||
TIMELIB_INIT;
|
||||
@@ -24558,7 +24561,7 @@ yy1531:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_RELATIVE;
|
||||
}
|
||||
#line 24562 "ext/date/lib/parse_date.c"
|
||||
#line 24565 "ext/date/lib/parse_date.c"
|
||||
yy1532:
|
||||
YYDEBUG(1532, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -24731,7 +24734,7 @@ yy1537:
|
||||
goto yy1531;
|
||||
}
|
||||
}
|
||||
#line 1742 "ext/date/lib/parse_date.re"
|
||||
#line 1745 "ext/date/lib/parse_date.re"
|
||||
|
||||
}
|
||||
|
||||
@@ -25090,7 +25093,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
break;
|
||||
|
||||
case '\\': /* escaped char */
|
||||
++fptr;
|
||||
if(!fptr[1]) {
|
||||
add_pbf_error(s, "Escaped character expected", string, begin);
|
||||
break;
|
||||
}
|
||||
fptr++;
|
||||
if (*ptr == *fptr) {
|
||||
++ptr;
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
| Copyright (c) 1997-2014 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -399,9 +399,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
|
||||
{
|
||||
timelib_sll retval = 0;
|
||||
|
||||
while (!strchr("AaPp", **ptr)) {
|
||||
while (**ptr && !strchr("AaPp", **ptr)) {
|
||||
++*ptr;
|
||||
}
|
||||
if(!**ptr) {
|
||||
return TIMELIB_UNSET;
|
||||
}
|
||||
if (**ptr == 'a' || **ptr == 'A') {
|
||||
if (h == 12) {
|
||||
retval = -12;
|
||||
@@ -2097,7 +2100,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
|
||||
break;
|
||||
|
||||
case '\\': /* escaped char */
|
||||
++fptr;
|
||||
if(!fptr[1]) {
|
||||
add_pbf_error(s, "Escaped character expected", string, begin);
|
||||
break;
|
||||
}
|
||||
fptr++;
|
||||
if (*ptr == *fptr) {
|
||||
++ptr;
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
| Copyright (c) 1997-2014 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+671
-635
File diff suppressed because it is too large.
Load diff
+3
-1
@@ -2213,7 +2213,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
|
||||
|
||||
/* first we add the date and time in ISO format */
|
||||
MAKE_STD_ZVAL(zv);
|
||||
ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0);
|
||||
ZVAL_STRING(zv, date_format("Y-m-d H:i:s.u", 14, dateobj->time, 1), 0);
|
||||
zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL);
|
||||
|
||||
/* then we add the timezone name (or similar) */
|
||||
@@ -2577,6 +2577,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
|
||||
err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message);
|
||||
}
|
||||
if (err && err->error_count) {
|
||||
timelib_time_dtor(dateobj->time);
|
||||
dateobj->time = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(19) "2006-01-23 00:00:00"
|
||||
string(26) "2006-01-23 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -34,7 +34,7 @@ bool(false)
|
||||
string(19) "2006/01/23 00:00:00"
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(19) "2006-01-30 00:00:00"
|
||||
string(26) "2006-01-30 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -43,7 +43,7 @@ object(DateTime)#1 (3) {
|
||||
string(19) "2006/01/30 00:00:00"
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(19) "2007-12-10 00:00:00"
|
||||
string(26) "2007-12-10 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -21,7 +21,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(19) "2006-12-12 00:00:00"
|
||||
string(26) "2006-12-12 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -38,7 +38,7 @@ bool(false)
|
||||
string(19) "2006.12.12 00:00:00"
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(19) "2006-02-15 00:00:00"
|
||||
string(26) "2006-02-15 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -47,7 +47,7 @@ object(DateTime)#1 (3) {
|
||||
string(19) "2006.02.15 00:00:00"
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(19) "2008-01-29 00:00:00"
|
||||
string(26) "2008-01-29 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -20,7 +20,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(19) "2006-12-12 00:00:00"
|
||||
string(26) "2006-12-12 00:00:00.000000"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
Loaded 100 of 306 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user