mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-12 19:50:50 +00:00
Compare commits
251
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5434275c9 | ||
|
|
eac0bf11e4 | ||
|
|
b26d33a885 | ||
|
|
7305432d9a | ||
|
|
dc253f3cf2 | ||
|
|
194547f591 | ||
|
|
3e11b7fc21 | ||
|
|
9aa6898b9b | ||
|
|
d103802003 | ||
|
|
04a6bbae6c | ||
|
|
cab41ecb93 | ||
|
|
3549d9184a | ||
|
|
5f9ae45e22 | ||
|
|
4b746fce1c | ||
|
|
3fd08a1595 | ||
|
|
44eec946e8 | ||
|
|
0413feb29c | ||
|
|
f18cf46d07 | ||
|
|
b2919853f8 | ||
|
|
dea41f3c3a | ||
|
|
42549b7844 | ||
|
|
cd9d90f4d4 | ||
|
|
24da62d342 | ||
|
|
e20a6b0213 | ||
|
|
a86df6bcb0 | ||
|
|
6ec494016b | ||
|
|
2e77f5eed3 | ||
|
|
4e9c3e9396 | ||
|
|
3239f6d679 | ||
|
|
0966f9de41 | ||
|
|
499f5480f1 | ||
|
|
be9edd83c2 | ||
|
|
55db2c31cd | ||
|
|
b7e96f8e0e | ||
|
|
4bf1a11c07 | ||
|
|
079bc324cd | ||
|
|
61538ebadc | ||
|
|
3cad07b84f | ||
|
|
71b12940d0 | ||
|
|
ba59b6f11b | ||
|
|
b28912b0f7 | ||
|
|
a7594cb74f | ||
|
|
065551bc9c | ||
|
|
e7f4e67155 | ||
|
|
60a6feed07 | ||
|
|
8af70958fc | ||
|
|
5d2c303438 | ||
|
|
7829f9b1d2 | ||
|
|
01735f4d9f | ||
|
|
3df753c6ca | ||
|
|
bdd56f3107 | ||
|
|
3af6201224 | ||
|
|
d8c80af71e | ||
|
|
2def85688d | ||
|
|
259477826c | ||
|
|
ab07265573 | ||
|
|
71fd58652f | ||
|
|
f555224743 | ||
|
|
f64be0b013 | ||
|
|
472b25921e | ||
|
|
1a23ebc1ff | ||
|
|
b59718bdc4 | ||
|
|
b06f8cb58b | ||
|
|
afb20f4895 | ||
|
|
075986f214 | ||
|
|
618dcd6520 | ||
|
|
4c9fe5a490 | ||
|
|
d058e30917 | ||
|
|
159e5c1048 | ||
|
|
9689796c10 | ||
|
|
9ba2cfd33e | ||
|
|
c2b8066efb | ||
|
|
9ca1b2a775 | ||
|
|
2cc1cbf2f4 | ||
|
|
15abb2b56e | ||
|
|
e78712791d | ||
|
|
b112d09013 | ||
|
|
666cb6c802 | ||
|
|
b2934d2612 | ||
|
|
0c0cbb43da | ||
|
|
64e6ddc7f7 | ||
|
|
a8e25fdbf8 | ||
|
|
2d96fdd54f | ||
|
|
74a696d53b | ||
|
|
4d6f808c16 | ||
|
|
e3d25e78eb | ||
|
|
b01336814d | ||
|
|
34e5d3a87d | ||
|
|
9fcfe52d03 | ||
|
|
e36c04ef48 | ||
|
|
c7aa8ba0ee | ||
|
|
3306b3aa60 | ||
|
|
bd00fe81cc | ||
|
|
6b1fbafdf0 | ||
|
|
de65a2243f | ||
|
|
3fd7d819b8 | ||
|
|
69b48f83df | ||
|
|
cdf9178c43 | ||
|
|
924ff6164e | ||
|
|
a769d873f8 | ||
|
|
23c124ec75 | ||
|
|
c4e11c8ef3 | ||
|
|
418da85f15 | ||
|
|
775b4b54d8 | ||
|
|
c562d44321 | ||
|
|
ad12da4908 | ||
|
|
bad5d0d6c5 | ||
|
|
e405ff59f9 | ||
|
|
256ec5bebb | ||
|
|
3a7b0027f3 | ||
|
|
9b3c26d4f4 | ||
|
|
95d2908814 | ||
|
|
ce06677069 | ||
|
|
ecad9a470f | ||
|
|
f67a3cc9bd | ||
|
|
c9fd093127 | ||
|
|
2cca43b3ab | ||
|
|
e5beb4e828 | ||
|
|
afc22828ea | ||
|
|
51cdd3dc50 | ||
|
|
0da10134f2 | ||
|
|
649027b963 | ||
|
|
4ef9f536ba | ||
|
|
4d08b9dac0 | ||
|
|
0db20a7cb1 | ||
|
|
c1504b81d3 | ||
|
|
2f606dc5e8 | ||
|
|
04cc2f6473 | ||
|
|
3bcab31749 | ||
|
|
b47cff48de | ||
|
|
a797421e98 | ||
|
|
2689917b17 | ||
|
|
5cf54f6073 | ||
|
|
62700f76cb | ||
|
|
b5338c0b7d | ||
|
|
0fdceb6cd5 | ||
|
|
5ca02ca494 | ||
|
|
af07b76ccf | ||
|
|
390f64701d | ||
|
|
7991a88675 | ||
|
|
aa3fceeaad | ||
|
|
8b1559b9f4 | ||
|
|
55b880070c | ||
|
|
703be4f77e | ||
|
|
27a743b82b | ||
|
|
bdf7393ddb | ||
|
|
2693e52113 | ||
|
|
4e68b2c52b | ||
|
|
54840f9c8f | ||
|
|
f269cdcd4f | ||
|
|
f76a6cd023 | ||
|
|
6b18d956de | ||
|
|
e46d589624 | ||
|
|
0496f5407f | ||
|
|
3a25a56a92 | ||
|
|
0525574913 | ||
|
|
73cabfedf5 | ||
|
|
12107d619b | ||
|
|
f7f4fd4706 | ||
|
|
e8b7698f5e | ||
|
|
2aae60461c | ||
|
|
f8c514ba6b | ||
|
|
8dc4f4dc9e | ||
|
|
5f8380d33e | ||
|
|
89637c6b41 | ||
|
|
4b38feabe7 | ||
|
|
a29264eb8c | ||
|
|
4903f044d3 | ||
|
|
ce64b82ebb | ||
|
|
d02f953faf | ||
|
|
d0b7eed0c9 | ||
|
|
c71b773a62 | ||
|
|
e3cc15daf2 | ||
|
|
2a1ad88538 | ||
|
|
3f4340a796 | ||
|
|
08089f014c | ||
|
|
751d19f698 | ||
|
|
604827b694 | ||
|
|
cfee5116dd | ||
|
|
0c4f11ecaa | ||
|
|
2fddc4a7f1 | ||
|
|
de66e80d75 | ||
|
|
fda0a8b735 | ||
|
|
cd1869bcf2 | ||
|
|
3eecee16d1 | ||
|
|
4d6100569b | ||
|
|
b255b97e43 | ||
|
|
b1301a0686 | ||
|
|
660250f4da | ||
|
|
81c2a4b9ba | ||
|
|
db287b2303 | ||
|
|
b3bd379198 | ||
|
|
cda87977a5 | ||
|
|
b4c5f20c46 | ||
|
|
fa3615f14e | ||
|
|
3fbbcf7f93 | ||
|
|
1bdc290017 | ||
|
|
18b6de7a91 | ||
|
|
14c422a32f | ||
|
|
6a854e2740 | ||
|
|
b4fa2ba295 | ||
|
|
0f8cf3b849 | ||
|
|
27d6814351 | ||
|
|
64447030bb | ||
|
|
073ac50374 | ||
|
|
98bcc0bd43 | ||
|
|
135265ef69 | ||
|
|
ec6ac50812 | ||
|
|
1b797f7ad3 | ||
|
|
a6c67a088a | ||
|
|
51a7e35c24 | ||
|
|
509f5097ab | ||
|
|
887fabe78f | ||
|
|
4a39d33ee5 | ||
|
|
f19dfac830 | ||
|
|
648be8600f | ||
|
|
c4d7cfa536 | ||
|
|
78970d5338 | ||
|
|
5f07a895cc | ||
|
|
aea8c6ddc1 | ||
|
|
81b2533a68 | ||
|
|
3968ffe7b3 | ||
|
|
e05f79c3de | ||
|
|
91f129ebf7 | ||
|
|
c3b910370c | ||
|
|
ee0e6963f3 | ||
|
|
9997767dc3 | ||
|
|
3704947696 | ||
|
|
585c9f3c4b | ||
|
|
d027bc2add | ||
|
|
95c4564f93 | ||
|
|
9c5717d0de | ||
|
|
77cbf8a657 | ||
|
|
dc7e53690f | ||
|
|
46bb35a853 | ||
|
|
1c845d2950 | ||
|
|
5416deec66 | ||
|
|
6a8ae7cf8d | ||
|
|
60b1829e1c | ||
|
|
1e0c4386ab | ||
|
|
2dee44c74c | ||
|
|
8dcfec9789 | ||
|
|
6d2d0bbda7 | ||
|
|
05849a242a | ||
|
|
60912e66c8 | ||
|
|
ece7d223e8 | ||
|
|
5269c4cacb | ||
|
|
49d1cdc393 | ||
|
|
d51b8f915f | ||
|
|
872e43d6e5 | ||
|
|
fff1cab367 |
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.4
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.10
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
|
||||
@@ -1,6 +1,233 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2017 PHP 7.0.20
|
||||
28 Sep 2017 PHP 7.0.24
|
||||
|
||||
- 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 #75173 (incorrect behavior of AppendIterator::append in foreach loop).
|
||||
(jhdxr)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75097 (gethostname fails if your host name is 64 chars long). (Andrea)
|
||||
|
||||
31 Aug 2017 PHP 7.0.23
|
||||
|
||||
- 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)
|
||||
|
||||
- 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)
|
||||
|
||||
- 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 #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 #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.0.22
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74832 (Loading PHP extension with already registered function
|
||||
name leads to a crash). (jpauli)
|
||||
. Fixed bug #74780 (parse_url() borken when query string contains colon).
|
||||
(jhdxr)
|
||||
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
|
||||
. Fixed bug #73900 (Use After Free in unserialize() SplFixedArray). (nikic)
|
||||
. 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 #74840 (Opcache overwrites argument of GENERATOR_RETURN within
|
||||
finally). (Bob)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #69356 (PDOStatement::debugDumpParams() truncates query). (Adam
|
||||
Baratz)
|
||||
|
||||
- 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)
|
||||
|
||||
- zlib:
|
||||
. Fixed bug #73944 (dictionary option of inflate_init() does not work).
|
||||
(wapmorgan)
|
||||
|
||||
06 Jul 2017 PHP 7.0.21
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74738 (Multiple [PATH=] and [HOST=] sections not properly
|
||||
parsed). (Manuel Mausz)
|
||||
. Fixed bug #74658 (Undefined constants in array properties result in broken
|
||||
properties). (Laruence)
|
||||
. Fixed misparsing of abstract unix domain socket names. (Sara)
|
||||
. 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 #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
|
||||
(Stas)
|
||||
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
|
||||
php_parse_date()). (Derick)
|
||||
|
||||
- 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
|
||||
collator_get_sort_key). (Tyson Andre, Remi)
|
||||
. Fixed bug #73634 (grapheme_strpos illegal memory access). (Stas)
|
||||
|
||||
- Mbstring:
|
||||
. Add oniguruma upstream fix (CVE-2017-9224, CVE-2017-9226, CVE-2017-9227,
|
||||
CVE-2017-9228, CVE-2017-9229) (Remi, Mamoru TASAKA)
|
||||
|
||||
- OCI8:
|
||||
. Add TAF callback (PR #2459). (KoenigsKind)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74663 (Segfault with opcache.memory_protect and
|
||||
validate_timestamp). (Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
|
||||
(Stas)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #74087 (Segmentation fault in PHP7.1.1(compiled using the bundled PCRE library)).
|
||||
(Stas)
|
||||
|
||||
- PDO_OCI:
|
||||
. Support Instant Client 12.2 in --with-pdo-oci configure option.
|
||||
(Tianfang Yang)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #74673 (Segfault when cast Reflection object to string with
|
||||
undefined constant). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #74478 (null coalescing operator failing with SplFixedArray).
|
||||
(jhdxr)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74708 (Invalid Reflection signatures for random_bytes and
|
||||
random_int). (Tyson Andre, Remi)
|
||||
. Fixed bug #73648 (Heap buffer overflow in substr). (Stas)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #74598 (ftp:// wrapper ignores context arg). (Sara)
|
||||
|
||||
- PHAR:
|
||||
. Fixed bug #74386 (Phar::__construct reflection incorrect). (villfa)
|
||||
|
||||
- SOAP
|
||||
. Fixed bug #74679 (Incorrect conversion array with WSDL_CACHE_MEMORY).
|
||||
(Dmitry)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74556 (stream_socket_get_name() returns '\0'). (Sara)
|
||||
|
||||
8 Jun 2017 PHP 7.0.20
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i).
|
||||
@@ -405,6 +632,7 @@ PHP NEWS
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #73526 (php_json_encode depth issue). (Jakub Zelenka)
|
||||
. Install headers on windows. (Darek Slusarczyk)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #64526 (Add missing mysqlnd.* parameters to php.ini-*). (cmb)
|
||||
@@ -2466,4 +2694,3 @@ PHP NEWS
|
||||
. Update bundled libzip to 1.0.1. (Remi, Anatol)
|
||||
. Fixed bug #67161 (ZipArchive::getStream() returns NULL for certain file).
|
||||
(Christoph M. Becker)
|
||||
|
||||
@@ -53,27 +53,43 @@ string(3) "1st"
|
||||
string(3) "2nd"
|
||||
NULL
|
||||
string(3) "4th"
|
||||
array(3) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
&string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(2) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(2) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
&string(3) "2nd"
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
array(1) {
|
||||
array(4) {
|
||||
[0]=>
|
||||
NULL
|
||||
[1]=>
|
||||
NULL
|
||||
[2]=>
|
||||
NULL
|
||||
[3]=>
|
||||
string(3) "4th"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #73900: Use After Free in unserialize() SplFixedArray
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = new stdClass;
|
||||
$b = new SplFixedArray(1);
|
||||
$b[0] = $a;
|
||||
$c = &$b[0];
|
||||
var_dump($c);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(stdClass)#1 (0) {
|
||||
}
|
||||
@@ -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,26 @@
|
||||
--TEST--
|
||||
Bug #74657 (Undefined constants in array properties result in broken properties)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface I {
|
||||
}
|
||||
|
||||
class C {
|
||||
const FOO = I::FOO;
|
||||
|
||||
public $options = [self::FOO => "bar"];
|
||||
}
|
||||
|
||||
try {
|
||||
var_dump((new C)->options);
|
||||
} catch (Throwable $e) {}
|
||||
|
||||
var_dump((new C)->options);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Undefined class constant 'I::FOO' in %sbug74657.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74657.php on line %d
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$g = (function($a) {
|
||||
try {
|
||||
return $a + 1;
|
||||
} finally {
|
||||
$b = $a + 2;
|
||||
var_dump($b);
|
||||
}
|
||||
yield; // Generator
|
||||
})(1);
|
||||
$g->next();
|
||||
var_dump($g->getReturn());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(3)
|
||||
int(2)
|
||||
@@ -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,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}
|
||||
+1
-1
@@ -701,7 +701,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;
|
||||
|
||||
|
||||
+5
-3
@@ -1087,8 +1087,6 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
|
||||
ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
{
|
||||
if (!(class_type->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
|
||||
class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
|
||||
|
||||
if (class_type->parent) {
|
||||
if (UNEXPECTED(zend_update_class_constants(class_type->parent) != SUCCESS)) {
|
||||
return FAILURE;
|
||||
@@ -1162,7 +1160,9 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
|
||||
|
||||
*scope = old_scope;
|
||||
}
|
||||
class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2028,17 +2028,19 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
|
||||
zend_string_release(lcname);
|
||||
return NULL;
|
||||
}
|
||||
zend_string_release(lcname);
|
||||
module = module_ptr;
|
||||
EG(current_module) = module;
|
||||
|
||||
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
|
||||
zend_hash_del(&module_registry, lcname);
|
||||
zend_string_release(lcname);
|
||||
EG(current_module) = NULL;
|
||||
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EG(current_module) = NULL;
|
||||
zend_string_release(lcname);
|
||||
return module;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -507,7 +507,7 @@ ZEND_FUNCTION(func_get_args)
|
||||
{
|
||||
zval *p, *q;
|
||||
uint32_t arg_count, first_extra_arg;
|
||||
uint32_t i, n;
|
||||
uint32_t i;
|
||||
zend_execute_data *ex = EX(prev_execute_data);
|
||||
|
||||
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
|
||||
@@ -523,7 +523,6 @@ ZEND_FUNCTION(func_get_args)
|
||||
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
|
||||
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
|
||||
i = 0;
|
||||
n = 0;
|
||||
p = ZEND_CALL_ARG(ex, 1);
|
||||
if (arg_count > first_extra_arg) {
|
||||
while (i < first_extra_arg) {
|
||||
@@ -533,7 +532,8 @@ ZEND_FUNCTION(func_get_args)
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
n++;
|
||||
} else {
|
||||
q = &EG(uninitialized_zval);
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(q);
|
||||
p++;
|
||||
@@ -548,14 +548,15 @@ ZEND_FUNCTION(func_get_args)
|
||||
if (Z_OPT_REFCOUNTED_P(q)) {
|
||||
Z_ADDREF_P(q);
|
||||
}
|
||||
n++;
|
||||
} else {
|
||||
q = &EG(uninitialized_zval);
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(q);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
} ZEND_HASH_FILL_END();
|
||||
Z_ARRVAL_P(return_value)->nNumOfElements = n;
|
||||
Z_ARRVAL_P(return_value)->nNumOfElements = arg_count;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1202,7 +1203,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2219,7 +2220,6 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
array_init_size(arg_array, num_args);
|
||||
if (num_args) {
|
||||
uint32_t i = 0;
|
||||
uint32_t n = 0;
|
||||
zval *p = ZEND_CALL_ARG(call, 1);
|
||||
|
||||
zend_hash_real_init(Z_ARRVAL_P(arg_array), 1);
|
||||
@@ -2242,12 +2242,9 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(arg)) {
|
||||
Z_ADDREF_P(arg);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(arg);
|
||||
} else {
|
||||
zval tmp;
|
||||
ZVAL_UNDEF(&tmp);
|
||||
ZEND_HASH_FILL_ADD(&tmp);
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -2257,9 +2254,10 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(p)) {
|
||||
Z_ADDREF_P(p);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
} else {
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
@@ -2272,14 +2270,15 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
|
||||
if (Z_OPT_REFCOUNTED_P(p)) {
|
||||
Z_ADDREF_P(p);
|
||||
}
|
||||
n++;
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
} else {
|
||||
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
|
||||
}
|
||||
ZEND_HASH_FILL_ADD(p);
|
||||
p++;
|
||||
i++;
|
||||
}
|
||||
} ZEND_HASH_FILL_END();
|
||||
Z_ARRVAL_P(arg_array)->nNumOfElements = n;
|
||||
Z_ARRVAL_P(arg_array)->nNumOfElements = num_args;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+3
-10
@@ -1758,16 +1758,9 @@ convert_to_array:
|
||||
zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ZSTR_VAL(ce->name));
|
||||
} else if (EXPECTED(retval && Z_TYPE_P(retval) != IS_UNDEF)) {
|
||||
if (!Z_ISREF_P(retval)) {
|
||||
if (Z_REFCOUNTED_P(retval) &&
|
||||
Z_REFCOUNT_P(retval) > 1) {
|
||||
if (Z_TYPE_P(retval) != IS_OBJECT) {
|
||||
Z_DELREF_P(retval);
|
||||
ZVAL_DUP(result, retval);
|
||||
retval = result;
|
||||
} else {
|
||||
ZVAL_COPY_VALUE(result, retval);
|
||||
retval = result;
|
||||
}
|
||||
if (result != retval) {
|
||||
ZVAL_COPY(result, retval);
|
||||
retval = result;
|
||||
}
|
||||
if (Z_TYPE_P(retval) != IS_OBJECT) {
|
||||
zend_class_entry *ce = Z_OBJCE_P(container);
|
||||
|
||||
@@ -644,15 +644,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");
|
||||
|
||||
@@ -291,7 +291,6 @@ static uint32_t zend_array_recalc_elements(HashTable *ht)
|
||||
uint32_t num = ht->nNumOfElements;
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(ht, val) {
|
||||
if (Z_TYPE_P(val) == IS_UNDEF) continue;
|
||||
if (Z_TYPE_P(val) == IS_INDIRECT) {
|
||||
if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) {
|
||||
num--;
|
||||
|
||||
+5
-1
@@ -310,7 +310,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;
|
||||
|
||||
@@ -321,6 +321,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
@@ -1676,7 +1676,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));
|
||||
@@ -1688,7 +1687,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 */
|
||||
|
||||
@@ -122,11 +122,13 @@ struct _zend_module_dep {
|
||||
unsigned char type; /* dependency type */
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API HashTable module_registry;
|
||||
|
||||
void module_destructor(zend_module_entry *module);
|
||||
int module_registry_request_startup(zend_module_entry *module);
|
||||
int module_registry_unload_temp(const zend_module_entry *module);
|
||||
END_EXTERN_C()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -155,12 +155,12 @@ struct _zend_object_handlers {
|
||||
zend_object_compare_zvals_t compare;
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
extern ZEND_API zend_object_handlers std_object_handlers;
|
||||
|
||||
#define zend_get_function_root_class(fbc) \
|
||||
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
|
||||
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
|
||||
ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -2687,7 +2687,7 @@ EOF
|
||||
done
|
||||
|
||||
echo "'[$]0' \\" >> $1
|
||||
if test `expr -- [$]0 : "'.*"` = 0; then
|
||||
if test `expr " [$]0" : " '.*"` = 0; then
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
|
||||
else
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
|
||||
|
||||
+4
-1
@@ -29,5 +29,8 @@ if not exist "%SDK_RUNNER%" (
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
|
||||
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
||||
+13
-4
@@ -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
|
||||
@@ -19,18 +21,25 @@ set STABILITY=staging
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
rem SDK is cached, deps info is cached as well
|
||||
echo Updating dependencies in %DEPS_DIR%
|
||||
call phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
call buildconf.bat --force
|
||||
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
|
||||
|
||||
call configure.bat ^
|
||||
cmd /c configure.bat ^
|
||||
--enable-snapshot-build ^
|
||||
--disable-debug-pack ^
|
||||
--with-mcrypt=shared ^
|
||||
|
||||
+4
-1
@@ -6,5 +6,8 @@ if not exist "%SDK_RUNNER%" (
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
|
||||
cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
exit /b 0
|
||||
|
||||
@@ -12,6 +12,10 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
|
||||
set STABILITY=staging
|
||||
)
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
if not exist "%DEPS_DIR%" (
|
||||
echo "%DEPS_DIR%" doesn't exist
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
rem setup MySQL related exts
|
||||
set MYSQL_PWD=Password12!
|
||||
@@ -25,6 +29,7 @@ set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
|
||||
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
|
||||
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST% port=%PDO_MYSQL_TEST_PORT% dbname=test user=%PDO_MYSQL_TEST_USER% password=%MYSQL_PW%
|
||||
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem setup PostgreSQL related exts
|
||||
set PGUSER=postgres
|
||||
@@ -33,12 +38,15 @@ rem set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=postgres pa
|
||||
echo ^<?php $conn_str = "host=127.0.0.1 dbname=test port=5432 user=%PGUSER% password=%PGPASSWORD%"; ?^> >> "./ext/pgsql/tests/config.inc"
|
||||
set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=%PGUSER% password=%PGPASSWORD%
|
||||
"C:\Program Files\PostgreSQL\9.5\bin\createdb.exe" test
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
rem prepare for ext/openssl
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL
|
||||
if "%APPVEYOR%" equ "True" rmdir /s /q C:\OpenSSL-Win64 >NUL 2>NUL
|
||||
mkdir c:\usr\local\ssl
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\template\ssl\openssl.cnf c:\usr\local\ssl
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
set OPENSSL_CONF=c:\usr\local\ssl\openssl.cnf
|
||||
rem set OPENSSL_CONF=
|
||||
rem set SSLEAY_CONF=
|
||||
@@ -48,9 +56,13 @@ if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enabled=1 -d opcache.enable_c
|
||||
|
||||
rem prepare for enchant
|
||||
mkdir c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\bin\libenchant_ispell.dll c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
copy %DEPS_DIR%\bin\libenchant_myspell.dll c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
reg add HKEY_CURRENT_USER\SOFTWARE\Enchant\Config /v Module_Dir /t REG_SZ /d c:\enchant_plugins
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
set PHP_BUILD_CACHE_ENCHANT_DICT_DIR=%PHP_BUILD_CACHE_BASE_DIR%\enchant_dict
|
||||
if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%" (
|
||||
echo Creating %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%
|
||||
@@ -73,3 +85,5 @@ mkdir c:\tests_tmp
|
||||
cd "%APPVEYOR_BUILD_FOLDER%"
|
||||
nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --set-timeout 120 -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP --temp-source c:\tests_tmp --temp-target c:\tests_tmp"
|
||||
|
||||
exit /b %errorlevel%
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=0
|
||||
PHP_RELEASE_VERSION=20
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=24
|
||||
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
|
||||
|
||||
+5949
-6853
File diff suppressed because it is too large.
Load diff
@@ -899,7 +899,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;
|
||||
|
||||
|
||||
+10
-5
@@ -910,6 +910,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));
|
||||
@@ -1932,6 +1933,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);
|
||||
}
|
||||
@@ -1986,7 +1991,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;
|
||||
@@ -2002,10 +2007,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) {
|
||||
|
||||
@@ -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
|
||||
@@ -337,6 +337,8 @@ int dom_node_node_value_write(dom_object *obj, zval *newval)
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
if (nodep->children) {
|
||||
node_list_unlink(nodep->children);
|
||||
php_libxml_node_free_list((xmlNodePtr) nodep->children);
|
||||
nodep->children = NULL;
|
||||
}
|
||||
case XML_TEXT_NODE:
|
||||
case XML_COMMENT_NODE:
|
||||
@@ -854,6 +856,14 @@ int dom_node_text_content_write(dom_object *obj, zval *newval)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE) {
|
||||
if (nodep->children) {
|
||||
node_list_unlink(nodep->children);
|
||||
php_libxml_node_free_list((xmlNodePtr) nodep->children);
|
||||
nodep->children = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
str = zval_get_string(newval);
|
||||
/* we have to use xmlNodeAddContent() to get the same behavior as with xmlNewText() */
|
||||
xmlNodeSetContent(nodep, (xmlChar *) "");
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #69373 References to deleted XPath query results
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
for( $i=0; $i<20; $i++ ) {
|
||||
$doc->loadXML("<parent><child /><child /></parent>");
|
||||
$xpath = new DOMXpath($doc);
|
||||
$all = $xpath->query('//*');
|
||||
$doc->firstChild->nodeValue = '';
|
||||
}
|
||||
echo 'DONE', PHP_EOL;
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
@@ -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===
|
||||
|
||||
@@ -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===
|
||||
@@ -477,17 +477,6 @@ void calendar_register_IntlCalendar_class(void)
|
||||
Calendar_handlers.dtor_obj = Calendar_objects_dtor;
|
||||
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, \
|
||||
@@ -541,5 +530,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;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -119,7 +119,7 @@ zend_function_entry Collator_class_functions[] = {
|
||||
PHP_NAMED_FE( getLocale, ZEND_FN( collator_get_locale ), collator_1_arg )
|
||||
PHP_NAMED_FE( getErrorCode, ZEND_FN( collator_get_error_code ), collator_0_args )
|
||||
PHP_NAMED_FE( getErrorMessage, ZEND_FN( collator_get_error_message ), collator_0_args )
|
||||
PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), collator_2_args )
|
||||
PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), collator_1_arg )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -110,7 +110,8 @@ PHP_FUNCTION(grapheme_strpos)
|
||||
size_t haystack_len, needle_len;
|
||||
const char *found;
|
||||
zend_long loffset = 0;
|
||||
int32_t offset = 0, noffset = 0;
|
||||
int32_t offset = 0;
|
||||
size_t noffset = 0;
|
||||
zend_long ret_pos;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
|
||||
|
||||
@@ -110,6 +110,7 @@ PHP_FUNCTION( msgfmt_parse_message )
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN(slocale_len);
|
||||
memset(mfo, 0, sizeof(*mfo));
|
||||
msgformat_data_init(&mfo->mf_data);
|
||||
|
||||
|
||||
+26
-26
@@ -178,6 +178,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()
|
||||
|
||||
@@ -185,24 +203,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
|
||||
|
||||
@@ -655,7 +655,7 @@ zend_function_entry intl_functions[] = {
|
||||
PHP_FE( collator_get_locale, collator_1_arg )
|
||||
PHP_FE( collator_get_error_code, collator_0_args )
|
||||
PHP_FE( collator_get_error_message, collator_0_args )
|
||||
PHP_FE( collator_get_sort_key, collator_2_args )
|
||||
PHP_FE( collator_get_sort_key, collator_1_arg )
|
||||
|
||||
/* formatter functions */
|
||||
PHP_FE( numfmt_create, arginfo_numfmt_create )
|
||||
@@ -686,17 +686,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,21 @@
|
||||
--TEST--
|
||||
Bug #74705 Wrong reflection on Collator::getSortKey
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(Collator::class, 'getSortKey');
|
||||
var_dump($rm->getNumberOfParameters());
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
|
||||
$rf = new ReflectionFunction('collator_get_sort_key');
|
||||
var_dump($rf->getNumberOfParameters());
|
||||
var_dump($rf->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(1)
|
||||
int(2)
|
||||
int(2)
|
||||
===DONE===
|
||||
@@ -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,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
@@ -8,7 +8,7 @@ data-interchange format as specified in RFC 7159
|
||||
The parser is implemented using re2c and Bison. The used versions
|
||||
of both tools for generating files in the repository are following:
|
||||
|
||||
re2c 0.14.3
|
||||
re2c 0.16
|
||||
Bison 3.0.4
|
||||
|
||||
It is recommended to do all contributions to the JSON extension
|
||||
|
||||
+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");
|
||||
}
|
||||
|
||||
+589
-657
File diff suppressed because it is too large.
Load diff
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.14.3 */
|
||||
/* Generated by re2c 0.16 */
|
||||
|
||||
enum YYCONDTYPE {
|
||||
yycJS,
|
||||
|
||||
+2
-2
@@ -366,7 +366,7 @@ PHP_FUNCTION(ldap_connect)
|
||||
{
|
||||
int rc = LDAP_SUCCESS;
|
||||
char *url = host;
|
||||
if (!ldap_is_ldap_url(url)) {
|
||||
if (url && !ldap_is_ldap_url(url)) {
|
||||
int urllen = hostlen + sizeof( "ldap://:65535" );
|
||||
|
||||
if (port <= 0 || port > 65535) {
|
||||
@@ -376,7 +376,7 @@ PHP_FUNCTION(ldap_connect)
|
||||
}
|
||||
|
||||
url = emalloc(urllen);
|
||||
snprintf( url, urllen, "ldap://%s:%ld", host ? host : "", port );
|
||||
snprintf( url, urllen, "ldap://%s:%ld", host, port );
|
||||
}
|
||||
|
||||
#ifdef LDAP_API_FEATURE_X_OPENLDAP
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
ldap_connect() - Connection using default host from openldap's ldap.conf
|
||||
--CREDITS--
|
||||
David Caldwell <david@galvanix.com>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
ob_start();
|
||||
phpinfo();
|
||||
if (!preg_match("/vendor name => openldap/i", ob_get_clean()))
|
||||
die("skip not openldap");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$conf=tempnam("/tmp","ldap.conf");
|
||||
file_put_contents($conf, "uri ldaps://example.com:3141/");
|
||||
putenv("LDAPCONF=$conf");
|
||||
$link = ldap_connect();
|
||||
ldap_get_option($link, LDAP_OPT_HOST_NAME, $host);
|
||||
var_dump($host);
|
||||
unlink($conf);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
string(16) "example.com:3141"
|
||||
===DONE===
|
||||
+1
-1
@@ -224,7 +224,7 @@ static void php_libxml_node_free(xmlNodePtr node)
|
||||
}
|
||||
}
|
||||
|
||||
static void php_libxml_node_free_list(xmlNodePtr node)
|
||||
PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node)
|
||||
{
|
||||
xmlNodePtr curnode;
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ PHP_LIBXML_API int php_libxml_decrement_doc_ref(php_libxml_node_object *object);
|
||||
PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object);
|
||||
PHP_LIBXML_API zval *php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node export_function);
|
||||
/* When an explicit freeing of node and children is required */
|
||||
PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node);
|
||||
PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node);
|
||||
/* When object dtor is called as node may still be referenced */
|
||||
PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *object);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1425,14 +1425,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
break;
|
||||
|
||||
case OP_EXACT1: MOP_IN(OP_EXACT1);
|
||||
#if 0
|
||||
DATA_ENSURE(1);
|
||||
if (*p != *s) goto fail;
|
||||
p++; s++;
|
||||
#endif
|
||||
if (*p != *s++) goto fail;
|
||||
DATA_ENSURE(0);
|
||||
p++;
|
||||
MOP_OUT;
|
||||
break;
|
||||
|
||||
@@ -3128,6 +3123,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
|
||||
}
|
||||
else {
|
||||
UChar *q = p + reg->dmin;
|
||||
|
||||
if (q >= end) return 0; /* fail */
|
||||
while (p < q) p += enclen(reg->enc, p);
|
||||
}
|
||||
}
|
||||
@@ -3208,7 +3205,13 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
|
||||
else {
|
||||
if (reg->dmax != ONIG_INFINITE_DISTANCE) {
|
||||
*low = p - reg->dmax;
|
||||
if (*low > s) {
|
||||
if (p - str < reg->dmax) {
|
||||
*low = (UChar* )str;
|
||||
if (low_prev)
|
||||
*low_prev = onigenc_get_prev_char_head(reg->enc, str, *low);
|
||||
}
|
||||
else {
|
||||
if (*low > s) {
|
||||
*low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
|
||||
*low, (const UChar** )low_prev);
|
||||
if (low_prev && IS_NULL(*low_prev))
|
||||
@@ -3221,6 +3224,7 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
|
||||
(pprev ? pprev : str), *low);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* no needs to adjust *high, *high is used as range check only */
|
||||
*high = p - reg->dmin;
|
||||
|
||||
@@ -3064,7 +3064,7 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
|
||||
PUNFETCH;
|
||||
prev = p;
|
||||
num = scan_unsigned_octal_number(&p, end, 3, enc);
|
||||
if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (num < 0 || num >= 256) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (p == prev) { /* can't read nothing. */
|
||||
num = 0; /* but, it's not error */
|
||||
}
|
||||
@@ -3436,7 +3436,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
|
||||
if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
|
||||
prev = p;
|
||||
num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
|
||||
if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (num < 0 || num >= 256) return ONIGERR_TOO_BIG_NUMBER;
|
||||
if (p == prev) { /* can't read nothing. */
|
||||
num = 0; /* but, it's not error */
|
||||
}
|
||||
@@ -4068,7 +4068,9 @@ next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
|
||||
}
|
||||
}
|
||||
|
||||
*state = CCS_VALUE;
|
||||
if (*state != CCS_START)
|
||||
*state = CCS_VALUE;
|
||||
|
||||
*type = CCV_CLASS;
|
||||
return 0;
|
||||
}
|
||||
@@ -4084,7 +4086,11 @@ next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v,
|
||||
switch (*state) {
|
||||
case CCS_VALUE:
|
||||
if (*type == CCV_SB)
|
||||
{
|
||||
if (*vs > 0xff)
|
||||
return ONIGERR_INVALID_CODE_POINT_VALUE;
|
||||
BITSET_SET_BIT(cc->bs, (int )(*vs));
|
||||
}
|
||||
else if (*type == CCV_CODE_POINT) {
|
||||
r = add_code_range(&(cc->mbuf), env, *vs, *vs);
|
||||
if (r < 0) return r;
|
||||
|
||||
@@ -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
|
||||
+7
-2
@@ -1156,7 +1156,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;
|
||||
|
||||
@@ -1170,8 +1170,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;
|
||||
|
||||
@@ -1251,6 +1252,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;
|
||||
zend_ulong *ret;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) {
|
||||
@@ -1280,8 +1281,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
|
||||
@@ -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);
|
||||
|
||||
|
||||
+2
-2
@@ -335,7 +335,7 @@ if test "$PHP_OCI8" != "no"; then
|
||||
|
||||
PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
|
||||
PHP_ADD_LIBPATH($OCI8_DIR/$OCI8_LIB_DIR, OCI8_SHARED_LIBADD)
|
||||
PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c, $ext_shared)
|
||||
PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c, $ext_shared)
|
||||
AC_DEFINE(HAVE_OCI8,1,[Defined to 1 if the PHP OCI8 extension for Oracle Database is configured])
|
||||
|
||||
PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
|
||||
@@ -406,7 +406,7 @@ if test "$PHP_OCI8" != "no"; then
|
||||
|
||||
AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[Defined to 1 if OCI8 configuration located Oracle's Instant Client libraries])
|
||||
|
||||
PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c, $ext_shared)
|
||||
PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c, $ext_shared)
|
||||
AC_DEFINE(HAVE_OCI8,1,[Defined to 1 if the PHP OCI8 extension for Oracle Database is configured])
|
||||
|
||||
PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
|
||||
|
||||
+3
-3
@@ -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);
|
||||
@@ -80,7 +80,7 @@ if (PHP_OCI8_11G != "no") {
|
||||
if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) &&
|
||||
CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths))
|
||||
{
|
||||
EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c', null, null, null, "ext\\oci8_11g")
|
||||
EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_11g")
|
||||
|
||||
AC_DEFINE('HAVE_OCI8', 1);
|
||||
AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
|
||||
@@ -115,7 +115,7 @@ if (PHP_OCI8_12C != "no") {
|
||||
if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_12C", oci8_12c_inc_paths) &&
|
||||
CHECK_LIB("oci.lib", "oci8_12c", oci8_12c_lib_paths))
|
||||
{
|
||||
EXTENSION('oci8_12c', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c', null, null, null, "ext\\oci8_12c")
|
||||
EXTENSION('oci8_12c', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_12c")
|
||||
|
||||
AC_DEFINE('HAVE_OCI8', 1);
|
||||
AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
|
||||
|
||||
@@ -504,6 +504,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_new_collection, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, type_name)
|
||||
ZEND_ARG_INFO(0, schema_name)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
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 */
|
||||
@@ -701,6 +710,8 @@ PHP_FUNCTION(oci_collection_assign);
|
||||
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
|
||||
@@ -783,6 +794,8 @@ static const zend_function_entry php_oci_functions[] = {
|
||||
PHP_FE(oci_collection_max, arginfo_oci_collection_max)
|
||||
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)
|
||||
@@ -1129,6 +1142,20 @@ PHP_MINIT_FUNCTION(oci)
|
||||
REGISTER_LONG_CONSTANT("OCI_TEMP_CLOB",OCI_TEMP_CLOB, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_TEMP_BLOB",OCI_TEMP_BLOB, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
/* for Transparent Application Failover */
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_END", OCI_FO_END, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_ABORT", OCI_FO_ABORT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_REAUTH", OCI_FO_REAUTH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_BEGIN", OCI_FO_BEGIN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_ERROR", OCI_FO_ERROR, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_NONE", OCI_FO_NONE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_SESSION", OCI_FO_SESSION, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_SELECT", OCI_FO_SELECT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_TXNAL", OCI_FO_TXNAL, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
REGISTER_LONG_CONSTANT("OCI_FO_RETRY", OCI_FO_RETRY, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1930,6 +1957,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
connection = (php_oci_connection *) ecalloc(1, sizeof(php_oci_connection));
|
||||
connection->hash_key = zend_string_dup(hashed_details.s, 0);
|
||||
connection->is_persistent = 0;
|
||||
ZVAL_UNDEF(&connection->taf_callback);
|
||||
#ifdef HAVE_OCI8_DTRACE
|
||||
connection->client_id = NULL;
|
||||
#endif
|
||||
@@ -1944,6 +1972,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
return NULL;
|
||||
}
|
||||
connection->is_persistent = 1;
|
||||
ZVAL_UNDEF(&connection->taf_callback);
|
||||
#ifdef HAVE_OCI8_DTRACE
|
||||
connection->client_id = NULL;
|
||||
#endif
|
||||
@@ -1952,6 +1981,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
connection = (php_oci_connection *) ecalloc(1, sizeof(php_oci_connection));
|
||||
connection->hash_key = zend_string_dup(hashed_details.s, 0);
|
||||
connection->is_persistent = 0;
|
||||
ZVAL_UNDEF(&connection->taf_callback);
|
||||
#ifdef HAVE_OCI8_DTRACE
|
||||
connection->client_id = NULL;
|
||||
#endif
|
||||
@@ -2225,6 +2255,15 @@ static int php_oci_connection_close(php_oci_connection *connection)
|
||||
connection->client_id = NULL;
|
||||
}
|
||||
#endif /* HAVE_OCI8_DTRACE */
|
||||
|
||||
if (!Z_ISUNDEF(connection->taf_callback)) {
|
||||
/* If it's NULL, then its value should be freed already */
|
||||
if (!Z_ISNULL(connection->taf_callback)) {
|
||||
zval_ptr_dtor(&connection->taf_callback);
|
||||
}
|
||||
ZVAL_UNDEF(&connection->taf_callback);
|
||||
}
|
||||
|
||||
pefree(connection, connection->is_persistent);
|
||||
connection = NULL;
|
||||
OCI_G(in_call) = in_call_save;
|
||||
@@ -2667,6 +2706,11 @@ static int php_oci_persistent_helper(zval *zv)
|
||||
if (le->type == le_pconnection) {
|
||||
connection = (php_oci_connection *)le->ptr;
|
||||
|
||||
/* 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_unregister_taf_callback(connection);
|
||||
}
|
||||
|
||||
if (!connection->used_this_request && OCI_G(persistent_timeout) != -1) {
|
||||
#ifdef HAVE_OCI8_DTRACE
|
||||
if (DTRACE_OCI8_CONNECT_EXPIRY_ENABLED()) {
|
||||
|
||||
@@ -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> |
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 7 |
|
||||
+----------------------------------------------------------------------+
|
||||
| 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 |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| 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> |
|
||||
| Thies C. Arntzen <thies@thieso.net> |
|
||||
| |
|
||||
| Collection support by Andy Sautins <asautins@veripost.net> |
|
||||
| Temporary LOB support by David Benson <dbenson@mancala.com> |
|
||||
| ZTS per process OCIPLogon by Harald Radi <harald.radi@nme.at> |
|
||||
| |
|
||||
| Redesigned by: Antony Dovgal <antony@zend.com> |
|
||||
| Andi Gutmans <andi@zend.com> |
|
||||
| Wez Furlong <wez@omniti.com> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_ini.h"
|
||||
|
||||
#if HAVE_OCI8
|
||||
|
||||
#include "php_oci8.h"
|
||||
#include "php_oci8_int.h"
|
||||
|
||||
/* {{{ callback_fn()
|
||||
OCI TAF callback function, calling userspace function */
|
||||
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 unregistered */
|
||||
if (Z_ISUNDEF(connection->taf_callback) || Z_ISNULL(connection->taf_callback)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Initialize zval */
|
||||
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, &connection->taf_callback, &retval, 3, params) == FAILURE) {
|
||||
php_error_docref(NULL, E_WARNING, "Unable to call Oracle TAF callback function");
|
||||
}
|
||||
|
||||
/* Set return value */
|
||||
if (Z_TYPE(retval) == IS_LONG) {
|
||||
returnValue = (sb4) Z_LVAL(retval);
|
||||
}
|
||||
|
||||
/* Setting params[0] to null so ressource isn't destroyed on zval_dtor */
|
||||
ZVAL_NULL(¶ms[0]);
|
||||
|
||||
/* Cleanup */
|
||||
zval_dtor(&retval);
|
||||
zval_dtor(¶ms[0]);
|
||||
zval_dtor(¶ms[1]);
|
||||
zval_dtor(¶ms[2]);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_oci_unregister_taf_callback()
|
||||
Unregister the userspace callback function for Oracle TAF,
|
||||
while keeping the OCI callback alive */
|
||||
int php_oci_unregister_taf_callback(php_oci_connection *connection)
|
||||
{
|
||||
return php_oci_register_taf_callback(connection, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_oci_register_taf_callback()
|
||||
Register a callback function for Oracle TAF */
|
||||
int php_oci_register_taf_callback(php_oci_connection *connection, zval *callback)
|
||||
{
|
||||
sword errstatus;
|
||||
int registered = 0;
|
||||
|
||||
/* temporary failover callback structure */
|
||||
OCIFocbkStruct failover;
|
||||
|
||||
if (!callback) {
|
||||
/* Unregister callback */
|
||||
if (Z_ISUNDEF(connection->taf_callback) || Z_ISNULL(connection->taf_callback)) {
|
||||
return 0; // Nothing to unregister
|
||||
}
|
||||
|
||||
registered = 1;
|
||||
zval_ptr_dtor(&connection->taf_callback);
|
||||
ZVAL_NULL(&connection->taf_callback);
|
||||
} else {
|
||||
if (!Z_ISUNDEF(connection->taf_callback)) {
|
||||
registered = 1;
|
||||
if (!Z_ISNULL(connection->taf_callback)) {
|
||||
zval_ptr_dtor(&connection->taf_callback);
|
||||
ZVAL_NULL(&connection->taf_callback);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set userspace callback function */
|
||||
ZVAL_COPY(&connection->taf_callback, callback);
|
||||
}
|
||||
|
||||
/* OCI callback function already registered */
|
||||
if (registered) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* set context */
|
||||
failover.fo_ctx = connection;
|
||||
|
||||
/* set callback function */
|
||||
failover.callback_function = &callback_fn;
|
||||
|
||||
/* do the registration */
|
||||
PHP_OCI_CALL_RETURN(errstatus, OCIAttrSet, (connection->server, (ub4) OCI_HTYPE_SERVER, (void *) &failover, (ub4) 0, (ub4) OCI_ATTR_FOCBK, connection->err));
|
||||
|
||||
if (errstatus != OCI_SUCCESS) {
|
||||
zval_ptr_dtor(&connection->taf_callback);
|
||||
ZVAL_UNDEF(&connection->taf_callback);
|
||||
connection->errcode = php_oci_error(connection->err, errstatus);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* successful conclusion */
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif /* HAVE_OCI8 */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
@@ -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> |
|
||||
@@ -42,6 +42,68 @@
|
||||
#define OCI_STMT_CALL 10
|
||||
#endif
|
||||
|
||||
/* {{{ proto bool oci_register_taf_callback( resource connection [, mixed callback] )
|
||||
Register a callback function for Oracle Transparent Application Failover (TAF) */
|
||||
PHP_FUNCTION(oci_register_taf_callback)
|
||||
{
|
||||
zval *z_connection;
|
||||
php_oci_connection *connection;
|
||||
zval *callback;
|
||||
zend_string *callback_name;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!", &z_connection, &callback) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (php_oci_register_taf_callback(connection, callback) == 0) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ 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!!! */
|
||||
@@ -1553,6 +1615,9 @@ PHP_FUNCTION(oci_close)
|
||||
internally Zend engine increments
|
||||
RefCount value by 1 */
|
||||
zend_list_close(connection->id);
|
||||
|
||||
/* 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> |
|
||||
|
||||
+17
-16
@@ -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> |
|
||||
@@ -38,6 +38,13 @@
|
||||
#include "php_oci8.h"
|
||||
#include "php_oci8_int.h"
|
||||
|
||||
#if defined(OCI_MAJOR_VERSION) && (OCI_MAJOR_VERSION > 10) && \
|
||||
(defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64))
|
||||
typedef ub8 oci_phpsized_int;
|
||||
#else
|
||||
typedef ub4 oci_phpsized_int;
|
||||
#endif
|
||||
|
||||
/* {{{ php_oci_statement_create()
|
||||
Create statemend handle and allocate necessary resources */
|
||||
php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char *query, int query_len)
|
||||
@@ -997,10 +1004,10 @@ int php_oci_bind_post_exec(zval *data)
|
||||
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_LONG(entry, ((ub4 *)(bind->array.elements))[i]);
|
||||
ZVAL_LONG(entry, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_long(bind->zval, ((ub4 *)(bind->array.elements))[i]);
|
||||
add_next_index_long(bind->zval, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1153,14 +1160,8 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
return 1;
|
||||
}
|
||||
convert_to_long(param);
|
||||
#if defined(OCI_MAJOR_VERSION) && (OCI_MAJOR_VERSION > 10) && \
|
||||
(defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64))
|
||||
bind_data = (ub8 *)&Z_LVAL_P(param);
|
||||
value_sz = sizeof(ub8);
|
||||
#else
|
||||
bind_data = (ub4 *)&Z_LVAL_P(param);
|
||||
value_sz = sizeof(ub4);
|
||||
#endif
|
||||
bind_data = (oci_phpsized_int *)&Z_LVAL_P(param);
|
||||
value_sz = sizeof(oci_phpsized_int);
|
||||
mode = OCI_DEFAULT;
|
||||
break;
|
||||
|
||||
@@ -1783,10 +1784,10 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
bind->array.elements = (ub4 *)safe_emalloc(max_table_length, sizeof(ub4), 0);
|
||||
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;
|
||||
bind->array.max_length = sizeof(ub4);
|
||||
bind->array.max_length = sizeof(oci_phpsized_int);
|
||||
bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0);
|
||||
memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2));
|
||||
bind->array.indicators = NULL;
|
||||
@@ -1794,14 +1795,14 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le
|
||||
zend_hash_internal_pointer_reset(hash);
|
||||
for (i = 0; i < max_table_length; i++) {
|
||||
if (i < bind->array.current_length) {
|
||||
bind->array.element_lengths[i] = sizeof(ub4);
|
||||
bind->array.element_lengths[i] = sizeof(oci_phpsized_int);
|
||||
}
|
||||
if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
convert_to_long_ex(entry);
|
||||
((ub4 *)bind->array.elements)[i] = (ub4) Z_LVAL_P(entry);
|
||||
((oci_phpsized_int *)bind->array.elements)[i] = (oci_phpsized_int) Z_LVAL_P(entry);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
((ub4 *)bind->array.elements)[i] = 0;
|
||||
((oci_phpsized_int *)bind->array.elements)[i] = 0;
|
||||
}
|
||||
}
|
||||
zend_hash_internal_pointer_reset(hash);
|
||||
|
||||
Loaded 100 of 250 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user