mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-13 04:00:50 +00:00
Compare commits
443
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
058de87e99 | ||
|
|
9d35dd56e7 | ||
|
|
2eef522b1c | ||
|
|
edb6adef36 | ||
|
|
5c0455bf2c | ||
|
|
5c81d85bd1 | ||
|
|
fee21a45df | ||
|
|
c8eccf8451 | ||
|
|
30f121f9bc | ||
|
|
d1fc9b425f | ||
|
|
c8732b1c5f | ||
|
|
51658bac35 | ||
|
|
d8881f4eb4 | ||
|
|
f48abfa902 | ||
|
|
dc3b9fe619 | ||
|
|
ac1fd769ad | ||
|
|
843e492c68 | ||
|
|
0f55138533 | ||
|
|
ec3d864784 | ||
|
|
d34c8fa802 | ||
|
|
6b9ccda936 | ||
|
|
b6e34eaf04 | ||
|
|
c935b832dc | ||
|
|
1195de87ff | ||
|
|
ee50fcfa27 | ||
|
|
24e595bf26 | ||
|
|
d0cda9d0bd | ||
|
|
e995b7e475 | ||
|
|
1322c2c86a | ||
|
|
6d1dd8b0af | ||
|
|
2019b25daa | ||
|
|
7b248a1b32 | ||
|
|
4d69587035 | ||
|
|
c8dea7ae1e | ||
|
|
03aef5f65c | ||
|
|
fa78afa112 | ||
|
|
4372293192 | ||
|
|
abefb6dfe7 | ||
|
|
9fd33c1f20 | ||
|
|
b5bc88c64e | ||
|
|
db9778dfb2 | ||
|
|
d11fceab15 | ||
|
|
72c008f945 | ||
|
|
1c68d63f35 | ||
|
|
1981c48e60 | ||
|
|
29e673f8ed | ||
|
|
af71942da2 | ||
|
|
6d0391b1a4 | ||
|
|
2dd77456fe | ||
|
|
a680d701ce | ||
|
|
0217a81722 | ||
|
|
3752d18ffe | ||
|
|
550595c085 | ||
|
|
d526ddec85 | ||
|
|
634f79d8d8 | ||
|
|
e8c200515a | ||
|
|
b05ff14a9a | ||
|
|
db63367871 | ||
|
|
628c257f71 | ||
|
|
73d6456d7d | ||
|
|
96323d1bd7 | ||
|
|
da2f581833 | ||
|
|
b71023e297 | ||
|
|
418f97443a | ||
|
|
0c0b955d5f | ||
|
|
9a01fe712a | ||
|
|
eedc060c92 | ||
|
|
5c59dd0047 | ||
|
|
9641586efa | ||
|
|
e3e3d37fa9 | ||
|
|
7670590efd | ||
|
|
351f98f5f3 | ||
|
|
7910c1dee9 | ||
|
|
fba792945e | ||
|
|
3d93856c4a | ||
|
|
c24b3eff11 | ||
|
|
d7a10f0e32 | ||
|
|
5f1d553e7e | ||
|
|
83d8ebc991 | ||
|
|
253d49369d | ||
|
|
2874fa8fb0 | ||
|
|
7452fd0263 | ||
|
|
99b1a62d55 | ||
|
|
fcad6a97b8 | ||
|
|
7674b5e574 | ||
|
|
7f01872a24 | ||
|
|
42e15813e2 | ||
|
|
35deb4c88b | ||
|
|
ac6eefcf3d | ||
|
|
3719aaebbf | ||
|
|
3d1cb7e32c | ||
|
|
05c65de082 | ||
|
|
b09497c0e2 | ||
|
|
0cb5a2cb49 | ||
|
|
5cf215536b | ||
|
|
ea21b60dda | ||
|
|
b5c9cd4df6 | ||
|
|
194547f591 | ||
|
|
7015d22116 | ||
|
|
3e11b7fc21 | ||
|
|
afd59b0c80 | ||
|
|
58aa726548 | ||
|
|
87a91aef83 | ||
|
|
9aa6898b9b | ||
|
|
88c7556d99 | ||
|
|
d103802003 | ||
|
|
75cb69740e | ||
|
|
04a6bbae6c | ||
|
|
a77eddff96 | ||
|
|
cab41ecb93 | ||
|
|
b5d7663444 | ||
|
|
3549d9184a | ||
|
|
d33194d2aa | ||
|
|
9ca0cd0a1a | ||
|
|
5f9ae45e22 | ||
|
|
c40c0b8111 | ||
|
|
822c13b9ef | ||
|
|
6b2813c3a7 | ||
|
|
b394343a31 | ||
|
|
4b746fce1c | ||
|
|
6602cc0385 | ||
|
|
3fd08a1595 | ||
|
|
afa39038c2 | ||
|
|
44eec946e8 | ||
|
|
a1573d5620 | ||
|
|
0413feb29c | ||
|
|
9369843ee2 | ||
|
|
f18cf46d07 | ||
|
|
0f88a49fd5 | ||
|
|
b2919853f8 | ||
|
|
d724d8c107 | ||
|
|
dea41f3c3a | ||
|
|
0b69ce72b8 | ||
|
|
42549b7844 | ||
|
|
e866e05b0d | ||
|
|
cd9d90f4d4 | ||
|
|
c2e3541cc1 | ||
|
|
b689857d53 | ||
|
|
296d0826da | ||
|
|
24da62d342 | ||
|
|
afad9006c7 | ||
|
|
e20a6b0213 | ||
|
|
db78eff4c9 | ||
|
|
a86df6bcb0 | ||
|
|
965570541b | ||
|
|
6ec494016b | ||
|
|
1f977d2377 | ||
|
|
2e77f5eed3 | ||
|
|
020d3decb3 | ||
|
|
4e9c3e9396 | ||
|
|
bcf50b7261 | ||
|
|
3239f6d679 | ||
|
|
ae364546d6 | ||
|
|
0966f9de41 | ||
|
|
a9ff4d1f5a | ||
|
|
499f5480f1 | ||
|
|
52e854f0ab | ||
|
|
be9edd83c2 | ||
|
|
3641ba4332 | ||
|
|
55db2c31cd | ||
|
|
c449057808 | ||
|
|
b7e96f8e0e | ||
|
|
1b8a71e740 | ||
|
|
441487cd05 | ||
|
|
4bf1a11c07 | ||
|
|
079bc324cd | ||
|
|
158b06cffb | ||
|
|
61538ebadc | ||
|
|
11d3a7869c | ||
|
|
95ef8e96d2 | ||
|
|
3cad07b84f | ||
|
|
97ed208cfd | ||
|
|
71b12940d0 | ||
|
|
5ef63b6f0e | ||
|
|
ba59b6f11b | ||
|
|
de0b816b49 | ||
|
|
acf09c416b | ||
|
|
b28912b0f7 | ||
|
|
a7594cb74f | ||
|
|
4494ad6911 | ||
|
|
065551bc9c | ||
|
|
264271f69e | ||
|
|
e7f4e67155 | ||
|
|
d53d793673 | ||
|
|
5b02d10584 | ||
|
|
7121b8d0a2 | ||
|
|
547f9fd389 | ||
|
|
60a6feed07 | ||
|
|
8af70958fc | ||
|
|
9a72a7c58f | ||
|
|
5d2c303438 | ||
|
|
4dc8f4f9d1 | ||
|
|
7829f9b1d2 | ||
|
|
44209573e3 | ||
|
|
01735f4d9f | ||
|
|
336cfd9980 | ||
|
|
3df753c6ca | ||
|
|
584db6f38f | ||
|
|
bdd56f3107 | ||
|
|
3bc1226804 | ||
|
|
0f3e01f5cc | ||
|
|
49501f8f41 | ||
|
|
3af6201224 | ||
|
|
6275825c68 | ||
|
|
4f8e703854 | ||
|
|
d8c80af71e | ||
|
|
e112d71435 | ||
|
|
2def85688d | ||
|
|
259477826c | ||
|
|
1f3b87dc11 | ||
|
|
ab07265573 | ||
|
|
bd0b0cc8c9 | ||
|
|
71fd58652f | ||
|
|
73d84d4bbd | ||
|
|
4d936c1254 | ||
|
|
f555224743 | ||
|
|
3069ad8dd1 | ||
|
|
207105b1a3 | ||
|
|
f64be0b013 | ||
|
|
de5a5f6fdc | ||
|
|
472b25921e | ||
|
|
4fb7665c09 | ||
|
|
1a23ebc1ff | ||
|
|
e88ab74886 | ||
|
|
b59718bdc4 | ||
|
|
46ecda76ba | ||
|
|
307acb6618 | ||
|
|
b06f8cb58b | ||
|
|
42608a3401 | ||
|
|
afb20f4895 | ||
|
|
315d3910fa | ||
|
|
075986f214 | ||
|
|
86aa1ca990 | ||
|
|
618dcd6520 | ||
|
|
9ebf813ea4 | ||
|
|
4c9fe5a490 | ||
|
|
da966a93ac | ||
|
|
d058e30917 | ||
|
|
aee20e637a | ||
|
|
159e5c1048 | ||
|
|
21c6ba3412 | ||
|
|
9689796c10 | ||
|
|
54e2224df7 | ||
|
|
3e5b8c1e89 | ||
|
|
9ba2cfd33e | ||
|
|
4988e83fe9 | ||
|
|
c2b8066efb | ||
|
|
9871555090 | ||
|
|
9ca1b2a775 | ||
|
|
63607375f5 | ||
|
|
2cc1cbf2f4 | ||
|
|
15abb2b56e | ||
|
|
e78712791d | ||
|
|
1fdc518971 | ||
|
|
b112d09013 | ||
|
|
5f030924c1 | ||
|
|
666cb6c802 | ||
|
|
9c6262f39b | ||
|
|
b2934d2612 | ||
|
|
f0d40286e7 | ||
|
|
cd06b5af09 | ||
|
|
0c0cbb43da | ||
|
|
64e6ddc7f7 | ||
|
|
d9d152b895 | ||
|
|
a8e25fdbf8 | ||
|
|
eab66f9068 | ||
|
|
2d6d1ec55b | ||
|
|
2d96fdd54f | ||
|
|
82e4ad3983 | ||
|
|
74a696d53b | ||
|
|
f213ee5952 | ||
|
|
4d6f808c16 | ||
|
|
c48c638aeb | ||
|
|
e3d25e78eb | ||
|
|
55e7459cea | ||
|
|
b01336814d | ||
|
|
b62fb3aa0c | ||
|
|
34e5d3a87d | ||
|
|
0ddda0dcb7 | ||
|
|
9fcfe52d03 | ||
|
|
efb1be547c | ||
|
|
84a18c4782 | ||
|
|
e36c04ef48 | ||
|
|
80f4297c25 | ||
|
|
c7aa8ba0ee | ||
|
|
4cde48bb73 | ||
|
|
3f9e8e6686 | ||
|
|
3306b3aa60 | ||
|
|
eaf5c7cdd4 | ||
|
|
bd00fe81cc | ||
|
|
bb9ea4e88b | ||
|
|
6b1fbafdf0 | ||
|
|
747f5b23ae | ||
|
|
46a6ae0d45 | ||
|
|
de65a2243f | ||
|
|
3df47c12f7 | ||
|
|
238f837cbc | ||
|
|
3fd7d819b8 | ||
|
|
78ad5e8864 | ||
|
|
69b48f83df | ||
|
|
dbc2ffba82 | ||
|
|
bedd881da6 | ||
|
|
cdf9178c43 | ||
|
|
b44484b912 | ||
|
|
924ff6164e | ||
|
|
2dc81d4a09 | ||
|
|
a769d873f8 | ||
|
|
e2b61eccb9 | ||
|
|
6918a68d9d | ||
|
|
5816ce330c | ||
|
|
23c124ec75 | ||
|
|
642fb44d69 | ||
|
|
c4e11c8ef3 | ||
|
|
f116a88592 | ||
|
|
418da85f15 | ||
|
|
a4e3589966 | ||
|
|
775b4b54d8 | ||
|
|
1229b0f8cb | ||
|
|
c562d44321 | ||
|
|
c068818ff3 | ||
|
|
e0c0007bd2 | ||
|
|
ad12da4908 | ||
|
|
134e713be2 | ||
|
|
bad5d0d6c5 | ||
|
|
4cb1151fff | ||
|
|
e405ff59f9 | ||
|
|
69ec51eb02 | ||
|
|
a8f98fc7f7 | ||
|
|
08177312fb | ||
|
|
256ec5bebb | ||
|
|
3a7b0027f3 | ||
|
|
4b3ed311aa | ||
|
|
9b3c26d4f4 | ||
|
|
e2b240c164 | ||
|
|
84926a0d71 | ||
|
|
95d2908814 | ||
|
|
fa33b065ac | ||
|
|
ce06677069 | ||
|
|
7c21535fb3 | ||
|
|
ecad9a470f | ||
|
|
8ef5a50e2d | ||
|
|
f67a3cc9bd | ||
|
|
a9e8239f45 | ||
|
|
c9fd093127 | ||
|
|
2b36f3d71f | ||
|
|
2cca43b3ab | ||
|
|
4252f14299 | ||
|
|
e5beb4e828 | ||
|
|
8e7c99acf4 | ||
|
|
afc22828ea | ||
|
|
4e9158da76 | ||
|
|
51cdd3dc50 | ||
|
|
6c32d271d2 | ||
|
|
f4323248ec | ||
|
|
657609ebae | ||
|
|
0da10134f2 | ||
|
|
735468a0b8 | ||
|
|
649027b963 | ||
|
|
65d5e025a7 | ||
|
|
4ef9f536ba | ||
|
|
e0282c3b58 | ||
|
|
4d08b9dac0 | ||
|
|
2e82ed9b73 | ||
|
|
0db20a7cb1 | ||
|
|
6cd140fdf8 | ||
|
|
0b5683e480 | ||
|
|
5d15fdc4a4 | ||
|
|
3b60af90fd | ||
|
|
c1504b81d3 | ||
|
|
91aad4bc81 | ||
|
|
2f606dc5e8 | ||
|
|
8b04e89ef0 | ||
|
|
04cc2f6473 | ||
|
|
82acb58d8a | ||
|
|
3da01a9652 | ||
|
|
3bcab31749 | ||
|
|
be531ce9f0 | ||
|
|
b47cff48de | ||
|
|
7360e6a36f | ||
|
|
a797421e98 | ||
|
|
fd08eaa8bc | ||
|
|
de32c9efc8 | ||
|
|
2689917b17 | ||
|
|
ccd0ff3ac4 | ||
|
|
5cf54f6073 | ||
|
|
7938b9ccac | ||
|
|
e89476a870 | ||
|
|
62700f76cb | ||
|
|
02cc492015 | ||
|
|
b5338c0b7d | ||
|
|
b38de96733 | ||
|
|
0fdceb6cd5 | ||
|
|
0d3e6f6add | ||
|
|
5c96a255ea | ||
|
|
5ca02ca494 | ||
|
|
18eb78854c | ||
|
|
700803b70c | ||
|
|
739ecf5430 | ||
|
|
1af5ca0746 | ||
|
|
2928feca46 | ||
|
|
fb140d582c | ||
|
|
af07b76ccf | ||
|
|
390f64701d | ||
|
|
7991a88675 | ||
|
|
489f3a3234 | ||
|
|
aa3fceeaad | ||
|
|
1e3b960ab5 | ||
|
|
8b1559b9f4 | ||
|
|
55b880070c | ||
|
|
703be4f77e | ||
|
|
27a743b82b | ||
|
|
bdf7393ddb | ||
|
|
2693e52113 | ||
|
|
4e68b2c52b | ||
|
|
0ba04f7737 | ||
|
|
54840f9c8f | ||
|
|
f269cdcd4f | ||
|
|
f76a6cd023 | ||
|
|
6b18d956de | ||
|
|
e46d589624 | ||
|
|
0496f5407f | ||
|
|
3a25a56a92 | ||
|
|
0525574913 | ||
|
|
73cabfedf5 | ||
|
|
12107d619b | ||
|
|
f7f4fd4706 | ||
|
|
e8b7698f5e | ||
|
|
2aae60461c | ||
|
|
f8c514ba6b | ||
|
|
8dc4f4dc9e | ||
|
|
5f8380d33e | ||
|
|
89637c6b41 | ||
|
|
1fa8e74d6e | ||
|
|
4b38feabe7 | ||
|
|
41ba98f02d | ||
|
|
a29264eb8c | ||
|
|
396c0f7a76 | ||
|
|
4903f044d3 | ||
|
|
6f78923d1f | ||
|
|
04904333fd | ||
|
|
ce64b82ebb | ||
|
|
3eecee16d1 | ||
|
|
0f8cf3b849 |
No files matched your search
+1
-1
@@ -24,7 +24,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.5
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.11
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
|
||||
@@ -15,11 +15,8 @@ ext/dba/libflatfile/flatfile.c ident
|
||||
ext/dba/libcdb/cdb_make.c ident
|
||||
ext/dba/libcdb/cdb.c ident
|
||||
ext/filter/filter.c ident
|
||||
ext/zip/php_zip.c ident
|
||||
README.input_filter ident
|
||||
run-tests.php ident
|
||||
sapi/nsapi/nsapi.c ident
|
||||
sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
ext/exif/exif.c ident
|
||||
@@ -32,7 +29,6 @@ UPGRADING.INTERNALS merge=NEWS
|
||||
/ext/bz2/tests/with_strings.phpt -crlf
|
||||
/ext/dom/tests/bug40836.phpt -crlf
|
||||
/ext/dom/tests/domelement.phpt -crlf
|
||||
/ext/ereg/tests/eregi_basic_002.phpt -crlf
|
||||
/ext/iconv/tests/iconv004.phpt -crlf
|
||||
/ext/iconv/tests/iconv_basic.phpt -crlf
|
||||
/ext/iconv/tests/iconv_strpos.phpt -crlf
|
||||
|
||||
@@ -262,9 +262,7 @@ pear/phpize
|
||||
pear/run-tests
|
||||
pear/php-config
|
||||
pear/scripts
|
||||
sapi/apache/libphp7.module
|
||||
sapi/apache2handler/libphp7.module
|
||||
sapi/apache_hooks/libphp7.module
|
||||
sapi/cgi/php-cgi
|
||||
sapi/cgi/php-cgi.1
|
||||
sapi/cli/php.1
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@ INSTALL_DATA = $(INSTALL) -m 644
|
||||
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
||||
|
||||
all: $(all_targets)
|
||||
all: $(all_targets)
|
||||
@echo
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@@ -112,13 +112,13 @@ test: all
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
rm -f php7.spec main/build-defs.h scripts/phpize
|
||||
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
@@ -135,7 +135,7 @@ prof-gen:
|
||||
|
||||
prof-clean:
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
|
||||
@@ -1,6 +1,179 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2017, PHP 7.1.8
|
||||
26 Oct 2017, PHP 7.1.11
|
||||
|
||||
- Core:
|
||||
. Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
|
||||
(Laruence)
|
||||
. Fixed bug #75236 (infinite loop when printing an error-message). (Andrea)
|
||||
. Fixed bug #75252 (Incorrect token formatting on two parse errors in one
|
||||
request). (Nikita)
|
||||
. Fixed bug #75220 (Segfault when calling is_callable on parent).
|
||||
(andrewnester)
|
||||
. Fixed bug #75290 (debug info of Closures of internal functions contain
|
||||
garbage argument names). (Andrea)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #75055 (Out-Of-Bounds Read in timelib_meridian()). (Derick)
|
||||
|
||||
- Apache2Handler:
|
||||
. Fixed bug #75311 (error: 'zend_hash_key' has no member named 'arKey' in
|
||||
apache2handler). (mcarbonneaux)
|
||||
|
||||
- Hash:
|
||||
. Fixed bug #75303 (sha3 hangs on bigendian). (Remi)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #75318 (The parameter of UConverter::getAliases() is not
|
||||
optional). (cmb)
|
||||
|
||||
- litespeed:
|
||||
. Fixed bug #75248 (Binary directory doesn't get created when building
|
||||
only litespeed SAPI). (petk)
|
||||
. Fixed bug #75251 (Missing program prefix and suffix). (petk)
|
||||
|
||||
- mcrypt:
|
||||
. Fixed bug #72535 (arcfour encryption stream filter crashes php). (Leigh)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #75018 (Data corruption when reading fields of bit type). (Anatol)
|
||||
|
||||
- OCI8:
|
||||
. Fixed incorrect reference counting. (Dmitry, Tianfang Yang)
|
||||
|
||||
- Opcache
|
||||
. Fixed bug #75255 (Request hangs and not finish). (Dmitry)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #75207 (applied upstream patch for CVE-2016-1283). (Anatol)
|
||||
|
||||
- PDO_mysql:
|
||||
. Fixed bug #75177 (Type 'bit' is fetched as unexpected string). (Anatol)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags).
|
||||
(J. Jeising, cmb)
|
||||
|
||||
28 Sep 2017, PHP 7.1.10
|
||||
|
||||
- Core:
|
||||
. Fixed bug #75042 (run-tests.php issues with EXTENSION block). (John Boehr)
|
||||
|
||||
- BCMath:
|
||||
. Fixed bug #44995 (bcpowmod() fails if scale != 0). (cmb)
|
||||
. Fixed bug #46781 (BC math handles minus zero incorrectly). (cmb)
|
||||
. Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1). (okano1220, cmb)
|
||||
. Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus). (cmb)
|
||||
|
||||
- CLI server:
|
||||
. Fixed bug #70470 (Built-in server truncates headers spanning over TCP
|
||||
packets). (bouk)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #75093 (OpenSSL support not detected). (Remi)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #75124 (gdImageGrayScale() may produce colors). (cmb)
|
||||
. Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?). (cmb)
|
||||
|
||||
- Gettext:
|
||||
. Fixed bug #73730 (textdomain(null) throws in strict mode). (cmb)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #75090 (IntlGregorianCalendar doesn't have constants from parent
|
||||
class). (tpunt)
|
||||
. Fixed bug #75193 (segfault in collator_convert_object_to_string). (Remi)
|
||||
|
||||
- PDO_OCI:
|
||||
. Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized
|
||||
before PHP-FPM sets it up). (Ingmar Runge)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #75155 (AppendIterator::append() is broken when appending another
|
||||
AppendIterator). (Nikita)
|
||||
. Fixed bug #75173 (incorrect behavior of AppendIterator::append in foreach loop).
|
||||
(jhdxr)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75152 (signed integer overflow in parse_iv). (Laruence)
|
||||
. Fixed bug #75097 (gethostname fails if your host name is 64 chars long). (Andrea)
|
||||
|
||||
31 Aug 2017, PHP 7.1.9
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74947 (Segfault in scanner on INF number). (Laruence)
|
||||
. Fixed bug #74954 (null deref and segfault in zend_generator_resume()). (Bob)
|
||||
. Fixed bug #74725 (html_errors=1 breaks unhandled exceptions). (Andrea)
|
||||
. Fixed bug #75063 (Main CWD initialized with wrong codepage). (Anatol)
|
||||
. Fixed bug #75349 (NAN comparison). (Sara)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
|
||||
(cebe)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #75002 (Null Pointer Dereference in timelib_time_clone). (Derick)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #74993 (Wrong reflection on some locale_* functions). (Sara)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #71606 (Segmentation fault mb_strcut with HTML-ENTITIES encoding).
|
||||
(cmb)
|
||||
. Fixed bug #62934 (mb_convert_kana() does not convert iteration marks).
|
||||
(Nikita)
|
||||
. Fixed bug #75001 (Wrong reflection on mb_eregi_replace). (Fabien
|
||||
Villepinte)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74968 (PHP crashes when calling mysqli_result::fetch_object with
|
||||
an abstract class). (Anatol)
|
||||
|
||||
- OCI8:
|
||||
. Expose oci_unregister_taf_callback() (Tianfang Yang)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74980 (Narrowing occurred during type inference). (Laruence)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74991 (include_path has a 4096 char limit in some cases).
|
||||
(bwbroersma)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #74949 (null pointer dereference in _function_string). (Laruence)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #74892 (Url Rewriting (trans_sid) not working on urls that start
|
||||
with "#"). (Andrew Nester)
|
||||
. Fixed bug #74833 (SID constant created with wrong module number). (Anatol)
|
||||
|
||||
- SimpleXML:
|
||||
. Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces).
|
||||
(Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #75049 (spl_autoload_unregister can't handle
|
||||
spl_autoload_functions results). (Laruence)
|
||||
. Fixed bug #74669 (Unserialize ArrayIterator broken). (Andrew Nester)
|
||||
. Fixed bug #74977 (Appending AppendIterator leads to segfault).
|
||||
(Andrew Nester)
|
||||
. Fixed bug #75015 (Crash in recursive iterator destructors). (Julien)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75075 (unpack with X* causes infinity loop). (Laruence)
|
||||
. Fixed bug #74103 (heap-use-after-free when unserializing invalid array
|
||||
size). (Nikita)
|
||||
. Fixed bug #75054 (A Denial of Service Vulnerability was found when
|
||||
performing deserialization). (Nikita)
|
||||
|
||||
- WDDX:
|
||||
. Fixed bug #73793 (WDDX uses wrong decimal seperator). (cmb)
|
||||
|
||||
- XMLRPC:
|
||||
. Fixed bug #74975 (Incorrect xmlrpc serialization for classes with declared
|
||||
properties). (blar)
|
||||
|
||||
03 Aug 2017, PHP 7.1.8
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74832 (Loading PHP extension with already registered function
|
||||
@@ -9,6 +182,16 @@ PHP NEWS
|
||||
(jhdxr)
|
||||
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
|
||||
. Fixed bug #73900 (Use After Free in unserialize() SplFixedArray). (nikic)
|
||||
. Fixed bug #74923 (Crash when crawling through network share). (Anatol)
|
||||
. Fixed bug #74913 (fixed incorrect poll.h include). (petk)
|
||||
. Fixed bug #74906 (fixed incorrect errno.h include). (petk)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74852 (property_exists returns true on unknown DateInterval
|
||||
property). (jhdxr)
|
||||
|
||||
- OCI8:
|
||||
. Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74623 (Infinite loop in type inference when using HTMLPurifier).
|
||||
@@ -28,6 +211,10 @@ PHP NEWS
|
||||
- SPL:
|
||||
. Fixed bug #73471 (PHP freezes with AppendIterator). (jhdxr)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed bug #74883 (SQLite3::__construct() produces "out of memory" exception
|
||||
with invalid flags). (Anatol)
|
||||
|
||||
- Wddx:
|
||||
. Fixed bug #73173 (huge memleak when wddx_unserialize).
|
||||
(tloi at fortinet dot com)
|
||||
@@ -35,8 +222,6 @@ PHP NEWS
|
||||
- zlib:
|
||||
. Fixed bug #73944 (dictionary option of inflate_init() does not work).
|
||||
(wapmorgan)
|
||||
. Expose inflate_get_status() and inflate_get_read_len() functions.
|
||||
(Matthew Trescott)
|
||||
|
||||
06 Jul 2017, PHP 7.1.7
|
||||
|
||||
@@ -46,6 +231,14 @@ PHP NEWS
|
||||
. Fixed bug #74658 (Undefined constants in array properties result in broken
|
||||
properties). (Laruence)
|
||||
. Fixed misparsing of abstract unix domain socket names. (Sara)
|
||||
. Fixed bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
|
||||
(Stas)
|
||||
. Fixed bug #74101, bug #74614 (Unserialize Heap Use-After-Free (READ: 1) in
|
||||
zval_get_type). (Nikita)
|
||||
. Fixed bug #74111 (Heap buffer overread (READ: 1) finish_nested_data from
|
||||
unserialize). (Nikita)
|
||||
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
|
||||
php_parse_date()). (Derick)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74639 (implement clone for DatePeriod and DateInterval).
|
||||
@@ -54,6 +247,9 @@ PHP NEWS
|
||||
- DOM:
|
||||
. Fixed bug #69373 (References to deleted XPath query results). (ttoohey)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #73473 (Stack Buffer Overflow in msgfmt_parse_message). (libnex)
|
||||
. Fixed bug #74705 (Wrong reflection on Collator::getSortKey and
|
||||
@@ -65,7 +261,6 @@ PHP NEWS
|
||||
|
||||
- OCI8:
|
||||
. Add TAF callback (PR #2459). (KoenigsKind)
|
||||
. Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74663 (Segfault with opcache.memory_protect and
|
||||
@@ -75,6 +270,8 @@ PHP NEWS
|
||||
- OpenSSL:
|
||||
. Fixed bug #74720 (pkcs7_en/decrypt does not work if \x1a is used in
|
||||
content). (Anatol)
|
||||
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
|
||||
(Stas)
|
||||
|
||||
- PDO_OCI:
|
||||
. Support Instant Client 12.2 in --with-pdo-oci configure option.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0=0&~2000000000
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 2147483647)
|
||||
die('skip for 32-bit only');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "0"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #74947 (Segfault in scanner on INF number)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
echo 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
|
||||
|
||||
echo -200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
INF-INF
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #75241 (Null pointer dereference in zend_mm_alloc_small())
|
||||
--FILE--
|
||||
<?php
|
||||
function eh(){}
|
||||
|
||||
set_error_handler('eh');
|
||||
|
||||
$d->d = &$d + $d->d/=0;
|
||||
var_dump($d);
|
||||
?>
|
||||
--EXPECT--
|
||||
float(INF)
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #75252: Incorrect token formatting on two parse errors in one request
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$code = <<<'CODE'
|
||||
function test_missing_semicolon() : string {
|
||||
$x = []
|
||||
FOO
|
||||
}
|
||||
CODE;
|
||||
|
||||
try {
|
||||
eval($code);
|
||||
} catch (ParseError $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
eval($code);
|
||||
} catch (ParseError $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(41) "syntax error, unexpected 'FOO' (T_STRING)"
|
||||
string(41) "syntax error, unexpected 'FOO' (T_STRING)"
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #75290 (debug info of Closures of internal functions contain garbage argument names)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump((new ReflectionFunction('sin'))->getClosure());
|
||||
|
||||
var_dump(function ($someThing) {});
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Closure)#2 (1) {
|
||||
["parameter"]=>
|
||||
array(1) {
|
||||
["$number"]=>
|
||||
string(10) "<required>"
|
||||
}
|
||||
}
|
||||
object(Closure)#2 (1) {
|
||||
["parameter"]=>
|
||||
array(1) {
|
||||
["$someThing"]=>
|
||||
string(10) "<required>"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
--TEST--
|
||||
Bug #74954 (crash after update of generator yielding from finished generator)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function from() {
|
||||
yield 1;
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
function gen($gen) {
|
||||
try {
|
||||
var_dump(yield from $gen);
|
||||
} catch (Exception $e) { print "Caught exception!\n$e\n"; }
|
||||
}
|
||||
|
||||
$gen = from();
|
||||
$gens[] = gen($gen);
|
||||
$gens[] = gen($gen);
|
||||
|
||||
foreach ($gens as $g) {
|
||||
$g->current();
|
||||
}
|
||||
|
||||
do {
|
||||
foreach ($gens as $i => $g) {
|
||||
$g->next();
|
||||
}
|
||||
} while($gens[0]->valid());
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Caught exception!
|
||||
Exception in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): from()
|
||||
#1 [internal function]: gen(Object(Generator))
|
||||
#2 %s(%d): Generator->next()
|
||||
#3 {main}
|
||||
Caught exception!
|
||||
ClosedGeneratorException: Generator yielded from aborted, no return value available in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: gen(Object(Generator))
|
||||
#1 %s(%d): Generator->next()
|
||||
#2 {main}
|
||||
+7
-1
@@ -660,6 +660,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
|
||||
extern zend_php_scanner_globals language_scanner_globals;
|
||||
#endif
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
php_win32_cp_set_by_id(65001);
|
||||
#endif
|
||||
|
||||
start_memory_manager();
|
||||
|
||||
virtual_cwd_startup(); /* Could use shutdown to free the main cwd but it would just slow it down for CGI */
|
||||
@@ -712,7 +716,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
|
||||
zend_compile_file = compile_file;
|
||||
zend_execute_ex = execute_ex;
|
||||
zend_execute_internal = NULL;
|
||||
#endif /* HAVE_SYS_SDT_H */
|
||||
#endif /* HAVE_DTRACE */
|
||||
zend_compile_string = compile_string;
|
||||
zend_throw_exception_hook = NULL;
|
||||
|
||||
@@ -912,6 +916,8 @@ void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */
|
||||
/* this should be compatible with the standard zenderror */
|
||||
ZEND_COLD void zenderror(const char *error) /* {{{ */
|
||||
{
|
||||
CG(parse_error) = 0;
|
||||
|
||||
if (EG(exception)) {
|
||||
/* An exception was thrown in the lexer, don't throw another in the parser. */
|
||||
return;
|
||||
|
||||
@@ -279,7 +279,6 @@ ZEND_COLD void zenderror(const char *error);
|
||||
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
|
||||
extern ZEND_API zend_class_entry *zend_standard_class_def;
|
||||
extern ZEND_API zend_utility_values zend_uv;
|
||||
extern ZEND_API zval zval_used_for_init;
|
||||
|
||||
/* If DTrace is available and enabled */
|
||||
extern ZEND_API zend_bool zend_dtrace_enabled;
|
||||
|
||||
+6
-3
@@ -3068,7 +3068,8 @@ get_function_via_handler:
|
||||
(!fcc->function_handler->common.scope ||
|
||||
!instanceof_function(ce_org, fcc->function_handler->common.scope))) {
|
||||
if (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
zend_free_trampoline(fcc->function_handler);
|
||||
@@ -3240,7 +3241,8 @@ again:
|
||||
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
zend_free_trampoline(fcc->function_handler);
|
||||
@@ -3327,7 +3329,8 @@ again:
|
||||
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
zend_free_trampoline(fcc->function_handler);
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ struct _zend_mm_chunk {
|
||||
uint32_t free_pages; /* number of free pages */
|
||||
uint32_t free_tail; /* number of free pages at the end of chunk */
|
||||
uint32_t num;
|
||||
char reserve[64 - (sizeof(void*) * 3 + sizeof(int) * 3)];
|
||||
char reserve[64 - (sizeof(void*) * 3 + sizeof(uint32_t) * 3)];
|
||||
zend_mm_heap heap_slot; /* used only in main chunk */
|
||||
zend_mm_page_map free_map; /* 512 bits or 64 bytes */
|
||||
zend_mm_page_info map[ZEND_MM_PAGES]; /* 2 KB = 512 * 4 */
|
||||
|
||||
@@ -220,6 +220,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_set_exception_handler, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, exception_handler)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_get_defined_functions, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, exclude_disabled)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_create_function, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, args)
|
||||
ZEND_ARG_INFO(0, code)
|
||||
@@ -366,7 +370,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
|
||||
ZEND_FE(get_declared_classes, arginfo_zend__void)
|
||||
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_functions, arginfo_get_defined_functions)
|
||||
ZEND_FE(get_defined_vars, arginfo_zend__void)
|
||||
ZEND_FE(create_function, arginfo_create_function)
|
||||
ZEND_FE(get_resource_type, arginfo_get_resource_type)
|
||||
@@ -1280,7 +1284,7 @@ ZEND_FUNCTION(get_object_vars)
|
||||
zend_unmangle_property_name_ex(key, &class_name, &prop_name, &prop_len);
|
||||
zend_hash_str_add_new(Z_ARRVAL_P(return_value), prop_name, prop_len, value);
|
||||
} else {
|
||||
zend_symbtable_add_new(Z_ARRVAL_P(return_value), key, value);
|
||||
zend_symtable_add_new(Z_ARRVAL_P(return_value), key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-3
@@ -503,6 +503,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
|
||||
zval val;
|
||||
struct _zend_arg_info *arg_info = closure->func.common.arg_info;
|
||||
HashTable *debug_info;
|
||||
zend_bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO);
|
||||
|
||||
*is_temp = 1;
|
||||
|
||||
@@ -535,9 +536,15 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
|
||||
zend_string *name;
|
||||
zval info;
|
||||
if (arg_info->name) {
|
||||
name = zend_strpprintf(0, "%s$%s",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
ZSTR_VAL(arg_info->name));
|
||||
if (zstr_args) {
|
||||
name = zend_strpprintf(0, "%s$%s",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
ZSTR_VAL(arg_info->name));
|
||||
} else {
|
||||
name = zend_strpprintf(0, "%s$%s",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
((zend_internal_arg_info*)arg_info)->name);
|
||||
}
|
||||
} else {
|
||||
name = zend_strpprintf(0, "%s$param%d",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
|
||||
@@ -757,15 +757,13 @@ failure:
|
||||
|
||||
ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
|
||||
{
|
||||
zend_generator *generator;
|
||||
zend_generator *generator = zend_generator_get_current(orig_generator);
|
||||
|
||||
/* The generator is already closed, thus can't resume */
|
||||
if (UNEXPECTED(!orig_generator->execute_data)) {
|
||||
if (UNEXPECTED(!generator->execute_data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
generator = zend_generator_get_current(orig_generator);
|
||||
|
||||
try_again:
|
||||
if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
|
||||
zend_throw_error(NULL, "Cannot resume an already running generator");
|
||||
|
||||
+5
-1
@@ -337,7 +337,7 @@ static zend_always_inline int zend_hash_str_exists_ind(const HashTable *ht, cons
|
||||
Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF);
|
||||
}
|
||||
|
||||
static zend_always_inline zval *zend_symbtable_add_new(HashTable *ht, zend_string *key, zval *pData)
|
||||
static zend_always_inline zval *zend_symtable_add_new(HashTable *ht, zend_string *key, zval *pData)
|
||||
{
|
||||
zend_ulong idx;
|
||||
|
||||
@@ -348,6 +348,10 @@ static zend_always_inline zval *zend_symbtable_add_new(HashTable *ht, zend_strin
|
||||
}
|
||||
}
|
||||
|
||||
/* This typo snuck into 7.0.17 and 7.1.3, this define exists for BC */
|
||||
#define zend_symbtable_add_new(ht, key, pData) \
|
||||
zend_symtable_add_new(ht, key, pData)
|
||||
|
||||
static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
|
||||
{
|
||||
zend_ulong idx;
|
||||
|
||||
@@ -55,7 +55,7 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
int i_result;
|
||||
int i_op1, i_op2;
|
||||
int str_len;
|
||||
char str_result[MAX_LENGTH_OF_LONG];
|
||||
char str_result[MAX_LENGTH_OF_LONG+1];
|
||||
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
zend_string_free(Z_STR_P(op1));
|
||||
|
||||
+194
-196
File diff suppressed because it is too large.
Load diff
@@ -1663,7 +1663,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
if (errno == ERANGE) { /* Overflow */
|
||||
errno = 0;
|
||||
if (yytext[0] == '0') { /* octal overflow */
|
||||
errno = 0;
|
||||
ZVAL_DOUBLE(zendlval, zend_oct_strtod(yytext, (const char **)&end));
|
||||
} else {
|
||||
ZVAL_DOUBLE(zendlval, zend_strtod(yytext, (const char **)&end));
|
||||
@@ -1675,7 +1674,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
ZVAL_UNDEF(zendlval);
|
||||
RETURN_TOKEN(T_DNUMBER);
|
||||
}
|
||||
ZEND_ASSERT(!errno);
|
||||
RETURN_TOKEN(T_DNUMBER);
|
||||
}
|
||||
/* Also not an assert for the same reason */
|
||||
|
||||
@@ -222,8 +222,10 @@ ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */
|
||||
if (Z_TYPE(holder) == IS_LONG) { \
|
||||
if (op == result) { \
|
||||
zval_ptr_dtor(op); \
|
||||
ZVAL_LONG(op, Z_LVAL(holder)); \
|
||||
} else { \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
break; \
|
||||
} \
|
||||
|
||||
@@ -433,7 +433,7 @@ char *alloca();
|
||||
#define ZEND_STRL(str) (str), (sizeof(str)-1)
|
||||
#define ZEND_STRS(str) (str), (sizeof(str))
|
||||
#define ZEND_NORMALIZE_BOOL(n) \
|
||||
((n) ? (((n)>0) ? 1 : -1) : 0)
|
||||
((n) ? (((n)<0) ? -1 : 1) : 0)
|
||||
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
|
||||
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
|
||||
|
||||
|
||||
@@ -72,6 +72,10 @@ typedef unsigned long int uint32_t;
|
||||
#define NO_INFNAN_CHECK
|
||||
#endif
|
||||
|
||||
#ifndef NO_ERRNO
|
||||
#define NO_ERRNO
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define IEEE_BIG_ENDIAN 1
|
||||
#else
|
||||
|
||||
@@ -167,8 +167,10 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
{
|
||||
if (EXPECTED(Z_TYPE_P(zvalue) == IS_ARRAY)) {
|
||||
ZVAL_ARR(zvalue, zend_array_dup(Z_ARRVAL_P(zvalue)));
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING) ||
|
||||
EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING)) {
|
||||
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
|
||||
ZVAL_NEW_STR(zvalue, zend_string_dup(Z_STR_P(zvalue), 0));
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
|
||||
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
|
||||
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {
|
||||
|
||||
+13
-4
@@ -445,11 +445,15 @@ static void cwd_globals_dtor(virtual_cwd_globals *cwd_g) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
void virtual_cwd_main_cwd_init(uint8_t reinit) /* {{{ */
|
||||
{
|
||||
char cwd[MAXPATHLEN];
|
||||
char *result;
|
||||
|
||||
if (reinit) {
|
||||
free(main_cwd_state.cwd);
|
||||
}
|
||||
|
||||
#ifdef NETWARE
|
||||
result = getcwdpath(cwd, NULL, 1);
|
||||
if(result)
|
||||
@@ -461,10 +465,10 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
++c;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#ifdef ZEND_WIN32
|
||||
#elif defined(ZEND_WIN32)
|
||||
ZeroMemory(&cwd, sizeof(cwd));
|
||||
#endif
|
||||
result = php_win32_ioutil_getcwd(cwd, sizeof(cwd));
|
||||
#else
|
||||
result = getcwd(cwd, sizeof(cwd));
|
||||
#endif
|
||||
if (!result) {
|
||||
@@ -478,7 +482,12 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
}
|
||||
#endif
|
||||
main_cwd_state.cwd = strdup(cwd);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
CWD_API void virtual_cwd_startup(void) /* {{{ */
|
||||
{
|
||||
virtual_cwd_main_cwd_init(0);
|
||||
#ifdef ZTS
|
||||
ts_allocate_id(&cwd_globals_id, sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
|
||||
#else
|
||||
|
||||
@@ -251,6 +251,10 @@ CWD_API zend_long realpath_cache_size(void);
|
||||
CWD_API zend_long realpath_cache_max_buckets(void);
|
||||
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
|
||||
|
||||
#ifdef CWD_EXPORTS
|
||||
extern void virtual_cwd_main_cwd_init(uint8_t);
|
||||
#endif
|
||||
|
||||
/* The actual macros to be used in programs using TSRM
|
||||
* If the program defines VIRTUAL_DIR it will use the
|
||||
* virtual_* functions
|
||||
|
||||
+10
-1
@@ -2,6 +2,8 @@
|
||||
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
|
||||
@@ -22,12 +24,19 @@ echo Updating dependencies in %DEPS_DIR%
|
||||
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem Something went wrong, most likely when concurrent builds were to fetch deps
|
||||
rem updates. It might be, that some locking mechanism is needed.
|
||||
if not exist "%DEPS_DIR%" (
|
||||
cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
)
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
cmd /c buildconf.bat --force
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
if "%THREAD_SAFE%" equ "0" set ADD_CONF=--disable-zts
|
||||
|
||||
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_odbc,odbc,pdo_firebird,interbase,ldap,imap,dba
|
||||
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_odbc,odbc,pdo_firebird,interbase,ldap,imap,dba,ftp
|
||||
if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache
|
||||
|
||||
cmd /c configure.bat ^
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=1
|
||||
PHP_RELEASE_VERSION=8
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=11
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ bc_divmod (bc_num num1, bc_num num2, bc_num *quot, bc_num *rem, int scale)
|
||||
bc_init_num(&temp);
|
||||
|
||||
/* Calculate it. */
|
||||
bc_divide (num1, num2, &temp, scale);
|
||||
bc_divide (num1, num2, &temp, 0);
|
||||
if (quot)
|
||||
quotient = bc_copy_num (temp);
|
||||
bc_multiply (temp, num2, &temp, rscale);
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
int
|
||||
bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale)
|
||||
{
|
||||
bc_num power, exponent, parity, temp;
|
||||
bc_num power, exponent, modulus, parity, temp;
|
||||
int rscale;
|
||||
|
||||
/* Check for correct numbers. */
|
||||
@@ -55,12 +55,16 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale)
|
||||
/* Set initial values. */
|
||||
power = bc_copy_num (base);
|
||||
exponent = bc_copy_num (expo);
|
||||
modulus = bc_copy_num (mod);
|
||||
temp = bc_copy_num (BCG(_one_));
|
||||
bc_init_num(&parity);
|
||||
|
||||
/* Check the base for scale digits. */
|
||||
if (base->n_scale != 0)
|
||||
if (power->n_scale != 0)
|
||||
{
|
||||
bc_rt_warn ("non-zero scale in base");
|
||||
bc_divide (power, BCG(_one_), &power, 0); /*truncate */
|
||||
}
|
||||
|
||||
/* Check the exponent for scale digits. */
|
||||
if (exponent->n_scale != 0)
|
||||
@@ -70,27 +74,38 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale)
|
||||
}
|
||||
|
||||
/* Check the modulus for scale digits. */
|
||||
if (mod->n_scale != 0)
|
||||
if (modulus->n_scale != 0)
|
||||
{
|
||||
bc_rt_warn ("non-zero scale in modulus");
|
||||
bc_divide (modulus, BCG(_one_), &modulus, 0); /*truncate */
|
||||
}
|
||||
|
||||
/* Do the calculation. */
|
||||
rscale = MAX(scale, base->n_scale);
|
||||
while ( !bc_is_zero(exponent) )
|
||||
rscale = MAX(scale, power->n_scale);
|
||||
if ( !bc_compare(modulus, BCG(_one_)) )
|
||||
{
|
||||
(void) bc_divmod (exponent, BCG(_two_), &exponent, &parity, 0);
|
||||
if ( !bc_is_zero(parity) )
|
||||
temp = bc_new_num (1, scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( !bc_is_zero(exponent) )
|
||||
{
|
||||
bc_multiply (temp, power, &temp, rscale);
|
||||
(void) bc_modulo (temp, mod, &temp, scale);
|
||||
}
|
||||
(void) bc_divmod (exponent, BCG(_two_), &exponent, &parity, 0);
|
||||
if ( !bc_is_zero(parity) )
|
||||
{
|
||||
bc_multiply (temp, power, &temp, rscale);
|
||||
(void) bc_modulo (temp, modulus, &temp, scale);
|
||||
}
|
||||
|
||||
bc_multiply (power, power, &power, rscale);
|
||||
(void) bc_modulo (power, mod, &power, scale);
|
||||
bc_multiply (power, power, &power, rscale);
|
||||
(void) bc_modulo (power, modulus, &power, scale);
|
||||
}
|
||||
}
|
||||
|
||||
/* Assign the value. */
|
||||
bc_free_num (&power);
|
||||
bc_free_num (&exponent);
|
||||
bc_free_num (&modulus);
|
||||
bc_free_num (result);
|
||||
bc_free_num (&parity);
|
||||
*result = temp;
|
||||
|
||||
@@ -105,5 +105,8 @@ bc_str2num (bc_num *num, char *str, int scale)
|
||||
for (;strscale > 0; strscale--)
|
||||
*nptr++ = CH_VAL(*ptr++);
|
||||
}
|
||||
|
||||
if (bc_is_zero (*num))
|
||||
(*num)->n_sign = PLUS;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #44995 (bcpowmod() fails if scale != 0)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcpowmod('4', '4', '3', 1));
|
||||
var_dump(bcpowmod('3234', '32345', '22345', 1));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(3) "1.0"
|
||||
string(7) "17334.0"
|
||||
===DONE===
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #46781 (BC math handles minus zero incorrectly)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcadd('-0.0', '-0.0', 1));
|
||||
var_dump(bccomp('-0.0', '0', 1));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(3) "0.0"
|
||||
int(0)
|
||||
===DONE===
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #54598 (bcpowmod() may return 1 if modulus is 1)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcpowmod(5, 0, 1));
|
||||
var_dump(bcpowmod(5, 0, 1, 3));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(1) "0"
|
||||
string(5) "0.000"
|
||||
===DONE===
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
die('skip valid only for windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcpowmod('4.1', '4', '3', 3));
|
||||
var_dump(bcpowmod('4', '4', '3.1', 3));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(5) "1.000"
|
||||
string(5) "1.000"
|
||||
===DONE===
|
||||
bc math warning: non-zero scale in base
|
||||
bc math warning: non-zero scale in modulus
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
die('skip Not valid for windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcpowmod('4.1', '4', '3', 3));
|
||||
var_dump(bcpowmod('4', '4', '3.1', 3));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
bc math warning: non-zero scale in base
|
||||
string(5) "1.000"
|
||||
bc math warning: non-zero scale in modulus
|
||||
string(5) "1.000"
|
||||
===DONE===
|
||||
+22
-3
@@ -17,11 +17,23 @@ if test "$PHP_CURL" != "no"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$CURL_DIR"; then
|
||||
AC_MSG_RESULT(not found)
|
||||
if which dpkg-architecture>/dev/null; then
|
||||
AC_MSG_CHECKING(for cURL in multiarch path)
|
||||
CURL_MULTIARCH_INCLUDE=/usr/include/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
if test -r $CURL_MULTIARCH_INCLUDE/curl/easy.h; then
|
||||
CURL_DIR=/usr
|
||||
AC_MSG_RESULT(found in $CURL_MULTIARCH_INCLUDE)
|
||||
else
|
||||
AC_MSG_RESULT(not found)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$CURL_DIR"; then
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_MSG_ERROR(Please reinstall the libcurl distribution -
|
||||
AC_MSG_ERROR(Could not find cURL, please reinstall the libcurl distribution -
|
||||
easy.h should be in <curl-dir>/include/curl/)
|
||||
fi
|
||||
|
||||
@@ -45,7 +57,11 @@ if test "$PHP_CURL" != "no"; then
|
||||
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
|
||||
fi
|
||||
|
||||
PHP_ADD_INCLUDE($CURL_DIR/include)
|
||||
if test -z "$CURL_MULTIARCH_INCLUDE"; then
|
||||
PHP_ADD_INCLUDE($CURL_DIR/include)
|
||||
else
|
||||
PHP_ADD_INCLUDE($CURL_MULTIARCH_INCLUDE)
|
||||
fi
|
||||
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
|
||||
|
||||
@@ -57,6 +73,8 @@ if test "$PHP_CURL" != "no"; then
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="`$CURL_CONFIG --cflags`"
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="`$CURL_CONFIG --libs`"
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_MSG_CHECKING([for openssl support in libcurl])
|
||||
@@ -114,6 +132,7 @@ int main(int argc, char *argv[])
|
||||
])
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
+7552
-6811
File diff suppressed because it is too large.
Load diff
@@ -913,7 +913,7 @@ datefull = day ([ \t.-])* monthtext ([ \t.-])* year;
|
||||
datenoday = monthtext ([ .\t-])* year4;
|
||||
datenodayrev = year4 ([ .\t-])* monthtext;
|
||||
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]+ year;
|
||||
datenoyear = monthtext ([ .\t-])* day [,.stndrh\t ]*;
|
||||
datenoyear = monthtext ([ .\t-])* day ([,.stndrh\t ]+|[\000]);
|
||||
datenoyearrev = day ([ .\t-])* monthtext;
|
||||
datenocolon = year4 monthlz daylz;
|
||||
|
||||
@@ -931,8 +931,8 @@ isoweek = year4 "-"? "W" weekofyear;
|
||||
exif = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz;
|
||||
firstdayof = 'first day of';
|
||||
lastdayof = 'last day of';
|
||||
backof = 'back of ' hour24 space? meridian?;
|
||||
frontof = 'front of ' hour24 space? meridian?;
|
||||
backof = 'back of ' hour24 (space? meridian)?;
|
||||
frontof = 'front of ' hour24 (space? meridian)?;
|
||||
|
||||
/* Common Log Format: 10/Oct/2000:13:55:36 -0700 */
|
||||
clf = day "/" monthabbr "/" year4 ":" hour24lz ":" minutelz ":" secondlz space tzcorrection;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 on Thu Aug 13 10:30:12 2015 */
|
||||
/* Generated by re2c 0.15.3 on Wed Aug 16 15:55:55 2017 */
|
||||
#line 1 "ext/date/lib/parse_iso_intervals.re"
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
@@ -258,45 +258,45 @@ std:
|
||||
|
||||
|
||||
|
||||
#line 262 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 262 "<stdout>"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
static const unsigned char yybm[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
128, 128, 128, 128, 128, 128, 128, 128,
|
||||
128, 128, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
128, 128, 128, 128, 128, 128, 128, 128,
|
||||
128, 128, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
YYDEBUG(0, *YYCURSOR);
|
||||
if ((YYLIMIT - YYCURSOR) < 20) YYFILL(20);
|
||||
yych = *YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
@@ -321,29 +321,34 @@ std:
|
||||
if (yych != 'R') goto yy11;
|
||||
}
|
||||
}
|
||||
YYDEBUG(2, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((yych = *YYCURSOR) <= '/') goto yy3;
|
||||
if (yych <= '9') goto yy98;
|
||||
yy3:
|
||||
YYDEBUG(3, *YYCURSOR);
|
||||
#line 395 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
add_error(s, "Unexpected character");
|
||||
goto std;
|
||||
}
|
||||
#line 334 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 336 "<stdout>"
|
||||
yy4:
|
||||
YYDEBUG(4, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy3;
|
||||
if (yych <= '9') goto yy59;
|
||||
goto yy3;
|
||||
yy5:
|
||||
YYDEBUG(5, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy6;
|
||||
if (yych <= '9') goto yy12;
|
||||
if (yych == 'T') goto yy14;
|
||||
yy6:
|
||||
YYDEBUG(6, *YYCURSOR);
|
||||
#line 322 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
timelib_sll nr;
|
||||
@@ -385,26 +390,32 @@ yy6:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PERIOD;
|
||||
}
|
||||
#line 389 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 394 "<stdout>"
|
||||
yy7:
|
||||
YYDEBUG(7, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(8, *YYCURSOR);
|
||||
#line 384 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
goto std;
|
||||
}
|
||||
#line 396 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 403 "<stdout>"
|
||||
yy9:
|
||||
YYDEBUG(9, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(10, *YYCURSOR);
|
||||
#line 389 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
s->pos = cursor; s->line++;
|
||||
goto std;
|
||||
}
|
||||
#line 404 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 413 "<stdout>"
|
||||
yy11:
|
||||
YYDEBUG(11, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
goto yy3;
|
||||
yy12:
|
||||
YYDEBUG(12, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= 'L') {
|
||||
if (yych <= '9') {
|
||||
@@ -421,13 +432,15 @@ yy12:
|
||||
}
|
||||
}
|
||||
yy13:
|
||||
YYDEBUG(13, *YYCURSOR);
|
||||
YYCURSOR = YYMARKER;
|
||||
if (yyaccept <= 0) {
|
||||
if (yyaccept == 0) {
|
||||
goto yy3;
|
||||
} else {
|
||||
goto yy6;
|
||||
}
|
||||
yy14:
|
||||
YYDEBUG(14, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yybm[0+yych] & 128) {
|
||||
@@ -435,9 +448,11 @@ yy14:
|
||||
}
|
||||
goto yy6;
|
||||
yy15:
|
||||
YYDEBUG(15, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(16, *YYCURSOR);
|
||||
if (yybm[0+yych] & 128) {
|
||||
goto yy15;
|
||||
}
|
||||
@@ -449,23 +464,28 @@ yy15:
|
||||
if (yych != 'S') goto yy13;
|
||||
}
|
||||
yy17:
|
||||
YYDEBUG(17, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
goto yy6;
|
||||
yy18:
|
||||
YYDEBUG(18, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy6;
|
||||
if (yych <= '9') goto yy22;
|
||||
goto yy6;
|
||||
yy19:
|
||||
YYDEBUG(19, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy6;
|
||||
if (yych >= ':') goto yy6;
|
||||
yy20:
|
||||
YYDEBUG(20, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(21, *YYCURSOR);
|
||||
if (yych <= 'L') {
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy20;
|
||||
@@ -476,18 +496,22 @@ yy20:
|
||||
goto yy13;
|
||||
}
|
||||
yy22:
|
||||
YYDEBUG(22, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(23, *YYCURSOR);
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy22;
|
||||
if (yych == 'S') goto yy17;
|
||||
goto yy13;
|
||||
yy24:
|
||||
YYDEBUG(24, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == 'T') goto yy14;
|
||||
goto yy6;
|
||||
yy25:
|
||||
YYDEBUG(25, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= 'L') {
|
||||
if (yych <= '9') {
|
||||
@@ -507,6 +531,7 @@ yy25:
|
||||
}
|
||||
}
|
||||
yy26:
|
||||
YYDEBUG(26, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy6;
|
||||
@@ -514,6 +539,7 @@ yy26:
|
||||
if (yych == 'T') goto yy14;
|
||||
goto yy6;
|
||||
yy27:
|
||||
YYDEBUG(27, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy6;
|
||||
@@ -521,6 +547,7 @@ yy27:
|
||||
if (yych == 'T') goto yy14;
|
||||
goto yy6;
|
||||
yy28:
|
||||
YYDEBUG(28, *YYCURSOR);
|
||||
yyaccept = 1;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= '/') goto yy6;
|
||||
@@ -528,9 +555,11 @@ yy28:
|
||||
if (yych == 'T') goto yy14;
|
||||
goto yy6;
|
||||
yy29:
|
||||
YYDEBUG(29, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(30, *YYCURSOR);
|
||||
if (yych <= 'D') {
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy29;
|
||||
@@ -546,9 +575,11 @@ yy29:
|
||||
}
|
||||
}
|
||||
yy31:
|
||||
YYDEBUG(31, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(32, *YYCURSOR);
|
||||
if (yych <= 'C') {
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy31;
|
||||
@@ -559,14 +590,17 @@ yy31:
|
||||
goto yy13;
|
||||
}
|
||||
yy33:
|
||||
YYDEBUG(33, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(34, *YYCURSOR);
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy33;
|
||||
if (yych == 'D') goto yy24;
|
||||
goto yy13;
|
||||
yy35:
|
||||
YYDEBUG(35, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= 'L') {
|
||||
if (yych <= '9') {
|
||||
@@ -585,18 +619,22 @@ yy35:
|
||||
goto yy13;
|
||||
}
|
||||
}
|
||||
YYDEBUG(36, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '-') goto yy39;
|
||||
YYDEBUG(37, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '0') goto yy40;
|
||||
if (yych <= '1') goto yy41;
|
||||
goto yy13;
|
||||
yy38:
|
||||
YYDEBUG(38, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
||||
yych = *YYCURSOR;
|
||||
yy39:
|
||||
YYDEBUG(39, *YYCURSOR);
|
||||
if (yych <= 'L') {
|
||||
if (yych <= '9') {
|
||||
if (yych <= '/') goto yy13;
|
||||
@@ -616,17 +654,21 @@ yy39:
|
||||
}
|
||||
}
|
||||
yy40:
|
||||
YYDEBUG(40, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy42;
|
||||
goto yy13;
|
||||
yy41:
|
||||
YYDEBUG(41, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '3') goto yy13;
|
||||
yy42:
|
||||
YYDEBUG(42, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '-') goto yy13;
|
||||
YYDEBUG(43, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '0') goto yy44;
|
||||
@@ -634,54 +676,69 @@ yy42:
|
||||
if (yych <= '3') goto yy46;
|
||||
goto yy13;
|
||||
yy44:
|
||||
YYDEBUG(44, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy47;
|
||||
goto yy13;
|
||||
yy45:
|
||||
YYDEBUG(45, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy47;
|
||||
goto yy13;
|
||||
yy46:
|
||||
YYDEBUG(46, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '2') goto yy13;
|
||||
yy47:
|
||||
YYDEBUG(47, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != 'T') goto yy13;
|
||||
YYDEBUG(48, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '1') goto yy49;
|
||||
if (yych <= '2') goto yy50;
|
||||
goto yy13;
|
||||
yy49:
|
||||
YYDEBUG(49, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy51;
|
||||
goto yy13;
|
||||
yy50:
|
||||
YYDEBUG(50, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '5') goto yy13;
|
||||
yy51:
|
||||
YYDEBUG(51, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != ':') goto yy13;
|
||||
YYDEBUG(52, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '6') goto yy13;
|
||||
YYDEBUG(53, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(54, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != ':') goto yy13;
|
||||
YYDEBUG(55, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '6') goto yy13;
|
||||
YYDEBUG(56, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(57, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(58, *YYCURSOR);
|
||||
#line 364 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
DEBUG_OUTPUT("combinedrep");
|
||||
@@ -701,14 +758,17 @@ yy51:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_PERIOD;
|
||||
}
|
||||
#line 705 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 762 "<stdout>"
|
||||
yy59:
|
||||
YYDEBUG(59, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(60, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(61, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') {
|
||||
if (yych == '-') goto yy64;
|
||||
@@ -719,33 +779,40 @@ yy59:
|
||||
goto yy13;
|
||||
}
|
||||
yy62:
|
||||
YYDEBUG(62, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '0') goto yy13;
|
||||
if (yych <= '9') goto yy85;
|
||||
goto yy13;
|
||||
yy63:
|
||||
YYDEBUG(63, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '2') goto yy85;
|
||||
goto yy13;
|
||||
yy64:
|
||||
YYDEBUG(64, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '0') goto yy65;
|
||||
if (yych <= '1') goto yy66;
|
||||
goto yy13;
|
||||
yy65:
|
||||
YYDEBUG(65, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '0') goto yy13;
|
||||
if (yych <= '9') goto yy67;
|
||||
goto yy13;
|
||||
yy66:
|
||||
YYDEBUG(66, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '3') goto yy13;
|
||||
yy67:
|
||||
YYDEBUG(67, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '-') goto yy13;
|
||||
YYDEBUG(68, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '0') goto yy69;
|
||||
@@ -753,57 +820,73 @@ yy67:
|
||||
if (yych <= '3') goto yy71;
|
||||
goto yy13;
|
||||
yy69:
|
||||
YYDEBUG(69, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '0') goto yy13;
|
||||
if (yych <= '9') goto yy72;
|
||||
goto yy13;
|
||||
yy70:
|
||||
YYDEBUG(70, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy72;
|
||||
goto yy13;
|
||||
yy71:
|
||||
YYDEBUG(71, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '2') goto yy13;
|
||||
yy72:
|
||||
YYDEBUG(72, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != 'T') goto yy13;
|
||||
YYDEBUG(73, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '1') goto yy74;
|
||||
if (yych <= '2') goto yy75;
|
||||
goto yy13;
|
||||
yy74:
|
||||
YYDEBUG(74, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy76;
|
||||
goto yy13;
|
||||
yy75:
|
||||
YYDEBUG(75, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '5') goto yy13;
|
||||
yy76:
|
||||
YYDEBUG(76, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != ':') goto yy13;
|
||||
YYDEBUG(77, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '6') goto yy13;
|
||||
YYDEBUG(78, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(79, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != ':') goto yy13;
|
||||
YYDEBUG(80, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '6') goto yy13;
|
||||
YYDEBUG(81, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(82, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != 'Z') goto yy13;
|
||||
yy83:
|
||||
YYDEBUG(83, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(84, *YYCURSOR);
|
||||
#line 298 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
timelib_time *current;
|
||||
@@ -827,8 +910,9 @@ yy83:
|
||||
TIMELIB_DEINIT;
|
||||
return TIMELIB_ISO_DATE;
|
||||
}
|
||||
#line 831 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 914 "<stdout>"
|
||||
yy85:
|
||||
YYDEBUG(85, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '0') goto yy86;
|
||||
@@ -836,59 +920,74 @@ yy85:
|
||||
if (yych <= '3') goto yy88;
|
||||
goto yy13;
|
||||
yy86:
|
||||
YYDEBUG(86, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '0') goto yy13;
|
||||
if (yych <= '9') goto yy89;
|
||||
goto yy13;
|
||||
yy87:
|
||||
YYDEBUG(87, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy89;
|
||||
goto yy13;
|
||||
yy88:
|
||||
YYDEBUG(88, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '2') goto yy13;
|
||||
yy89:
|
||||
YYDEBUG(89, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != 'T') goto yy13;
|
||||
YYDEBUG(90, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '1') goto yy91;
|
||||
if (yych <= '2') goto yy92;
|
||||
goto yy13;
|
||||
yy91:
|
||||
YYDEBUG(91, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych <= '9') goto yy93;
|
||||
goto yy13;
|
||||
yy92:
|
||||
YYDEBUG(92, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '5') goto yy13;
|
||||
yy93:
|
||||
YYDEBUG(93, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '6') goto yy13;
|
||||
YYDEBUG(94, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(95, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= '6') goto yy13;
|
||||
YYDEBUG(96, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy13;
|
||||
if (yych >= ':') goto yy13;
|
||||
YYDEBUG(97, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == 'Z') goto yy83;
|
||||
goto yy13;
|
||||
yy98:
|
||||
YYDEBUG(98, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
YYDEBUG(99, *YYCURSOR);
|
||||
if (yych <= '/') goto yy100;
|
||||
if (yych <= '9') goto yy98;
|
||||
yy100:
|
||||
YYDEBUG(100, *YYCURSOR);
|
||||
#line 287 "ext/date/lib/parse_iso_intervals.re"
|
||||
{
|
||||
DEBUG_OUTPUT("recurrences");
|
||||
@@ -899,7 +998,7 @@ yy100:
|
||||
s->have_recurrences = 1;
|
||||
return TIMELIB_PERIOD;
|
||||
}
|
||||
#line 903 "ext/date/lib/parse_iso_intervals.c"
|
||||
#line 1002 "<stdout>"
|
||||
}
|
||||
#line 399 "ext/date/lib/parse_iso_intervals.re"
|
||||
|
||||
|
||||
+46
-6
@@ -658,6 +658,7 @@ static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n
|
||||
|
||||
zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
|
||||
void date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot);
|
||||
static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot);
|
||||
static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
|
||||
static void date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot);
|
||||
|
||||
@@ -921,6 +922,7 @@ PHP_MINFO_FUNCTION(date)
|
||||
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "date/time support", "enabled");
|
||||
php_info_print_table_row(2, "timelib version", TIMELIB_ASCII_VERSION);
|
||||
php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version);
|
||||
php_info_print_table_row(2, "Timezone Database", php_date_global_timezone_db_enabled ? "external" : "internal");
|
||||
php_info_print_table_row(2, "Default timezone", guess_timezone(tzdb));
|
||||
@@ -1944,6 +1946,10 @@ static void date_period_it_rewind(zend_object_iterator *iter)
|
||||
if (iterator->object->current) {
|
||||
timelib_time_dtor(iterator->object->current);
|
||||
}
|
||||
if (!iterator->object->start) {
|
||||
zend_throw_error(NULL, "DatePeriod has not been initialized correctly");
|
||||
return;
|
||||
}
|
||||
iterator->object->current = timelib_time_clone(iterator->object->start);
|
||||
date_period_it_invalidate_current(iter);
|
||||
}
|
||||
@@ -1998,7 +2004,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
zval *prop;
|
||||
int retval = 0;
|
||||
|
||||
if (Z_TYPE_P(member) != IS_STRING) {
|
||||
if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
|
||||
ZVAL_COPY(&tmp_member, member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
@@ -2014,10 +2020,10 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
prop = date_interval_read_property(object, member, type, cache_slot, &rv);
|
||||
|
||||
if (prop != NULL) {
|
||||
|
||||
prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
|
||||
|
||||
if (prop != &EG(uninitialized_zval)) {
|
||||
if (type == 2) {
|
||||
retval = 1;
|
||||
} else if (type == 1) {
|
||||
@@ -2124,7 +2130,7 @@ static void date_register_classes(void) /* {{{ */
|
||||
date_object_handlers_interval.read_property = date_interval_read_property;
|
||||
date_object_handlers_interval.write_property = date_interval_write_property;
|
||||
date_object_handlers_interval.get_properties = date_object_get_properties_interval;
|
||||
date_object_handlers_interval.get_property_ptr_ptr = NULL;
|
||||
date_object_handlers_interval.get_property_ptr_ptr = date_interval_get_property_ptr_ptr;
|
||||
date_object_handlers_interval.get_gc = date_object_get_gc_interval;
|
||||
|
||||
INIT_CLASS_ENTRY(ce_period, "DatePeriod", date_funcs_period);
|
||||
@@ -4210,6 +4216,40 @@ void date_interval_write_property(zval *object, zval *member, zval *value, void
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ date_interval_get_property_ptr_ptr */
|
||||
static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot)
|
||||
{
|
||||
zval tmp_member, *ret;
|
||||
|
||||
if (Z_TYPE_P(member) != IS_STRING) {
|
||||
tmp_member = *member;
|
||||
zval_copy_ctor(&tmp_member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
cache_slot = NULL;
|
||||
}
|
||||
|
||||
if(zend_binary_strcmp("y", sizeof("y") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("m", sizeof("m") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("d", sizeof("d") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("h", sizeof("h") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("i", sizeof("i") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("s", sizeof("s") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("days", sizeof("days") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("invert", sizeof("invert") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) {
|
||||
/* Fallback to read_property. */
|
||||
ret = NULL;
|
||||
} else {
|
||||
ret = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot);
|
||||
}
|
||||
|
||||
if (member == &tmp_member) {
|
||||
zval_dtor(member);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto DateInterval::__construct([string interval_spec])
|
||||
Creates new DateInterval object.
|
||||
|
||||
@@ -40,7 +40,7 @@ object(DateInterval)#%d (16) {
|
||||
["special_amount"]=>
|
||||
int(-1)
|
||||
["have_weekday_relative"]=>
|
||||
int(9)
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
int(0)
|
||||
["f"]=>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #74852 property_exists returns true on unknown DateInterval property
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$interval = new DateInterval('P2D');
|
||||
var_dump(property_exists($interval,'abcde'));
|
||||
var_dump(isset($interval->abcde));
|
||||
var_dump($interval->abcde);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Notice: Undefined property: DateInterval::$abcde in %s on line %d
|
||||
NULL
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #75002 Null Pointer Dereference in timelib_time_clone
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class aaa extends DatePeriod {
|
||||
public function __construct() { }
|
||||
}
|
||||
|
||||
$start=new DateTime( '2012-08-01' );
|
||||
|
||||
foreach (new aaa($start) as $y) {
|
||||
$a=$key;
|
||||
}
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: DatePeriod has not been initialized correctly in %sbug75002.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug75002.php on line %d
|
||||
@@ -34,14 +34,14 @@ foreach ( $tests as $start => $data )
|
||||
echo "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Sat, 23 Oct 2010 00:00:00 +0000
|
||||
Fri, 15 Oct 2010 23:00:00 +0000
|
||||
Wed, 15 Dec 2010 16:15:00 +0000
|
||||
Mon, 20 Dec 2010 00:00:00 +0000
|
||||
Mon, 20 Dec 2010 10:00:00 +0000
|
||||
Tue, 21 Dec 2010 12:00:00 +0000
|
||||
Mon, 03 Jan 2011 00:00:00 +0000
|
||||
Mon, 03 Jan 2011 09:00:00 +0000
|
||||
Sat, 23 Oct 2010 00:00:00 +0100
|
||||
Fri, 15 Oct 2010 23:00:00 +0100
|
||||
Sun, 28 Mar 2010 00:15:00 +0000
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
Sun, 28 Mar 2010 02:15:00 +0100
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Test DateInterval props with dimension handling
|
||||
--FILE--
|
||||
<?php
|
||||
class Z extends DateInterval{}
|
||||
$z = new Z('P2Y4DT6H8M');
|
||||
$i = 0;
|
||||
$z->prop[1]=10;
|
||||
while ($i < 1026) {
|
||||
$z->prop[$i] = $i;
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
==NOCRASH==
|
||||
--EXPECT--
|
||||
==NOCRASH==
|
||||
@@ -5,7 +5,7 @@ Test 5: HTML Test
|
||||
--FILE--
|
||||
<?php
|
||||
$dom = new domdocument;
|
||||
$dom->loadHTMLFile(dirname(__FILE__)."/test.html");
|
||||
$dom->loadHTMLFile(dirname(__FILE__)."/test.html", LIBXML_NOBLANKS);
|
||||
print "--- save as XML\n";
|
||||
|
||||
print adjustDoctype($dom->saveXML());
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Test exif_read_data on unavailable file
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
$infile = dirname(__FILE__).'/bug73115.JPG';
|
||||
exif_read_data($infile);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(): Unable to open file in %sexif_read_data_0.php on line %d
|
||||
===DONE===
|
||||
|
||||
Binary file not shown.
@@ -1,16 +1,38 @@
|
||||
--TEST--
|
||||
Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . '/skipif.inc');
|
||||
|
||||
if (ini_get("default_charset") != "UTF-8") {
|
||||
die("skip require default_charset == UTF-8");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647私はガラスを食べられます.mov";
|
||||
$src = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647.mov";
|
||||
|
||||
$f_base = "67647私はガラスを食べられます.mov";
|
||||
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base;
|
||||
|
||||
/* Streams mb path support is tested a lot elsewhere. Copy the existing file
|
||||
therefore, avoid duplication in the repo. */
|
||||
if (!copy($src, $f) || empty(glob($f))) {
|
||||
die("failed to copy '$src' to '$f'");
|
||||
}
|
||||
|
||||
$fi = new finfo(FILEINFO_MIME_TYPE);
|
||||
var_dump($fi->file($f));
|
||||
|
||||
?>
|
||||
+++DONE+++
|
||||
--CLEAN--
|
||||
<?php
|
||||
$f_base = "67647私はガラスを食べられます.mov";
|
||||
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base;
|
||||
unlink($f);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(15) "video/quicktime"
|
||||
+++DONE+++
|
||||
|
||||
@@ -53,12 +53,17 @@ int gdImageGrayScale(gdImagePtr src)
|
||||
int new_pxl, pxl;
|
||||
typedef int (*FuncPtr)(gdImagePtr, int, int);
|
||||
FuncPtr f;
|
||||
int alpha_blending;
|
||||
|
||||
f = GET_PIXEL_FUNCTION(src);
|
||||
|
||||
if (src==NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
alpha_blending = src->alphaBlendingFlag;
|
||||
gdImageAlphaBlending(src, gdEffectReplace);
|
||||
|
||||
for (y=0; y<src->sy; ++y) {
|
||||
for (x=0; x<src->sx; ++x) {
|
||||
pxl = f (src, x, y);
|
||||
@@ -75,6 +80,8 @@ int gdImageGrayScale(gdImagePtr src)
|
||||
gdImageSetPixel (src, x, y, new_pxl);
|
||||
}
|
||||
}
|
||||
gdImageAlphaBlending(src, alpha_blending);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,9 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */
|
||||
int haveGlobalColormap;
|
||||
gdImagePtr im = 0;
|
||||
|
||||
memset(ColorMap, 0, 3 * MAXCOLORMAPSIZE);
|
||||
memset(localColorMap, 0, 3 * MAXCOLORMAPSIZE);
|
||||
|
||||
/*1.4//imageNumber = 1; */
|
||||
if (! ReadOK(fd,buf,6)) {
|
||||
return 0;
|
||||
|
||||
@@ -1783,8 +1783,8 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b
|
||||
|
||||
const gdFixed f_slop_y = f_sin;
|
||||
const gdFixed f_slop_x = f_cos;
|
||||
const gdFixed f_slop = f_slop_x > 0 && f_slop_x > 0 ?
|
||||
f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)
|
||||
const gdFixed f_slop = f_slop_x > 0 && f_slop_y > 0 ?
|
||||
(f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y))
|
||||
: 0;
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 384 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -1,5 +1,9 @@
|
||||
--TEST--
|
||||
(Bug #74031) ReflectionFunction for imagepng returns wrong number of parameters
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available\n");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #74435 (Buffer over-read into uninitialized memory)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreatefromgif(__DIR__ . DIRECTORY_SEPARATOR . 'bug74435.gif');
|
||||
var_dump($im);
|
||||
$width = imagesx($im);
|
||||
$height = imagesy($im);
|
||||
for ($i = 0; $i < $width; $i += 16) {
|
||||
for ($j = 0; $j < $height; $j += 16) {
|
||||
if (($index = imagecolorat($im, $i, $j)) >= 2) {
|
||||
list($red, $green, $blue, $alpha) = array_values(imagecolorsforindex($im, $index));
|
||||
if ($red !== 0 || $green !== 0 || $blue !== 0 || $alpha !== 0) {
|
||||
echo "unexpected color at ($i, $j)\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
resource(%d) of type (gd)
|
||||
===DONE===
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #75124 (gdImageGrayScale() may produce colors)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('gd extension not available');
|
||||
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<')) {
|
||||
die('skip only for bundled libgd or external libgd >= 2.2.5');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreatefrompng(__DIR__ . '/bug75124.png');
|
||||
var_dump(imageistruecolor($im));
|
||||
imagefilter($im, IMG_FILTER_GRAYSCALE);
|
||||
for ($i = 0, $width = imagesx($im); $i < $width; $i ++) {
|
||||
for ($j = 0, $height = imagesy($im); $j < $height; $j++) {
|
||||
$color = imagecolorat($im, $i, $j);
|
||||
$red = ($color >> 16) & 0xff;
|
||||
$green = ($color >> 8) & 0xff;
|
||||
$blue = $color & 0xff;
|
||||
if ($red != $green || $green != $blue) {
|
||||
echo "non grayscale pixel detected\n";
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
===DONE===
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -161,16 +161,16 @@ PHP_MINFO_FUNCTION(php_gettext)
|
||||
Set the textdomain to "domain". Returns the current domain */
|
||||
PHP_NAMED_FUNCTION(zif_textdomain)
|
||||
{
|
||||
char *domain, *domain_name, *retval;
|
||||
size_t domain_len;
|
||||
char *domain = NULL, *domain_name, *retval;
|
||||
size_t domain_len = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &domain, &domain_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!", &domain, &domain_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
PHP_GETTEXT_DOMAIN_LENGTH_CHECK
|
||||
|
||||
if (strcmp(domain, "") && strcmp(domain, "0")) {
|
||||
if (domain != NULL && strcmp(domain, "") && strcmp(domain, "0")) {
|
||||
domain_name = domain;
|
||||
} else {
|
||||
domain_name = NULL;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #73730 (textdomain(null) throws in strict mode)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gettext')) die('skip gettext extension is not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
var_dump(textdomain(null));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(8) "messages"
|
||||
===DONE===
|
||||
@@ -39,7 +39,7 @@ static inline unsigned char idx(unsigned char x, unsigned char y) {
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
static inline uint64_t load64(const unsigned char* x) {
|
||||
char i;
|
||||
signed char i;
|
||||
uint64_t ret = 0;
|
||||
for (i = 7; i >= 0; --i) {
|
||||
ret <<= 8;
|
||||
|
||||
@@ -469,17 +469,6 @@ void calendar_register_IntlCalendar_class(void)
|
||||
Calendar_handlers.get_debug_info = Calendar_get_debug_info;
|
||||
Calendar_handlers.free_obj = Calendar_objects_free;
|
||||
|
||||
/* Create and register 'IntlGregorianCalendar' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
|
||||
GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
Calendar_ce_ptr);
|
||||
if (!GregorianCalendar_ce_ptr) {
|
||||
//can't happen know without bigger problems before
|
||||
php_error_docref0(NULL, E_ERROR,
|
||||
"IntlGregorianCalendar: class registration has failed.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Declare 'IntlCalendar' class constants */
|
||||
#define CALENDAR_DECL_LONG_CONST(name, val) \
|
||||
zend_declare_class_constant_long(Calendar_ce_ptr, name, sizeof(name) - 1, \
|
||||
@@ -531,5 +520,16 @@ void calendar_register_IntlCalendar_class(void)
|
||||
CALENDAR_DECL_LONG_CONST("WALLTIME_LAST", UCAL_WALLTIME_LAST);
|
||||
CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID);
|
||||
#endif
|
||||
|
||||
/* Create and register 'IntlGregorianCalendar' class. */
|
||||
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
|
||||
GregorianCalendar_ce_ptr = zend_register_internal_class_ex(&ce,
|
||||
Calendar_ce_ptr);
|
||||
if (!GregorianCalendar_ce_ptr) {
|
||||
//can't happen know without bigger problems before
|
||||
php_error_docref0(NULL, E_ERROR,
|
||||
"IntlGregorianCalendar: class registration has failed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -59,8 +59,12 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2)
|
||||
zval norm1, norm2;
|
||||
zval *num1_p = NULL, *num2_p = NULL;
|
||||
zval *norm1_p = NULL, *norm2_p = NULL;
|
||||
zval* str1_p = collator_convert_object_to_string( op1, &str1 );
|
||||
zval* str2_p = collator_convert_object_to_string( op2, &str2 );
|
||||
zval *str1_p, *str2_p;
|
||||
|
||||
ZVAL_NULL(&str1);
|
||||
str1_p = collator_convert_object_to_string( op1, &str1 );
|
||||
ZVAL_NULL(&str2);
|
||||
str2_p = collator_convert_object_to_string( op2, &str2 );
|
||||
|
||||
/* If both args are strings AND either of args is not numeric string
|
||||
* then use ICU-compare. Otherwise PHP-compare. */
|
||||
|
||||
@@ -897,7 +897,7 @@ static PHP_METHOD(UConverter, getAvailable) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array UConverter::getAliases(string name) */
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 1)
|
||||
ZEND_ARG_INFO(0, name)
|
||||
ZEND_END_ARG_INFO();
|
||||
static PHP_METHOD(UConverter, getAliases) {
|
||||
|
||||
+25
-25
@@ -173,6 +173,24 @@ ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_currency_arginfo, 0, 0, 3)
|
||||
ZEND_ARG_INFO(1, position)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_get_loc_in_loc_args, 0, ZEND_RETURN_VALUE, 1 )
|
||||
ZEND_ARG_INFO(0, locale)
|
||||
ZEND_ARG_INFO(0, in_locale)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_filter_matches_args, 0, ZEND_RETURN_VALUE, 2 )
|
||||
ZEND_ARG_INFO(0, langtag)
|
||||
ZEND_ARG_INFO(0, locale)
|
||||
ZEND_ARG_INFO(0, canonicalize)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_lookup_args, 0, ZEND_RETURN_VALUE, 2 )
|
||||
ZEND_ARG_INFO(0, langtag)
|
||||
ZEND_ARG_INFO(0, locale)
|
||||
ZEND_ARG_INFO(0, canonicalize)
|
||||
ZEND_ARG_INFO(0, def)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(locale_0_args, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
@@ -180,24 +198,6 @@ ZEND_BEGIN_ARG_INFO_EX(locale_1_arg, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, arg1)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(locale_2_args, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, arg1)
|
||||
ZEND_ARG_INFO(0, arg2)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(locale_3_args, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, arg1)
|
||||
ZEND_ARG_INFO(0, arg2)
|
||||
ZEND_ARG_INFO(0, arg3)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(locale_4_args, 0, 0, 4)
|
||||
ZEND_ARG_INFO(0, arg1)
|
||||
ZEND_ARG_INFO(0, arg2)
|
||||
ZEND_ARG_INFO(0, arg3)
|
||||
ZEND_ARG_INFO(0, arg4)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define intl_0_args collator_static_0_args
|
||||
#define intl_1_arg collator_static_1_arg
|
||||
|
||||
@@ -670,17 +670,17 @@ zend_function_entry intl_functions[] = {
|
||||
PHP_FE( locale_get_script, locale_1_arg )
|
||||
PHP_FE( locale_get_region, locale_1_arg )
|
||||
PHP_FE( locale_get_keywords, locale_1_arg )
|
||||
PHP_FE( locale_get_display_script, locale_2_args )
|
||||
PHP_FE( locale_get_display_region, locale_2_args )
|
||||
PHP_FE( locale_get_display_name, locale_2_args )
|
||||
PHP_FE( locale_get_display_language, locale_2_args)
|
||||
PHP_FE( locale_get_display_variant, locale_2_args )
|
||||
PHP_FE( locale_get_display_script, locale_get_loc_in_loc_args )
|
||||
PHP_FE( locale_get_display_region, locale_get_loc_in_loc_args )
|
||||
PHP_FE( locale_get_display_name, locale_get_loc_in_loc_args )
|
||||
PHP_FE( locale_get_display_language, locale_get_loc_in_loc_args)
|
||||
PHP_FE( locale_get_display_variant, locale_get_loc_in_loc_args )
|
||||
PHP_FE( locale_compose, locale_1_arg )
|
||||
PHP_FE( locale_parse, locale_1_arg )
|
||||
PHP_FE( locale_get_all_variants, locale_1_arg )
|
||||
PHP_FE( locale_filter_matches, locale_3_args )
|
||||
PHP_FE( locale_filter_matches, locale_filter_matches_args )
|
||||
PHP_FE( locale_canonicalize, locale_1_arg )
|
||||
PHP_FE( locale_lookup, locale_4_args )
|
||||
PHP_FE( locale_lookup, locale_lookup_args )
|
||||
PHP_FE( locale_accept_from_http, locale_1_arg )
|
||||
|
||||
/* MessageFormatter functions */
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #75090 Constants of parent IntlCalendar class not inherited
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo extends IntlCalendar {}
|
||||
|
||||
$fooRef = new ReflectionClass(Foo::class);
|
||||
$intlGregorianCalendarRef = new ReflectionClass(IntlGregorianCalendar::class);
|
||||
$intlCalendarRef = new ReflectionClass(IntlCalendar::class);
|
||||
|
||||
var_dump(
|
||||
count($fooRef->getConstants()) === count($intlCalendarRef->getConstants()),
|
||||
count($intlGregorianCalendarRef->getConstants()) === count($intlCalendarRef->getConstants())
|
||||
);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
===DONE===
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #75193 segfault in collator_convert_object_to_string
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new \Collator('en_US');
|
||||
$b = [new stdclass, new stdclass];
|
||||
var_dump($a->sort($b));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
===DONE===
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #75318 (The parameter of UConverter::getAliases() is not optional)
|
||||
--SKIP--
|
||||
<?php
|
||||
if (!extension_loaded('intl')) die('skip intl extension is not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod('UConverter', 'getAliases');
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
===DONE===
|
||||
@@ -0,0 +1,73 @@
|
||||
--TEST--
|
||||
Bug #74993 Wrong reflection on some locale_* functions
|
||||
--SKIPIF--
|
||||
<?php
|
||||
extension_loaded('intl') || print 'skip';
|
||||
--FILE--
|
||||
<?php
|
||||
$funcs = [
|
||||
'locale_get_display_language',
|
||||
'locale_get_display_name',
|
||||
'locale_get_display_region',
|
||||
'locale_get_display_script',
|
||||
'locale_get_display_variant',
|
||||
'locale_filter_matches',
|
||||
'locale_lookup',
|
||||
];
|
||||
|
||||
foreach ($funcs as $func) {
|
||||
echo (new ReflectionFunction($func));
|
||||
}
|
||||
--EXPECT--
|
||||
Function [ <internal:intl> function locale_get_display_language ] {
|
||||
|
||||
- Parameters [2] {
|
||||
Parameter #0 [ <required> $locale ]
|
||||
Parameter #1 [ <optional> $in_locale ]
|
||||
}
|
||||
}
|
||||
Function [ <internal:intl> function locale_get_display_name ] {
|
||||
|
||||
- Parameters [2] {
|
||||
Parameter #0 [ <required> $locale ]
|
||||
Parameter #1 [ <optional> $in_locale ]
|
||||
}
|
||||
}
|
||||
Function [ <internal:intl> function locale_get_display_region ] {
|
||||
|
||||
- Parameters [2] {
|
||||
Parameter #0 [ <required> $locale ]
|
||||
Parameter #1 [ <optional> $in_locale ]
|
||||
}
|
||||
}
|
||||
Function [ <internal:intl> function locale_get_display_script ] {
|
||||
|
||||
- Parameters [2] {
|
||||
Parameter #0 [ <required> $locale ]
|
||||
Parameter #1 [ <optional> $in_locale ]
|
||||
}
|
||||
}
|
||||
Function [ <internal:intl> function locale_get_display_variant ] {
|
||||
|
||||
- Parameters [2] {
|
||||
Parameter #0 [ <required> $locale ]
|
||||
Parameter #1 [ <optional> $in_locale ]
|
||||
}
|
||||
}
|
||||
Function [ <internal:intl> function locale_filter_matches ] {
|
||||
|
||||
- Parameters [3] {
|
||||
Parameter #0 [ <required> $langtag ]
|
||||
Parameter #1 [ <required> $locale ]
|
||||
Parameter #2 [ <optional> $canonicalize ]
|
||||
}
|
||||
}
|
||||
Function [ <internal:intl> function locale_lookup ] {
|
||||
|
||||
- Parameters [4] {
|
||||
Parameter #0 [ <required> $langtag ]
|
||||
Parameter #1 [ <required> $locale ]
|
||||
Parameter #2 [ <optional> $canonicalize ]
|
||||
Parameter #3 [ <optional> $def ]
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,8 @@ echo $orstr,"\n";
|
||||
echo $new_str,"\n";
|
||||
echo $recovstr,"\n";
|
||||
|
||||
var_dump(($orstr == $recovstr) == $recovstr2);
|
||||
var_dump($orstr === $recovstr);
|
||||
var_dump($orstr === $recovstr2);
|
||||
|
||||
echo "Done.\n";
|
||||
--EXPECT--
|
||||
@@ -29,4 +30,5 @@ echo "Done.\n";
|
||||
ōshanbyū
|
||||
オーシャンビュー
|
||||
bool(true)
|
||||
bool(true)
|
||||
Done.
|
||||
+1
-1
@@ -17,6 +17,6 @@ if (PHP_JSON != "no") {
|
||||
|
||||
ADD_SOURCES(configure_module_dirname, "json_encoder.c json_parser.tab.c json_scanner.c", "json");
|
||||
|
||||
PHP_INSTALL_HEADERS("ext/json/", "php_json.h");
|
||||
PHP_INSTALL_HEADERS("ext/json/", "php_json.h php_json_parser.h php_json_scanner.h");
|
||||
}
|
||||
|
||||
@@ -1546,3 +1546,4 @@ xmlXPtrRangeToFunction
|
||||
xmlXPtrWrapLocationSet
|
||||
xmlBufContent
|
||||
xmlBufUse
|
||||
xmlBufferDetach
|
||||
@@ -88,7 +88,8 @@ const struct mbfl_convert_vtbl vtbl_html_wchar = {
|
||||
mbfl_filt_conv_html_dec_ctor,
|
||||
mbfl_filt_conv_html_dec_dtor,
|
||||
mbfl_filt_conv_html_dec,
|
||||
mbfl_filt_conv_html_dec_flush };
|
||||
mbfl_filt_conv_html_dec_flush,
|
||||
mbfl_filt_conv_html_dec_copy };
|
||||
|
||||
|
||||
#define CK(statement) do { if ((statement) < 0) return (-1); } while (0)
|
||||
@@ -309,4 +310,9 @@ int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter)
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
void mbfl_filt_conv_html_dec_copy(mbfl_convert_filter *src, mbfl_convert_filter *dest)
|
||||
{
|
||||
*dest = *src;
|
||||
dest->opaque = mbfl_malloc(html_enc_buffer_size+1);
|
||||
memcpy(dest->opaque, src->opaque, html_enc_buffer_size+1);
|
||||
}
|
||||
@@ -42,6 +42,7 @@ int mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter);
|
||||
int mbfl_filt_conv_html_enc_flush(mbfl_convert_filter *filter);
|
||||
int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter);
|
||||
int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter);
|
||||
void mbfl_filt_conv_html_dec_copy(mbfl_convert_filter *src, mbfl_convert_filter *dest);
|
||||
void mbfl_filt_conv_html_dec_ctor(mbfl_convert_filter *filter);
|
||||
void mbfl_filt_conv_html_dec_dtor(mbfl_convert_filter *filter);
|
||||
|
||||
|
||||
@@ -222,11 +222,11 @@ mbfl_filt_tl_jisx0201_jisx0208(int c, mbfl_convert_filter *filt)
|
||||
} else if (mode & (MBFL_FILT_TL_ZEN2HAN_HIRA2KANA
|
||||
| MBFL_FILT_TL_ZEN2HAN_KANA2HIRA)) {
|
||||
if ((mode & MBFL_FILT_TL_ZEN2HAN_HIRA2KANA) &&
|
||||
c >= 0x3041 && c <= 0x3093) {
|
||||
((c >= 0x3041 && c <= 0x3093) || c == 0x309d || c == 0x309e)) {
|
||||
/* Zenkaku hirangana to Zenkaku katakana */
|
||||
s = c + 0x60;
|
||||
} else if ((mode & MBFL_FILT_TL_ZEN2HAN_KANA2HIRA) &&
|
||||
c >= 0x30a1 && c <= 0x30f3) {
|
||||
((c >= 0x30a1 && c <= 0x30f3) || c == 0x30fd || c == 0x30fe)) {
|
||||
/* Zenkaku katakana to Zenkaku hirangana */
|
||||
s = c - 0x60;
|
||||
}
|
||||
|
||||
@@ -457,6 +457,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_eregi_replace, 0, 0, 3)
|
||||
ZEND_ARG_INFO(0, pattern)
|
||||
ZEND_ARG_INFO(0, replacement)
|
||||
ZEND_ARG_INFO(0, string)
|
||||
ZEND_ARG_INFO(0, option)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_replace_callback, 0, 0, 3)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #62934: mb_convert_kana() does not convert iteration marks
|
||||
--FILE--
|
||||
<?php
|
||||
echo mb_convert_kana('あゝすゞめアヽスヾメ', 'C', 'UTF-8') . "\n";
|
||||
echo mb_convert_kana('あゝすゞめアヽスヾメ', 'c', 'UTF-8') . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
アヽスヾメアヽスヾメ
|
||||
あゝすゞめあゝすゞめ
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #71606 (Segmentation fault mb_strcut + mb_list_encodings)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('mbstring')) die('skip ext/mbstring not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo mb_strcut('"', 0, 0, 'HTML-ENTITIES');
|
||||
echo 'DONE', PHP_EOL;
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -89,7 +89,7 @@ static php_stream_filter_status_t php_mcrypt_filter(
|
||||
php_stream_bucket_delref(bucket);
|
||||
} else {
|
||||
/* Stream cipher */
|
||||
php_stream_bucket_make_writeable(bucket);
|
||||
bucket = php_stream_bucket_make_writeable(bucket);
|
||||
if (data->encrypt) {
|
||||
mcrypt_generic(data->module, bucket->buf, (int)bucket->buflen);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #72535 arcfour encryption stream filter crashes php
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$passphrase = 'My secret';
|
||||
$plaintext = 'Secret secret secret data';
|
||||
|
||||
$iv = substr(md5('iv' . $passphrase, true), 0, 8);
|
||||
$key = substr(md5('pass1' . $passphrase, true) .
|
||||
md5('pass2' . $passphrase, true), 0, 24);
|
||||
$opts = array('iv' => $iv, 'key' => $key, 'mode' => 'stream');
|
||||
|
||||
$expected = substr($plaintext . $plaintext, 0, 48);
|
||||
|
||||
$fp = fopen('php://memory', 'wb+');
|
||||
stream_filter_append($fp, 'mcrypt.arcfour', STREAM_FILTER_WRITE, $opts);
|
||||
fwrite($fp, $plaintext);
|
||||
?>
|
||||
==NOCRASH==
|
||||
--EXPECTF--
|
||||
Deprecated: stream_filter_append(): mcrypt and mdecrypt stream filters have been deprecated in %s on line %d
|
||||
==NOCRASH==
|
||||
+7
-2
@@ -1149,7 +1149,7 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend
|
||||
{
|
||||
#if !defined(MYSQLI_USE_MYSQLND)
|
||||
MYSQL_ROW row;
|
||||
unsigned int i;
|
||||
unsigned int i, num_fields;
|
||||
MYSQL_FIELD *fields;
|
||||
zend_ulong *field_len;
|
||||
|
||||
@@ -1163,8 +1163,9 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend
|
||||
|
||||
array_init(return_value);
|
||||
field_len = mysql_fetch_lengths(result);
|
||||
num_fields = mysql_num_fields(result);
|
||||
|
||||
for (i = 0; i < mysql_num_fields(result); i++) {
|
||||
for (i = 0; i < num_fields; i++) {
|
||||
if (row[i]) {
|
||||
zval res;
|
||||
|
||||
@@ -1244,6 +1245,10 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
|
||||
php_error_docref(NULL, E_WARNING, "Could not find class '%s'", ZSTR_VAL(class_name));
|
||||
return;
|
||||
}
|
||||
if (UNEXPECTED(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) {
|
||||
zend_throw_error(NULL, "Class '%s' cannot be instantiated", ZSTR_VAL(ce->name));
|
||||
return;
|
||||
}
|
||||
fetchtype = MYSQLI_ASSOC;
|
||||
} else {
|
||||
if (override_flags) {
|
||||
|
||||
@@ -1210,7 +1210,7 @@ PHP_FUNCTION(mysqli_fetch_fields)
|
||||
zval *mysql_result;
|
||||
zval obj;
|
||||
|
||||
unsigned int i;
|
||||
unsigned int i, num_fields;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) {
|
||||
return;
|
||||
@@ -1219,8 +1219,9 @@ PHP_FUNCTION(mysqli_fetch_fields)
|
||||
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
|
||||
|
||||
array_init(return_value);
|
||||
num_fields = mysql_num_fields(result);
|
||||
|
||||
for (i = 0; i < mysql_num_fields(result); i++) {
|
||||
for (i = 0; i < num_fields; i++) {
|
||||
const MYSQL_FIELD *field = mysql_fetch_field_direct(result, i);
|
||||
|
||||
object_init(&obj);
|
||||
@@ -1266,7 +1267,7 @@ PHP_FUNCTION(mysqli_fetch_lengths)
|
||||
{
|
||||
MYSQL_RES *result;
|
||||
zval *mysql_result;
|
||||
unsigned int i;
|
||||
unsigned int i, num_fields;
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
const size_t *ret;
|
||||
#else
|
||||
@@ -1284,8 +1285,9 @@ PHP_FUNCTION(mysqli_fetch_lengths)
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
num_fields = mysql_num_fields(result);
|
||||
|
||||
for (i = 0; i < mysql_num_fields(result); i++) {
|
||||
for (i = 0; i < num_fields; i++) {
|
||||
add_index_long(return_value, i, ret[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
$mysqli = new mysqli("$host:$port", $user, $passwd, $db);
|
||||
abstract class test {
|
||||
public $a;
|
||||
}
|
||||
$mysqli->query("SELECT 1 as a")->fetch_object("test");
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Class 'test' cannot be instantiated in %sbug74968.php:%d
|
||||
Stack trace:
|
||||
#0 %sbug74968.php(%d): mysqli_result->fetch_object('test')
|
||||
#1 {main}
|
||||
thrown in %sbug74968.php on line %d
|
||||
@@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
Bug #75018 Data corruption when reading fields of bit type
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
$mysqli = new mysqli("$host:$port", $user, $passwd, $db);
|
||||
|
||||
$tbl = "test_bug75018";
|
||||
$sql = "DROP TABLE IF EXISTS $tbl";
|
||||
$mysqli->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE $tbl (bit_column_1 bit(16) NOT NULL) DEFAULT CHARSET=utf8";
|
||||
$mysqli->query($sql);
|
||||
|
||||
$sql = "INSERT INTO $tbl (bit_column_1) VALUES (0)";
|
||||
$mysqli->query($sql);
|
||||
$sql = "INSERT INTO $tbl (bit_column_1) VALUES (0b10101010101)";
|
||||
$mysqli->query($sql);
|
||||
|
||||
$sql = "SELECT bit_column_1 FROM $tbl";
|
||||
$result = $mysqli->query($sql);
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
var_dump($row['bit_column_1']);
|
||||
}
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
string(1) "0"
|
||||
string(4) "1365"
|
||||
==DONE==
|
||||
@@ -38,7 +38,7 @@ if (!$IS_MYSQLND)
|
||||
|
||||
function poll_async($offset, $link, $links, $errors, $reject, $exp_ready, $use_oo_syntax) {
|
||||
|
||||
if ($exp_ready !== ($tmp = mysqli_poll($links, $errors, $reject, 0, 1000)))
|
||||
if ($exp_ready !== ($tmp = mysqli_poll($links, $errors, $reject, 0, 2000)))
|
||||
printf("[%03d + 1] There should be %d links ready to read from, %d ready\n",
|
||||
$offset, $exp_ready, $tmp);
|
||||
|
||||
|
||||
@@ -1761,7 +1761,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
|
||||
if (Z_TYPE_P(current_field) == IS_LONG && !as_int_or_float) {
|
||||
/* we are using the text protocol, so convert to string */
|
||||
char tmp[22];
|
||||
const size_t tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, Z_LVAL_P(current_field));
|
||||
const size_t tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, (uint64_t) Z_LVAL_P(current_field));
|
||||
ZVAL_STRINGL(current_field, tmp, tmp_len);
|
||||
} else if (Z_TYPE_P(current_field) == IS_STRING) {
|
||||
/* nothing to do here, as we want a string and ps_fetch_from_1_to_8_bytes() has given us one */
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ if (PHP_OCI8 != "no") {
|
||||
if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", oci8_inc_paths) &&
|
||||
CHECK_LIB("oci.lib", "oci8", oci8_lib_paths))
|
||||
{
|
||||
EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c');
|
||||
EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c');
|
||||
|
||||
AC_DEFINE('HAVE_OCI8', 1);
|
||||
AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
|
||||
|
||||
+13
-5
@@ -509,6 +509,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_register_taf_callback, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, connection_resource)
|
||||
ZEND_ARG_INFO(0, function_name)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_unregister_taf_callback, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, connection_resource)
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ LOB Method arginfo */
|
||||
@@ -707,6 +711,7 @@ PHP_FUNCTION(oci_collection_size);
|
||||
PHP_FUNCTION(oci_collection_max);
|
||||
PHP_FUNCTION(oci_collection_trim);
|
||||
PHP_FUNCTION(oci_register_taf_callback);
|
||||
PHP_FUNCTION(oci_unregister_taf_callback);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ extension definition structures
|
||||
@@ -790,6 +795,7 @@ static const zend_function_entry php_oci_functions[] = {
|
||||
PHP_FE(oci_collection_trim, arginfo_oci_collection_trim)
|
||||
PHP_FE(oci_new_collection, arginfo_oci_new_collection)
|
||||
PHP_FE(oci_register_taf_callback, arginfo_oci_register_taf_callback)
|
||||
PHP_FE(oci_unregister_taf_callback, arginfo_oci_unregister_taf_callback)
|
||||
|
||||
PHP_FALIAS(oci_free_cursor, oci_free_statement, arginfo_oci_free_statement)
|
||||
PHP_FALIAS(ocifreecursor, oci_free_statement, arginfo_oci_free_statement)
|
||||
@@ -1396,6 +1402,8 @@ void php_oci_define_hash_dtor(zval *data)
|
||||
define->name = NULL;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&define->val);
|
||||
|
||||
efree(define);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1408,9 +1416,9 @@ void php_oci_bind_hash_dtor(zval *data)
|
||||
{
|
||||
php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data);
|
||||
|
||||
if (!Z_ISUNDEF(bind->parameter)) {
|
||||
zval_ptr_dtor(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
if (!Z_ISUNDEF(bind->val)) {
|
||||
zval_ptr_dtor(&bind->val);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
}
|
||||
|
||||
if (bind->array.elements) {
|
||||
@@ -2636,7 +2644,7 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
|
||||
if (placeholder == NULL) {
|
||||
placeholder = return_value;
|
||||
} else {
|
||||
zval_dtor(placeholder);
|
||||
zval_ptr_dtor(placeholder);
|
||||
}
|
||||
|
||||
array_init(placeholder);
|
||||
@@ -2702,7 +2710,7 @@ static int php_oci_persistent_helper(zval *zv)
|
||||
|
||||
/* Remove TAF callback function as it's bound to current request */
|
||||
if (connection->used_this_request && !Z_ISUNDEF(connection->taf_callback) && !Z_ISNULL(connection->taf_callback)) {
|
||||
php_oci_disable_taf_callback(connection);
|
||||
php_oci_unregister_taf_callback(connection);
|
||||
}
|
||||
|
||||
if (!connection->used_this_request && OCI_G(persistent_timeout) != -1) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
|
||||
+18
-17
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2016 The PHP Group |
|
||||
| Copyright (c) 1997-2017 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 |
|
||||
@@ -42,27 +42,28 @@
|
||||
|
||||
/* {{{ callback_fn()
|
||||
OCI TAF callback function, calling userspace function */
|
||||
sb4 callback_fn(OCISvcCtx *svchp, OCIEnv *envhp, php_oci_connection *fo_ctx, ub4 fo_type, ub4 fo_event)
|
||||
sb4 callback_fn(void *svchp, void *envhp, void *fo_ctx, ub4 fo_type, ub4 fo_event)
|
||||
{
|
||||
/* Create zval */
|
||||
zval retval, params[3];
|
||||
php_oci_connection *connection = (php_oci_connection*)fo_ctx;
|
||||
|
||||
/* Default return value */
|
||||
sb4 returnValue = 0;
|
||||
|
||||
/* Check if userspace callback function was disabled */
|
||||
if (Z_ISUNDEF(fo_ctx->taf_callback) || Z_ISNULL(fo_ctx->taf_callback)) {
|
||||
/* Check if userspace callback function was unregistered */
|
||||
if (Z_ISUNDEF(connection->taf_callback) || Z_ISNULL(connection->taf_callback)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Initialize zval */
|
||||
ZVAL_RES(¶ms[0], fo_ctx->id);
|
||||
ZVAL_RES(¶ms[0], connection->id);
|
||||
ZVAL_LONG(¶ms[1], fo_event);
|
||||
ZVAL_LONG(¶ms[2], fo_type);
|
||||
|
||||
/* Call user function (if possible) */
|
||||
if (call_user_function(EG(function_table), NULL, &fo_ctx->taf_callback, &retval, 3, params) == FAILURE) {
|
||||
php_error_docref(NULL, E_WARNING, "Unable to call taf callback function, is it defined?");
|
||||
if (call_user_function(EG(function_table), NULL, &connection->taf_callback, &retval, 3, params) == FAILURE) {
|
||||
php_error_docref(NULL, E_WARNING, "Unable to call Oracle TAF callback function");
|
||||
}
|
||||
|
||||
/* Set return value */
|
||||
@@ -74,19 +75,19 @@ sb4 callback_fn(OCISvcCtx *svchp, OCIEnv *envhp, php_oci_connection *fo_ctx, ub4
|
||||
ZVAL_NULL(¶ms[0]);
|
||||
|
||||
/* Cleanup */
|
||||
zval_dtor(&retval);
|
||||
zval_dtor(¶ms[0]);
|
||||
zval_dtor(¶ms[1]);
|
||||
zval_dtor(¶ms[2]);
|
||||
zval_ptr_dtor(&retval);
|
||||
zval_ptr_dtor(¶ms[0]);
|
||||
zval_ptr_dtor(¶ms[1]);
|
||||
zval_ptr_dtor(¶ms[2]);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_oci_disable_taf_callback()
|
||||
Disables the userspace callback function for Oracle TAF,
|
||||
/* {{{ php_oci_unregister_taf_callback()
|
||||
Unregister the userspace callback function for Oracle TAF,
|
||||
while keeping the OCI callback alive */
|
||||
int php_oci_disable_taf_callback(php_oci_connection *connection)
|
||||
int php_oci_unregister_taf_callback(php_oci_connection *connection)
|
||||
{
|
||||
return php_oci_register_taf_callback(connection, NULL);
|
||||
}
|
||||
@@ -103,9 +104,9 @@ int php_oci_register_taf_callback(php_oci_connection *connection, zval *callback
|
||||
OCIFocbkStruct failover;
|
||||
|
||||
if (!callback) {
|
||||
/* Disable callback */
|
||||
/* Unregister callback */
|
||||
if (Z_ISUNDEF(connection->taf_callback) || Z_ISNULL(connection->taf_callback)) {
|
||||
return 0; // Nothing to disable
|
||||
return 0; // Nothing to unregister
|
||||
}
|
||||
|
||||
registered = 1;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
@@ -56,13 +56,21 @@ PHP_FUNCTION(oci_register_taf_callback)
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
#if PHP_MAJOR_VERSION > 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION >= 2)
|
||||
if (!zend_is_callable(callback, 0, 0)) {
|
||||
callback_name = zend_get_callable_name(callback);
|
||||
php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name));
|
||||
zend_string_release(callback_name);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#else
|
||||
if (!zend_is_callable(callback, 0, &callback_name)) {
|
||||
php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name));
|
||||
zend_string_release(callback_name);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
zend_string_release(callback_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
|
||||
@@ -75,6 +83,27 @@ PHP_FUNCTION(oci_register_taf_callback)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool oci_unregister_taf_callback( resource connection )
|
||||
* Unregister a callback function for Oracle Transparent Application Failover (TAF) */
|
||||
PHP_FUNCTION(oci_unregister_taf_callback)
|
||||
{
|
||||
zval *z_connection;
|
||||
php_oci_connection *connection;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &z_connection) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
|
||||
|
||||
if (php_oci_unregister_taf_callback(connection) == 0) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])
|
||||
Define a PHP variable to an Oracle column by name */
|
||||
/* if you want to define a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE defining!!! */
|
||||
@@ -88,7 +117,7 @@ PHP_FUNCTION(oci_define_by_name)
|
||||
php_oci_define *define;
|
||||
zend_string *zvtmp;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/|l", &stmt, &name, &name_len, &var, &type) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz|l", &stmt, &name, &name_len, &var, &type) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,7 +153,8 @@ PHP_FUNCTION(oci_define_by_name)
|
||||
define->name[name_len] = '\0';
|
||||
define->name_len = (ub4) name_len;
|
||||
define->type = (ub4) type;
|
||||
define->zval = var;
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
ZVAL_COPY(&define->val, var);
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
@@ -173,7 +203,7 @@ PHP_FUNCTION(oci_bind_array_by_name)
|
||||
zval *bind_var = NULL;
|
||||
php_oci_statement *statement;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/l|ll", &z_statement, &name, &name_len, &bind_var, &max_array_len, &max_item_len, &type) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rszl|ll", &z_statement, &name, &name_len, &bind_var, &max_array_len, &max_item_len, &type) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1410,7 +1440,7 @@ PHP_FUNCTION(oci_fetch_all)
|
||||
|
||||
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
|
||||
|
||||
zval_dtor(array);
|
||||
zval_ptr_dtor(array);
|
||||
|
||||
while (skip--) {
|
||||
if (php_oci_statement_fetch(statement, nrows)) {
|
||||
@@ -1587,8 +1617,8 @@ PHP_FUNCTION(oci_close)
|
||||
RefCount value by 1 */
|
||||
zend_list_close(connection->id);
|
||||
|
||||
/* Disable Oracle TAF */
|
||||
php_oci_disable_taf_callback(connection);
|
||||
/* Unregister Oracle TAF */
|
||||
php_oci_unregister_taf_callback(connection);
|
||||
|
||||
/* ZVAL_NULL(z_connection); */
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
|
||||
+86
-67
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
@@ -364,8 +364,10 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows)
|
||||
continue;
|
||||
}
|
||||
|
||||
zval_dtor(column->define->zval);
|
||||
php_oci_column_to_zval(column, column->define->zval, 0);
|
||||
ZEND_ASSERT(Z_ISREF(column->define->val));
|
||||
zval_ptr_dtor(Z_REFVAL(column->define->val));
|
||||
ZVAL_NULL(Z_REFVAL(column->define->val));
|
||||
php_oci_column_to_zval(column, Z_REFVAL(column->define->val), 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -910,10 +912,12 @@ void php_oci_statement_free(php_oci_statement *statement)
|
||||
int php_oci_bind_pre_exec(zval *data, void *result)
|
||||
{
|
||||
php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data);
|
||||
zval *zv = &bind->val;
|
||||
|
||||
*(int *)result = 0;
|
||||
|
||||
if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
|
||||
ZVAL_DEREF(zv);
|
||||
if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
/* These checks are currently valid for oci_bind_by_name, not
|
||||
* oci_bind_array_by_name. Also bind->type and
|
||||
* bind->indicator are not used for oci_bind_array_by_name.
|
||||
@@ -927,7 +931,7 @@ int php_oci_bind_pre_exec(zval *data, void *result)
|
||||
case SQLT_CLOB:
|
||||
case SQLT_BLOB:
|
||||
case SQLT_RDD:
|
||||
if (Z_TYPE_P(bind->zval) != IS_OBJECT) {
|
||||
if (Z_TYPE_P(zv) != IS_OBJECT) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
|
||||
*(int *)result = 1;
|
||||
}
|
||||
@@ -943,14 +947,14 @@ int php_oci_bind_pre_exec(zval *data, void *result)
|
||||
case SQLT_LBI:
|
||||
case SQLT_BIN:
|
||||
case SQLT_LNG:
|
||||
if (Z_TYPE_P(bind->zval) == IS_RESOURCE || Z_TYPE_P(bind->zval) == IS_OBJECT) {
|
||||
if (Z_TYPE_P(zv) == IS_RESOURCE || Z_TYPE_P(zv) == IS_OBJECT) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
|
||||
*(int *)result = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case SQLT_RSET:
|
||||
if (Z_TYPE_P(bind->zval) != IS_RESOURCE) {
|
||||
if (Z_TYPE_P(zv) != IS_RESOURCE) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
|
||||
*(int *)result = 1;
|
||||
}
|
||||
@@ -971,30 +975,34 @@ int php_oci_bind_post_exec(zval *data)
|
||||
php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data);
|
||||
php_oci_connection *connection = bind->parent_statement->connection;
|
||||
sword errstatus;
|
||||
zval *zv = &bind->val;
|
||||
|
||||
ZVAL_DEREF(zv);
|
||||
if (bind->indicator == -1) { /* NULL */
|
||||
zval *val = bind->zval;
|
||||
if (Z_TYPE_P(val) == IS_STRING) {
|
||||
*Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */
|
||||
if (Z_TYPE_P(zv) == IS_STRING) {
|
||||
*Z_STRVAL_P(zv) = '\0'; /* XXX avoid warning in debug mode */
|
||||
}
|
||||
zval_dtor(val);
|
||||
ZVAL_NULL(val);
|
||||
} else if (Z_TYPE_P(bind->zval) == IS_STRING
|
||||
&& Z_STRLEN_P(bind->zval) > 0
|
||||
&& Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] != '\0') {
|
||||
zval_ptr_dtor(zv);
|
||||
ZVAL_NULL(zv);
|
||||
} else if (Z_TYPE_P(zv) == IS_STRING
|
||||
&& Z_STRLEN_P(zv) > 0
|
||||
&& Z_STRVAL_P(zv)[ Z_STRLEN_P(zv) ] != '\0') {
|
||||
/* The post- PHP 5.3 feature for "interned" strings disallows
|
||||
* their reallocation but (i) any IN binds either interned or
|
||||
* not should already be null terminated and (ii) for OUT
|
||||
* binds, php_oci_bind_out_callback() should have allocated a
|
||||
* new string that we can modify here.
|
||||
*/
|
||||
Z_STR_P(bind->zval) = zend_string_extend(Z_STR_P(bind->zval), Z_STRLEN_P(bind->zval)+1, 0);
|
||||
Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0';
|
||||
} else if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
|
||||
SEPARATE_STRING(zv);
|
||||
Z_STR_P(zv) = zend_string_extend(Z_STR_P(zv), Z_STRLEN_P(zv)+1, 0);
|
||||
Z_STRVAL_P(zv)[ Z_STRLEN_P(zv) ] = '\0';
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
int i;
|
||||
zval *entry = NULL;
|
||||
HashTable *hash = HASH_OF(bind->zval);
|
||||
|
||||
HashTable *hash;
|
||||
|
||||
SEPARATE_ARRAY(zv);
|
||||
hash = HASH_OF(zv);
|
||||
zend_hash_internal_pointer_reset(hash);
|
||||
|
||||
switch (bind->array.type) {
|
||||
@@ -1003,22 +1011,22 @@ int php_oci_bind_post_exec(zval *data)
|
||||
case SQLT_LNG:
|
||||
for (i = 0; i < (int) bind->array.current_length; i++) {
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
ZVAL_LONG(entry, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_long(bind->zval, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
add_next_index_long(zv, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SQLT_FLT:
|
||||
for (i = 0; i < (int) bind->array.current_length; i++) {
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
ZVAL_DOUBLE(entry, ((double *)(bind->array.elements))[i]);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_double(bind->zval, ((double *)(bind->array.elements))[i]);
|
||||
add_next_index_double(zv, ((double *)(bind->array.elements))[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1031,7 +1039,7 @@ int php_oci_bind_post_exec(zval *data)
|
||||
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.elements))[i]), 0, 0, 0, 0, &buff_len, buff));
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
|
||||
if (errstatus != OCI_SUCCESS) {
|
||||
connection->errcode = php_oci_error(connection->err, errstatus);
|
||||
@@ -1047,10 +1055,10 @@ int php_oci_bind_post_exec(zval *data)
|
||||
if (errstatus != OCI_SUCCESS) {
|
||||
connection->errcode = php_oci_error(connection->err, errstatus);
|
||||
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
|
||||
add_next_index_null(bind->zval);
|
||||
add_next_index_null(zv);
|
||||
} else {
|
||||
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
|
||||
add_next_index_stringl(bind->zval, (char *)buff, buff_len);
|
||||
add_next_index_stringl(zv, (char *)buff, buff_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1066,20 +1074,21 @@ int php_oci_bind_post_exec(zval *data)
|
||||
/* int curr_element_length = strlen(((text *)bind->array.elements)+i*bind->array.max_length); */
|
||||
int curr_element_length = bind->array.element_lengths[i];
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
ZVAL_STRINGL(entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_stringl(bind->zval, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
|
||||
add_next_index_stringl(zv, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if ((Z_TYPE_P(bind->zval) == IS_TRUE) || (Z_TYPE_P(bind->zval) == IS_FALSE)) {
|
||||
if (Z_LVAL_P(bind->zval) == 0)
|
||||
ZVAL_BOOL(bind->zval, FALSE);
|
||||
else if (Z_LVAL_P(bind->zval) == 1)
|
||||
ZVAL_BOOL(bind->zval, TRUE);
|
||||
} else if ((Z_TYPE_P(zv) == IS_TRUE) || (Z_TYPE_P(zv) == IS_FALSE)) {
|
||||
/* This convetrsion is done on purpose (ext/oci8 uses LVAL as a temorary value) */
|
||||
if (Z_LVAL_P(zv) == 0)
|
||||
ZVAL_BOOL(zv, FALSE);
|
||||
else if (Z_LVAL_P(zv) == 1)
|
||||
ZVAL_BOOL(zv, TRUE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1103,11 +1112,8 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
sword errstatus;
|
||||
zval *param = NULL;
|
||||
|
||||
if (!Z_ISREF_P(var)) {
|
||||
param = var;
|
||||
} else {
|
||||
param = Z_REFVAL_P(var);
|
||||
}
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
param = Z_REFVAL_P(var);
|
||||
|
||||
switch (type) {
|
||||
case SQLT_NTY:
|
||||
@@ -1242,9 +1248,9 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
|
||||
if ((old_bind = zend_hash_str_find_ptr(statement->binds, name, name_len)) != NULL) {
|
||||
bindp = old_bind;
|
||||
if (!Z_ISUNDEF(bindp->parameter)) {
|
||||
zval_ptr_dtor(&bindp->parameter);
|
||||
ZVAL_UNDEF(&bindp->parameter);
|
||||
if (!Z_ISUNDEF(bindp->val)) {
|
||||
zval_ptr_dtor(&bindp->val);
|
||||
ZVAL_UNDEF(&bindp->val);
|
||||
}
|
||||
} else {
|
||||
zend_string *zvtmp;
|
||||
@@ -1254,9 +1260,6 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
zend_string_release(zvtmp);
|
||||
}
|
||||
|
||||
/* Keep a copy of bound variable in the bind hash */
|
||||
ZVAL_COPY(&bindp->parameter, var);
|
||||
|
||||
/* Make sure the minimum of value_sz is 1 to avoid ORA-3149
|
||||
* when both in/out parameters are bound with empty strings
|
||||
*/
|
||||
@@ -1266,7 +1269,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
bindp->descriptor = oci_desc;
|
||||
bindp->statement = oci_stmt;
|
||||
bindp->parent_statement = statement;
|
||||
bindp->zval = param;
|
||||
ZVAL_COPY(&bindp->val, var);
|
||||
bindp->type = type;
|
||||
/* Storing max length set in OCIBindByName() to check it later in
|
||||
* php_oci_bind_in_callback() function to avoid ORA-1406 error while
|
||||
@@ -1360,11 +1363,14 @@ sb4 php_oci_bind_in_callback(
|
||||
php_oci_bind *phpbind;
|
||||
zval *val;
|
||||
|
||||
if (!(phpbind=(php_oci_bind *)ictxp) || !(val = phpbind->zval)) {
|
||||
if (!(phpbind=(php_oci_bind *)ictxp) || Z_ISUNDEF(phpbind->val)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid phpbind pointer value");
|
||||
return OCI_ERROR;
|
||||
}
|
||||
|
||||
val = &phpbind->val;
|
||||
ZVAL_DEREF(val);
|
||||
|
||||
if (Z_ISNULL_P(val)) {
|
||||
/* we're going to insert a NULL column */
|
||||
phpbind->indicator = -1;
|
||||
@@ -1421,11 +1427,14 @@ sb4 php_oci_bind_out_callback(
|
||||
zval *val;
|
||||
sb4 retval = OCI_ERROR;
|
||||
|
||||
if (!(phpbind=(php_oci_bind *)octxp) || !(val = phpbind->zval)) {
|
||||
if (!(phpbind=(php_oci_bind *)octxp) || Z_ISUNDEF(phpbind->val)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid phpbind pointer value");
|
||||
return retval;
|
||||
}
|
||||
|
||||
val = &phpbind->val;
|
||||
ZVAL_DEREF(val);
|
||||
|
||||
if (Z_TYPE_P(val) == IS_RESOURCE) {
|
||||
/* Processing for ref-cursor out binds */
|
||||
if (phpbind->statement != NULL) {
|
||||
@@ -1463,7 +1472,7 @@ sb4 php_oci_bind_out_callback(
|
||||
retval = OCI_CONTINUE;
|
||||
} else {
|
||||
convert_to_string(val);
|
||||
zval_dtor(val);
|
||||
zval_ptr_dtor(val);
|
||||
|
||||
{
|
||||
char *p = ecalloc(1, PHP_OCI_PIECE_SIZE);
|
||||
@@ -1474,12 +1483,12 @@ sb4 php_oci_bind_out_callback(
|
||||
Z_STRLEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
|
||||
Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(val) + 1);
|
||||
/* XXX is this right? */
|
||||
ZVAL_STRINGL(val, NULL, Z_STRLEN(phpbind->zval) + 1);
|
||||
ZVAL_STRINGL(val, NULL, Z_STRLEN(val) + 1);
|
||||
#endif
|
||||
|
||||
/* XXX we assume that zend-zval len has 4 bytes */
|
||||
*alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
|
||||
*bufpp = Z_STRVAL_P(phpbind->zval);
|
||||
*alenpp = (ub4*) &Z_STRLEN_P(val);
|
||||
*bufpp = Z_STRVAL_P(val);
|
||||
*piecep = OCI_ONE_PIECE;
|
||||
*rcodepp = &phpbind->retcode;
|
||||
*indpp = &phpbind->indicator;
|
||||
@@ -1527,10 +1536,10 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
|
||||
column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0);
|
||||
if (!column) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", Z_LVAL(tmp));
|
||||
zval_dtor(&tmp);
|
||||
zval_ptr_dtor(&tmp);
|
||||
return NULL;
|
||||
}
|
||||
zval_dtor(&tmp);
|
||||
zval_ptr_dtor(&tmp);
|
||||
}
|
||||
return column;
|
||||
}
|
||||
@@ -1586,11 +1595,15 @@ int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows)
|
||||
Bind arrays to PL/SQL types */
|
||||
int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type)
|
||||
{
|
||||
php_oci_bind *bind, *bindp;
|
||||
php_oci_bind *bind;
|
||||
sword errstatus;
|
||||
zend_string *zvtmp;
|
||||
zval *val;
|
||||
|
||||
convert_to_array(var);
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
val = Z_REFVAL_P(var);
|
||||
SEPARATE_ZVAL_NOREF(val);
|
||||
convert_to_array(val);
|
||||
|
||||
if (maxlength < -1) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid max length value (" ZEND_LONG_FMT ")", maxlength);
|
||||
@@ -1601,11 +1614,11 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
case SQLT_NUM:
|
||||
case SQLT_INT:
|
||||
case SQLT_LNG:
|
||||
bind = php_oci_bind_array_helper_number(var, max_table_length);
|
||||
bind = php_oci_bind_array_helper_number(val, max_table_length);
|
||||
break;
|
||||
|
||||
case SQLT_FLT:
|
||||
bind = php_oci_bind_array_helper_double(var, max_table_length);
|
||||
bind = php_oci_bind_array_helper_double(val, max_table_length);
|
||||
break;
|
||||
|
||||
case SQLT_AFC:
|
||||
@@ -1614,14 +1627,14 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
case SQLT_AVC:
|
||||
case SQLT_STR:
|
||||
case SQLT_LVC:
|
||||
if (maxlength == -1 && zend_hash_num_elements(Z_ARRVAL_P(var)) == 0) {
|
||||
if (maxlength == -1 && zend_hash_num_elements(Z_ARRVAL_P(val)) == 0) {
|
||||
php_error_docref(NULL, E_WARNING, "You must provide max length value for empty arrays");
|
||||
return 1;
|
||||
}
|
||||
bind = php_oci_bind_array_helper_string(var, max_table_length, maxlength);
|
||||
bind = php_oci_bind_array_helper_string(val, max_table_length, maxlength);
|
||||
break;
|
||||
case SQLT_ODT:
|
||||
bind = php_oci_bind_array_helper_date(var, max_table_length, statement->connection);
|
||||
bind = php_oci_bind_array_helper_date(val, max_table_length, statement->connection);
|
||||
break;
|
||||
default:
|
||||
php_error_docref(NULL, E_WARNING, "Unknown or unsupported datatype given: " ZEND_LONG_FMT, type);
|
||||
@@ -1638,7 +1651,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
bind->statement = NULL;
|
||||
bind->parent_statement = statement;
|
||||
bind->bind = NULL;
|
||||
bind->zval = var;
|
||||
ZVAL_COPY(&bind->val, var);
|
||||
bind->array.type = type;
|
||||
bind->indicator = 0; /* not used for array binds */
|
||||
bind->type = 0; /* not used for array binds */
|
||||
@@ -1677,6 +1690,8 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
efree(bind->array.indicators);
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&bind->val);
|
||||
|
||||
efree(bind);
|
||||
|
||||
statement->errcode = php_oci_error(statement->err, errstatus);
|
||||
@@ -1690,7 +1705,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
}
|
||||
|
||||
zvtmp = zend_string_init(name, name_len, 0);
|
||||
bindp = zend_hash_update_ptr(statement->binds, zvtmp, bind);
|
||||
zend_hash_update_ptr(statement->binds, zvtmp, bind);
|
||||
zend_string_release(zvtmp);
|
||||
|
||||
statement->errcode = 0; /* retain backwards compat with OCI8 1.4 */
|
||||
@@ -1707,6 +1722,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
|
||||
HashTable *hash;
|
||||
zval *entry;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
if (maxlength == -1) {
|
||||
@@ -1723,7 +1739,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
|
||||
}
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (text *)safe_emalloc(max_table_length * (maxlength + 1), sizeof(text), 0);
|
||||
memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text));
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
@@ -1780,10 +1796,11 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le
|
||||
HashTable *hash;
|
||||
zval *entry;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (oci_phpsized_int *)safe_emalloc(max_table_length, sizeof(oci_phpsized_int), 0);
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
bind->array.old_length = bind->array.current_length;
|
||||
@@ -1820,10 +1837,11 @@ php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_le
|
||||
HashTable *hash;
|
||||
zval *entry;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (double *)safe_emalloc(max_table_length, sizeof(double), 0);
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
bind->array.old_length = bind->array.current_length;
|
||||
@@ -1861,10 +1879,11 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng
|
||||
zval *entry;
|
||||
sword errstatus;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (OCIDate *)safe_emalloc(max_table_length, sizeof(OCIDate), 0);
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
bind->array.old_length = bind->array.current_length;
|
||||
|
||||
+43
-6
@@ -12,7 +12,7 @@ Use the OCI8 extension to access Oracle Database. Use 'pecl install
|
||||
oci8' to install for PHP 7. Use 'pecl install oci8-2.0.12' to install
|
||||
for PHP 5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10' to install for
|
||||
PHP 4.3.9 - PHP 5.1. The OCI8 extension can be linked with Oracle
|
||||
client libraries from Oracle Database 12.1, 11, or 10.2. These
|
||||
client libraries from Oracle Database 12, 11, or 10.2. These
|
||||
libraries are found in your database installation, or in the free
|
||||
Oracle Instant Client from
|
||||
http://www.oracle.com/technetwork/database/features/instant-client/.
|
||||
@@ -27,6 +27,12 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
<email>sixd@php.net</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<lead>
|
||||
<name>Tianfang Yang</name>
|
||||
<user>tianfyan</user>
|
||||
<email>tianfyan@php.net</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<lead>
|
||||
<name>Antony Dovgal</name>
|
||||
<user>tony2001</user>
|
||||
@@ -46,12 +52,12 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
<active>no</active>
|
||||
</lead>
|
||||
|
||||
<date>2017-06-20</date>
|
||||
<date>2017-08-15</date>
|
||||
<time>12:00:00</time>
|
||||
|
||||
<version>
|
||||
<release>2.1.5</release>
|
||||
<api>2.1.5</api>
|
||||
<release>2.1.7</release>
|
||||
<api>2.1.7</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
@@ -60,8 +66,7 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Added TAF callback support (PR #2459, KoenigsKind)
|
||||
Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
Added oci_unregister_taf_callback()
|
||||
</notes>
|
||||
<contents>
|
||||
<dir name="/">
|
||||
@@ -471,6 +476,38 @@ Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
</extsrcrelease>
|
||||
<changelog>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.6</release>
|
||||
<api>2.1.6</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.5</release>
|
||||
<api>2.1.5</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Added TAF callback support (PR #2459, KoenigsKind)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.4</release>
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
@@ -43,7 +43,7 @@
|
||||
*/
|
||||
#undef PHP_OCI8_VERSION
|
||||
#endif
|
||||
#define PHP_OCI8_VERSION "2.1.5"
|
||||
#define PHP_OCI8_VERSION "2.1.8"
|
||||
|
||||
extern zend_module_entry oci8_module_entry;
|
||||
#define phpext_oci8_ptr &oci8_module_entry
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Authors: Stig Sæther Bakken <ssb@php.net> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
@@ -209,7 +209,7 @@ typedef struct {
|
||||
|
||||
/* {{{ php_oci_define */
|
||||
typedef struct {
|
||||
zval *zval; /* zval used in define */
|
||||
zval val; /* zval used in define */
|
||||
text *name; /* placeholder's name */
|
||||
ub4 name_len; /* placeholder's name length */
|
||||
ub4 type; /* define type */
|
||||
@@ -244,8 +244,7 @@ typedef struct {
|
||||
/* {{{ php_oci_bind */
|
||||
typedef struct {
|
||||
OCIBind *bind; /* bind handle */
|
||||
zval *zval; /* value */
|
||||
zval parameter; /* a copy of bound variable used for oci_bind_by_name */
|
||||
zval val; /* value */
|
||||
dvoid *descriptor; /* used for binding of LOBS etc */
|
||||
OCIStmt *statement; /* used for binding REFCURSORs */
|
||||
php_oci_statement *parent_statement; /* pointer to the parent statement */
|
||||
@@ -536,7 +535,7 @@ ZEND_END_MODULE_GLOBALS(oci) /* }}} */
|
||||
/* {{{ transparent failover related prototypes */
|
||||
|
||||
int php_oci_register_taf_callback(php_oci_connection *connection, zval *callback);
|
||||
int php_oci_disable_taf_callback(php_oci_connection *connection);
|
||||
int php_oci_unregister_taf_callback(php_oci_connection *connection);
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
Loaded 100 of 240 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user