Commit Graph

38465 Commits

Author SHA1 Message Date
Kalle Sommer Nielsen
de2d244f8e We can re-use the already existing EG(windows_version_info) here and save a little bit of memory too! 2015-03-29 09:47:14 +02:00
Kalle Sommer Nielsen
a141ccb4ff Another minor cleanup, drop ENFORCE_SAFE_MODE (all except pdo_pgsql have #if's for checking already) 2015-03-29 09:34:05 +02:00
Kalle Sommer Nielsen
7845bcd827 Shameless self credit for the Windows support for contributions in the almost past decade (How time flies when you are having fun) 2015-03-29 08:11:08 +02:00
Kalle Sommer Nielsen
0ca8ffa2b8 Forgot this one in the last commit, removes old VC support from ext/fileinfo 2015-03-29 07:54:18 +02:00
Kalle Sommer Nielsen
88b9d485d6 Drop old VC support for ext/fileinfo.
@Anatol, I generated the updated patch file against file 5.22, since you are the one that usually updates it, can you please confirm it works?
2015-03-29 07:48:48 +02:00
Kalle Sommer Nielsen
75e86b44fc Drop this redundant check, since the minimum version of VC we support is VC11 (_MSC_VER == 1700) in ext/date 2015-03-29 07:14:54 +02:00
Kalle Sommer Nielsen
43457f960f Drop old VC support (VC <= 9), for dns.c, this means that DNS_TYPE_NAPTR always is available 2015-03-29 06:57:11 +02:00
Kalle Sommer Nielsen
3d4aad5e27 Remove this VC8 check as our minimum target version of VC is higher 2015-03-29 06:50:09 +02:00
Kalle Sommer Nielsen
169ed3257b Drop VC6 support in ext/calendar 2015-03-29 06:35:23 +02:00
Kalle Sommer Nielsen
f8590f7100 Drop this struct (it was only used for VC6 which we don't support anyway) 2015-03-29 06:20:30 +02:00
Xinchen Hui
1646e0e9d7 Fixed typo 2015-03-28 18:51:57 +08:00
Xinchen Hui
5c31c8c6e5 Fixed is_callable/function_exists with disable_functions 2015-03-28 17:07:11 +08:00
Xinchen Hui
193de2a679 Fixed memleak
ext/standard/tests/serialize/bug69210.phpt
2015-03-28 14:35:14 +08:00
Xinchen Hui
e60b380c55 Merge branch 'bug69315' of https://github.com/laruence/php-src 2015-03-28 14:10:41 +08:00
Kalle Sommer Nielsen
8153286efe Drop zend_indent() as it was never used, complete or working 2015-03-27 20:04:46 +01:00
Dmitry Stogov
75f40ae1f3 Fixed bug #69293 2015-03-27 18:40:58 +03:00
Kalle Sommer Nielsen
f678519a63 Merge branch 'master' of https://git.php.net/push/php-src 2015-03-27 15:21:52 +01:00
Kalle Sommer Nielsen
dd601e661c Remove these CFLAGS for ereg in opcache, we don't use them anymore (as opcache uses PCRE) together with ereg being gone 2015-03-27 15:01:31 +01:00
Leigh
456f4a78d2 Add RAND_egd check for compiling against LibreSSL 2015-03-27 13:33:22 +01:00
Leigh
a04ab4b54b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add RAND_egd check for compiling against LibreSSL
2015-03-27 13:26:48 +01:00
Leigh
1b2d58a364 Add RAND_egd check for compiling against LibreSSL 2015-03-27 13:24:36 +01:00
Xinchen Hui
84d9426730 Fixed bug #69315 2015-03-27 17:50:36 +08:00
Kalle Sommer Nielsen
d9d74d37ac Fix test on Windows 2015-03-26 03:29:18 +01:00
Kalle Sommer Nielsen
9dfe033ae4 Fix test on Windows 2015-03-26 03:22:57 +01:00
Kalle Sommer Nielsen
71734d64c8 Fix tests on Windows
CRLF takes +2 bytes when running the tests, making it yield 13 instead of 11
2015-03-26 03:13:50 +01:00
Kalle Sommer Nielsen
67b907f059 Change the error message for colliding class/interface/trait names to be a little more clearer.
C:\> php -r "interface stdClass { }"
  Error: Cannot declare interface stdClass, because the name is already in use in Command Line Code on line 1
2015-03-26 01:44:23 +01:00
Anatol Belski
2cd07c377d remove recognition for no more supported OSes 2015-03-25 19:31:50 +01:00
Xinchen Hui
d55d10c7fd Fixed bug #69299 (Regression in array_filter's $flag argument in PHP 7) 2015-03-25 23:50:54 +08:00
Xinchen Hui
6aaee5fc14 Merge branch 'PHP-5.6'
Conflicts:
	ext/opcache/Optimizer/pass1_5.c
2015-03-25 23:35:56 +08:00
Xinchen Hui
d380d1cb1b Fixed Bug #69297 (function_exists strange behavior with OPCache on disabled function)
is_callable returns true for disable_functions, but function_exists
return false for it.
2015-03-25 23:34:02 +08:00
Xinchen Hui
e46e9a3d22 Fixed Bug #69297 (function_exists strange behavior with OPCache on disabled function)
is_callable returns true for disable_functions, but function_exists
return false for it.
2015-03-25 23:29:18 +08:00
Anatol Belski
1f84e29506 integrate static tsrm_ls cache for ext/odbc 2015-03-25 15:32:36 +01:00
Anatol Belski
774b113b32 fix datatype mismatches 2015-03-25 15:32:36 +01:00
Anatol Belski
fe36285de2 fix datatype mismatches 2015-03-25 15:32:35 +01:00
Anatol Belski
c87aee8a8a updated bundled libsqlite to 3.8.8.3 2015-03-25 13:16:56 +01:00
Anatol Belski
c9550e81da Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69287 upgrade bundled sqlite to 3.8.8.3
  fix dir separator in test
2015-03-25 13:13:42 +01:00
Anatol Belski
1b41dcf9c5 Fixed bug #69287 upgrade bundled sqlite to 3.8.8.3 2015-03-25 13:13:03 +01:00
Anatol Belski
8f9cb39cad fix dir separator in test 2015-03-25 13:11:27 +01:00
Remi Collet
23336d77a6 Merge branch 'PHP-5.6'
* PHP-5.6:
  revert a4157423934edf7b8fdbcee163cced9bfd5748a, fix build odbc as shared
  Fixed typo
  Fixed typo
2015-03-25 10:33:39 +01:00
Remi Collet
3924548bcb Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  revert a4157423934edf7b8fdbcee163cced9bfd5748a, fix build odbc as shared
2015-03-25 10:33:31 +01:00
Remi Collet
1174b399ad revert a4157423934edf7b8fdbcee163cced9bfd5748a, fix build odbc as shared 2015-03-25 10:33:08 +01:00
Kalle Sommer Nielsen
927d53fda4 Change "Cannot redeclare class X" into "Cannot redeclare class/interface/trait X", meaning that the following:
C:\> php -r "trait A { } trait A { }"

Will now properly print "Cannot redeclare trait A" instead of "Cannot redeclare class A" to make error messages a tiny bit clearer. Admittedly, a better solution can most likely be made by actually telling what the colliding object is a type of.

Internally this adds a new function:
 zend_get_object_type()
2015-03-25 06:31:11 +01:00
Kalle Sommer Nielsen
a3d2f9b600 The error message is actually "Cannot", not "Can't" 2015-03-25 05:20:58 +01:00
Xinchen Hui
86bbacfd53 Merge branch 'PHP-5.5' into PHP-5.6 2015-03-25 12:09:35 +08:00
Xinchen Hui
76c1ec5e96 Bug #69293 NEW segfault when using SoapClient::__setSoapHeader (bisected, regression)
This was a typo introduced in c8eaca013a
2015-03-25 12:07:25 +08:00
Anatol Belski
18e0393b71 robuster read/write for mod ps_files 2015-03-24 22:02:34 +01:00
Anatol Belski
512429ffc5 fix datatype mismatches 2015-03-24 22:02:33 +01:00
Anatol Belski
1a00554aaf fix datatype mismatches 2015-03-24 22:02:31 +01:00
Anatol Belski
3066851dab fix datatype mismatches 2015-03-24 22:02:29 +01:00
Anatol Belski
2192e96ef5 replace this version as it's unchanged since 5.4 at least 2015-03-24 22:02:25 +01:00
Dmitry Stogov
0ce7b4c8c6 Removed unused functions 2015-03-24 23:40:20 +03:00
Dmitry Stogov
e37e9d2986 Reverted part committed by mistake 2015-03-24 22:56:07 +03:00
Dmitry Stogov
23c33b1483 Optimized strings concatenation.
ZEND_ADD_STRING/VAR/CHAR are replaced with ZEND_ROPE_INTI, ZEND_ROPE_ADD, ZEND_ROPE_END.
Instead of reallocation and copying string on each ZEND_ADD_STRING/VAR/CAHR, collect all the strings and then allocate and construct the resulting string once.
2015-03-24 22:47:21 +03:00
Anatol Belski
663074b6b1 cleanup mod version macros and mod defs, round x 2015-03-23 21:30:22 +01:00
Anatol Belski
19360f386e cleanup mod version macros, round 3 2015-03-23 20:54:55 +01:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Anatol Belski
ec89c85054 cleaning up the version macros 2015-03-23 20:13:59 +01:00
Anatol Belski
88b2a2d405 export useful symbols from ext/simplexml 2015-03-23 18:33:37 +01:00
Anatol Belski
0313394fe4 revert yet unready stuff 2015-03-23 15:09:10 +01:00
Anatol Belski
567565b24f more fixes to the shared compilation 2015-03-23 15:09:09 +01:00
Anatol Belski
c0adad5557 fix exports and shared compilation 2015-03-23 15:09:07 +01:00
Anatol Belski
ffabfc703d fix exports 2015-03-23 15:09:06 +01:00
Anatol Belski
7a13715459 fix shared compilation 2015-03-23 15:09:03 +01:00
Anatol Belski
f195870a9e implemented --with-all-shared option 2015-03-23 15:09:01 +01:00
Stanislav Malyshev
28fdf6a131 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed #68021 - get_browser() browser_name_regex
2015-03-22 22:13:21 -07:00
Stanislav Malyshev
3342a248a2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed #68021 - get_browser() browser_name_regex
2015-03-22 22:13:08 -07:00
Tjerk Meesters
5b5742c016 Fixed #68021 - get_browser() browser_name_regex
Replaced expression delimiter with tilde (~) and escape where necessary.
2015-03-22 22:12:26 -07:00
Stanislav Malyshev
32bd6568d3 Merge branch 'PHP-5.6'
* PHP-5.6:
  Print checking message for all ODBC drivers
  Change default option of ODBC drivers to no to enable bulding standalone ODBC
2015-03-22 22:05:12 -07:00
Stanislav Malyshev
a1bca171d2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Print checking message for all ODBC drivers
  Change default option of ODBC drivers to no to enable bulding standalone ODBC

Conflicts:
	ext/odbc/config.m4
2015-03-22 22:04:41 -07:00
Lior Kaplan
6f5ed34d20 Print checking message for all ODBC drivers
This makes the output more readble in case no ODBC driver was selected
2015-03-22 22:03:38 -07:00
Lior Kaplan
7a41574239 Change default option of ODBC drivers to no to enable bulding standalone ODBC 2015-03-22 22:03:29 -07:00
Stanislav Malyshev
081a812b49 Merge branch 'PHP-5.6'
* PHP-5.6:
  oops, forgot TSRMLS_CC

Conflicts:
	ext/date/php_date.c
2015-03-22 21:56:40 -07:00
Stanislav Malyshev
57f835e148 oops, forgot TSRMLS_CC 2015-03-22 21:55:34 -07:00
Stanislav Malyshev
6929089db0 fix warning & improve error handling in CURL 2015-03-22 21:51:58 -07:00
Stanislav Malyshev
62859309b0 silence warning 2015-03-22 21:43:05 -07:00
Stanislav Malyshev
736afd48cf Merge branch 'PHP-5.6'
* PHP-5.6:
  Reduce downstream patches
2015-03-22 21:33:52 -07:00
lesniewskister
c12e031530 Reduce downstream patches
As per http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/php/5.6/patches/patch-ext_gd_libgd_gdcache_h?rev=1.1&content-type=text/x-cvsweb-markup
2015-03-22 21:33:45 -07:00
Stanislav Malyshev
dc6d8f7838 Merge branch 'PHP-5.6'
* PHP-5.6:
  Adding a new `createFromImmutable` method to the `DateTime` class to mirror the current `DateTime::createFromMutable()`

Conflicts:
	ext/date/php_date.c
2015-03-22 21:09:00 -07:00
Stanislav Malyshev
cc2fd00942 Merge branch 'pull-request/1145'
* pull-request/1145:
  Putting whitespace back to the way it was.
  Updating the `DateTime_verify` test to include the new method in the reflected method list
  Whoops! String length....
  Adding a new test for the new method
  Adding a new `createFromImmutable` method to the `DateTime` class to mirror the current `DateTime::createFromMutable()`
2015-03-22 21:04:41 -07:00
Stanislav Malyshev
aa22e80b1a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Adding a new `createFromImmutable` method to the `DateTime` class to mirror the current `DateTime::createFromMutable()`
2015-03-22 21:03:46 -07:00
Trevor Suarez
c2e22556ba Adding a new createFromImmutable method to the DateTime class to mirror the current DateTime::createFromMutable() 2015-03-22 20:54:25 -07:00
Juan Basso
3e7f47cb03 Renamed test case to match with reported bug 2015-03-22 20:34:59 -07:00
Juan Basso
4076a4d2a9 Fixed serialization of non string values on __sleep
Returning just N; (null) on the __sleep makes the number of fields/values be incomplete and corrupting the generated value from serialize, making impossible to unserialize it.

Conflicts:
	ext/standard/var.c
2015-03-22 20:31:40 -07:00
Stanislav Malyshev
b62eec67df Merge branch 'pull-request/1057'
* pull-request/1057:
  Renamed test case to match with reported bug
  Fixed serialization of non string values on __sleep
2015-03-22 20:27:35 -07:00
Stanislav Malyshev
be2e0b39ba Merge branch 'PHP-5.6'
* PHP-5.6:
  add CURL_HTTP_VERSION_2_0 and CURL_VERSION_HTTP2
2015-03-22 18:55:04 -07:00
Stanislav Malyshev
c6384a7908 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  add CURL_HTTP_VERSION_2_0 and CURL_VERSION_HTTP2
2015-03-22 18:54:48 -07:00
Masaki Kagaya
1badfd8171 add CURL_HTTP_VERSION_2_0 and CURL_VERSION_HTTP2 2015-03-22 18:52:42 -07:00
Stanislav Malyshev
cd5802e1b3 Merge branch 'PHP-5.6'
* PHP-5.6:
  Bacport fix bug #68741 - Null pointer dereference
  Check that the type is correct

Conflicts:
	ext/standard/incomplete_class.c
2015-03-22 18:33:39 -07:00
Stanislav Malyshev
fce9a856e7 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Bacport fix bug #68741 - Null pointer dereference
  Check that the type is correct
2015-03-22 18:32:16 -07:00
Stanislav Malyshev
723ffe2e89 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Bacport fix bug #68741 - Null pointer dereference
  Check that the type is correct
2015-03-22 18:30:56 -07:00
Stanislav Malyshev
968fbc6acf Bacport fix bug #68741 - Null pointer dereference 2015-03-22 18:30:05 -07:00
Stanislav Malyshev
fb83c76dee Check that the type is correct 2015-03-22 18:17:47 -07:00
Stanislav Malyshev
5a5b63774b Merge branch 'pull-request/1091'
* pull-request/1091:
  Stop trying to call the callback after it has thrown an exception. Also, as an exception has been thrown, there is no need to have a separate error message.
  Fix freeing null segfault. Added test for behaviour.

Conflicts:
	ext/sqlite3/tests/bug68760.phpt
2015-03-22 16:48:54 -07:00
Stanislav Malyshev
574b9a4e60 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #68760: Fix freeing null segfault. Added test for behaviour.
  Fix #68760: Fix freeing null segfault. Added test for behaviour.

Conflicts:
	ext/sqlite3/sqlite3.c
2015-03-22 16:47:54 -07:00
Stanislav Malyshev
40037f1474 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix #68760: Fix freeing null segfault. Added test for behaviour.

Conflicts:
	ext/sqlite3/tests/bug68760.phpt
2015-03-22 16:46:30 -07:00
Danack
0c27a8eb61 Fix #68760: Fix freeing null segfault. Added test for behaviour. 2015-03-22 16:46:02 -07:00
Danack
1ec430d4ed Fix #68760: Fix freeing null segfault. Added test for behaviour. 2015-03-22 16:44:06 -07:00
Anatol Belski
63d7cd7d5b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  cosmetic fix to default odbcver
  Remove extraneous strlen() call
2015-03-23 00:07:43 +01:00
Anatol Belski
a759c40872 cosmetic fix to default odbcver 2015-03-23 00:07:09 +01:00
Anatol Belski
6b01927126 cosmetic fix to default odbcver 2015-03-23 00:06:00 +01:00
Rasmus Lerdorf
d33636f764 Remove extraneous strlen() call 2015-03-21 08:29:12 -07:00
Rasmus Lerdorf
7fce3607ea Remove extraneous strlen() call 2015-03-21 08:28:40 -07:00
Rasmus Lerdorf
f01071f55f Remove extraneous strlen() call 2015-03-21 08:26:06 -07:00
Derick Rethans
a86a871bd0 - Updated to version 2015.2 (2015b) 2015-03-21 14:51:14 +01:00
Derick Rethans
a73d0b0fb3 - Updated to version 2015.2 (2015b) 2015-03-21 14:51:11 +01:00
Derick Rethans
b98a486606 - Updated to version 2015.2 (2015b) 2015-03-21 14:51:09 +01:00
Xinchen Hui
784c60ab6d Improve test scripts 2015-03-21 21:11:14 +08:00
Xinchen Hui
a4529cc0e5 Fixed memleak 2015-03-21 20:17:04 +08:00
Xinchen Hui
4180226117 More error conditions 2015-03-21 16:54:45 +08:00
Xinchen Hui
5f845cdc48 Merge branch 'master' of https://git.php.net/repository/php-src 2015-03-21 15:56:52 +08:00
Xinchen Hui
2f6dbfc26b Improved impelmentation(and cleanup behaviro with errors conditions) 2015-03-21 15:56:42 +08:00
Rasmus Lerdorf
4d10e15845 Fix a couple of warnings 2015-03-20 23:32:07 -07:00
Xinchen Hui
c524dd6d1e Merge branch 'rfc-preg-replace-callback-array' of https://github.com/zxcvdavid/php-src
Conflicts:
	Zend/zend_vm_gen.php
	ext/pcre/php_pcre.c
2015-03-21 14:01:11 +08:00
Xinchen Hui
775a257cef Only used in ZTS 2015-03-21 13:58:29 +08:00
Dmitry Stogov
430266edfa Merge branch 'scalar_type_hints_v5'
* scalar_type_hints_v5: (65 commits)
  Fixed in-place modification of IS_CONST operand
  Changed SKIPIF messages
  ZPP changed to lazely check for "strict/weak" only if it's really necessary. Cleanup.
  cleanup
  Fixed return type hint handling for constants
  Fixed tests
  Imroved ZPP rules (condititins reoredered to prevent duplicate checks)
  Fixed comments
  Fixed error messages
  Improved type hinting:
  Fixed white spaces
  Add check for maintaining reference all the way through both type and return values
  Reduce the number of times that the zval needs to be separated in return type checking to those that are necessary
  Add test to ensure namespaced code can't use scalar types as class names
  Disallow relative namespace type declarations
  Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse
  Refactor as to not use call info, but add the flag to the op_array.
  Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come
  Fix C89 compatibility by moving a misplaced if statement
  Refactor gotos into more elaborate ifs to eliminate goto failure
  ...
2015-03-21 01:00:00 +03:00
Anatol Belski
a43a9c9137 use correct api 2015-03-20 17:11:36 +01:00
Dmitry Stogov
aee2985f35 Merge branch 'scalar_type_hints_v5' of github.com:ircmaxell/php-src into scalar_type_hints_v5
* 'scalar_type_hints_v5' of github.com:ircmaxell/php-src: (54 commits)
  Add check for maintaining reference all the way through both type and return values
  Reduce the number of times that the zval needs to be separated in return type checking to those that are necessary
  Add test to ensure namespaced code can't use scalar types as class names
  Disallow relative namespace type declarations
  Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse
  Refactor as to not use call info, but add the flag to the op_array.
  Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come
  Fix C89 compatibility by moving a misplaced if statement
  Refactor gotos into more elaborate ifs to eliminate goto failure
  Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases
  Add error case with invalid type declaration default value
  Add tests for using constants as defaults with scalar type declarations
  Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work
  Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield
  Style cleanup, as well as fixing bug with missing argument for WRONG_PARAM_COUNT_WITH_RETVAL
  Clean up API renames for zend_wrong_param_count to maintain BC, introducing a zend_wrong_param_count_ex() function when you know strict value
  Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages
  Fix more tests, improve error messages in failure output for thrown exception
  Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function
  Refactor declare placement detection, allow encoding declares before type declares
  ...
2015-03-20 10:51:41 +03:00
Dmitry Stogov
0a6bb2dfd4 Fixed optimization patterns 2015-03-20 05:24:04 +03:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Dmitry Stogov
452a5d8e6b String reference counters may be increased when string copied 2015-03-19 23:42:39 +03:00
Dmitry Stogov
ca783218e7 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #69152

Conflicts:
	ext/soap/soap.c
2015-03-19 11:54:56 +03:00
Dmitry Stogov
0c3de98368 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69152
2015-03-19 11:48:10 +03:00
Dmitry Stogov
9bdbc7490f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #69152
2015-03-19 11:42:49 +03:00
Dmitry Stogov
51856a76f8 Fixed bug #69152 2015-03-19 11:36:01 +03:00
Anthony Ferrara
1df033c5cd Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield 2015-03-18 16:14:02 -04:00
Anthony Ferrara
d22bfb8aa6 Merge in master, fix merge conflicts and update patch to support exceptions everywhere 2015-03-18 10:50:11 -04:00
Dmitry Stogov
d092cb6e8e Second prefetch is useless, because cahce line on modern x86 CPUs is 64 bytes long. 2015-03-18 17:11:21 +03:00
Stanislav Malyshev
1ecd82f588 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
  oops, no idea how this got in
  Fix bug #69248 - heap overflow vulnerability in regcomp.c
  add test for bug #68976
  add NEWS
  Fixed bug #68976 - Use After Free Vulnerability in unserialize()
  update news
  Fixed bug #69134 (Per Directory Values overrides PHP_INI_SYSTEM configuration options)
  fix tests
  Fix bug #69207 - move_uploaded_file allows nulls in path

Conflicts:
	ext/ereg/regex/regcomp.c
	ext/standard/basic_functions.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	win32/registry.c
2015-03-17 22:04:39 -07:00
Stanislav Malyshev
225cb973e5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary

Conflicts:
	ext/zip/lib/zip_dirent.c
2015-03-17 22:03:24 -07:00
Stanislav Malyshev
53eff4a369 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
2015-03-17 22:00:29 -07:00
Stanislav Malyshev
ef8fc4b53d Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary 2015-03-17 21:59:56 -07:00
Xinchen Hui
205fe3ab89 Re-fix tests 2015-03-18 12:28:27 +08:00
Xinchen Hui
22b8b1d3f3 Revert "fix tests"
This reverts commit 38e15d89d7.
2015-03-18 12:27:13 +08:00
Xinchen Hui
e78278d878 Revert "Fixed tests"
This reverts commit f57f1a903d.
2015-03-18 12:26:56 +08:00
Xinchen Hui
f57f1a903d Fixed tests 2015-03-18 12:19:56 +08:00
Stanislav Malyshev
d76b293ac7 forgot to commit this one 2015-03-17 17:16:27 -07:00
Stanislav Malyshev
63c9f830b1 add test for bug #68976 2015-03-17 17:16:15 -07:00
Stanislav Malyshev
bf2f03ddb3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69248 - heap overflow vulnerability in regcomp.c
  add test for bug #68976
2015-03-17 17:10:05 -07:00
Stanislav Malyshev
890b3987ab Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #69248 - heap overflow vulnerability in regcomp.c
  add test for bug #68976
2015-03-17 17:09:47 -07:00
Stanislav Malyshev
c83dd84ad6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69248 - heap overflow vulnerability in regcomp.c
  add test for bug #68976
2015-03-17 17:08:13 -07:00
Stanislav Malyshev
fb04dcf6db Fix bug #69248 - heap overflow vulnerability in regcomp.c
Merged from 70bc296560
2015-03-17 17:04:57 -07:00
Stanislav Malyshev
8b14d3052f add test for bug #68976 2015-03-17 17:03:46 -07:00
Stanislav Malyshev
780222f97f Fixed bug #68976 - Use After Free Vulnerability in unserialize() 2015-03-17 16:31:52 -07:00
Stanislav Malyshev
38e15d89d7 fix tests 2015-03-17 16:30:57 -07:00
Stanislav Malyshev
6632684e03 Fix bug #69207 - move_uploaded_file allows nulls in path 2015-03-17 16:30:57 -07:00
Stanislav Malyshev
33a5532b66 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #68976 - Use After Free Vulnerability in unserialize()

Conflicts:
	ext/standard/var_unserializer.c
2015-03-17 13:23:51 -07:00
Stanislav Malyshev
d5e523f52f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #68976 - Use After Free Vulnerability in unserialize()

Conflicts:
	ext/standard/var_unserializer.c
2015-03-17 13:22:12 -07:00
Stanislav Malyshev
646572d6d3 Fixed bug #68976 - Use After Free Vulnerability in unserialize() 2015-03-17 13:20:22 -07:00
Stanislav Malyshev
3477568b4e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix tests
  Fix bug #69207 - move_uploaded_file allows nulls in path
2015-03-17 12:58:00 -07:00
Stanislav Malyshev
9ba4db5e5d fix tests 2015-03-17 12:55:35 -07:00
Stanislav Malyshev
e55e40ca66 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69207 - move_uploaded_file allows nulls in path
2015-03-17 12:48:37 -07:00
Stanislav Malyshev
1291d6bbee Fix bug #69207 - move_uploaded_file allows nulls in path 2015-03-17 12:47:58 -07:00
julien.pons
90114a3e93 Add wifcontinued and wcontinued for pcntl 2015-03-17 10:59:58 +01:00
Danack
910a324306 Fixed indentation. Fixed comment style. Fixed commented out code. 2015-03-16 23:14:56 +00:00
Julien Pauli
4d3a3811a9 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix flaws in session module

Conflicts:
	ext/session/session.c
2015-03-16 16:11:02 +01:00
Julien Pauli
2a50877428 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix flaws in session module
2015-03-16 16:01:12 +01:00
Julien Pauli
4dba99c226 Fix flaws in session module 2015-03-16 16:00:46 +01:00
Dmitry Stogov
0a6ab089cd Use memcmp() instead of strncmp() 2015-03-16 15:53:54 +03:00
Anatol Belski
293d6e629d backport af2b0669 into 5.5 2015-03-16 08:32:39 +01:00
Danack
6b232643e5 Reverted change to function name and added note of why it is different from the class it is actually changing. 2015-03-15 18:03:08 +00:00
Anatol Belski
8f0dbe2355 Merge branch 'PHP-5.6'
* PHP-5.6:
  libxml-2.9.2 compatibility
2015-03-15 18:39:38 +01:00
Anatol Belski
af2b066911 libxml-2.9.2 compatibility 2015-03-15 18:38:50 +01:00
Danack
9803fccfbc Made UConverter throw an exception if the constructor fails. 2015-03-15 15:30:25 +00:00
Danack
d3267d0092 Fixed PDO constructor to not return null. 2015-03-15 15:03:03 +00:00
Danack
78ebf83ad3 Fixed fileinfo behaviour. 2015-03-15 14:54:49 +00:00
Danack
0922eca0c7 Made Phar throw exception on bad constructor. 2015-03-15 14:47:07 +00:00
Danack
99dae96dc0 Converted intl extension to use IntlException in constructors. 2015-03-15 13:59:48 +00:00
Anatol Belski
bbc183d88a Merge branch 'PHP-5.6'
* PHP-5.6:
  fix test
2015-03-14 18:31:02 +01:00
Anatol Belski
2ac31872ac Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test
2015-03-14 18:30:32 +01:00
Anatol Belski
c21c8f369d fix test 2015-03-14 18:29:59 +01:00
Nikita Popov
547d387973 Merge branch 'PHP-5.6' 2015-03-14 09:18:50 +01:00
Nikita Popov
846c8059e6 Merge branch 'PHP-5.5' into PHP-5.6 2015-03-14 09:18:31 +01:00
Jeff Welch
1e51c5411e Fix #69203: FILTER_FLAG_STRIP_HIGH doesn't strip ASCII 127 2015-03-14 09:17:36 +01:00
Reeze Xia
7409fd4bf7 Fix folder mark 2015-03-14 14:06:57 +08:00
Xinchen Hui
9420a2a5b0 Merge branch 'PHP-5.6' 2015-03-14 11:32:09 +08:00
Xinchen Hui
96bb3b838c Merge branch 'PHP-5.5' into PHP-5.6 2015-03-14 11:31:53 +08:00
Xinchen Hui
5b87d52041 Fixed typo 2015-03-14 11:31:12 +08:00
Dmitry Stogov
db10b72523 Use fastcall calling convention for most critical ZE subsystems. 2015-03-13 21:10:09 +03:00
Xinchen Hui
326ac546ab Remove TSRMLS 2015-03-14 01:04:00 +08:00
Xinchen Hui
e827d1a424 Merge branch 'PHP-5.6'
Conflicts:
	ext/spl/spl_observer.c
2015-03-14 01:01:02 +08:00
Xinchen Hui
396bc00caa Merge branch 'PHP-5.5' into PHP-5.6 2015-03-14 00:53:32 +08:00
Xinchen Hui
ed59370f0a Little improvement, update NEWs, added test 2015-03-14 00:52:53 +08:00
Anatol Belski
92d106d26d fixed test 2015-03-13 17:33:48 +01:00
Anatol Belski
b680ccb2b0 the test shouldn't fail when unlink failed 2015-03-13 17:33:47 +01:00
Dmitry Stogov
2b42d71908 Changed HashTable layout:
Removed HashTable->arHash (reduced memory consumption). Now hash slots may be accessed using HT_HASH() macro.
Hash slotas are allocated together with Buckets (before them) and lay in reverse order from HashTable->arData base address (see comments in Zend/zend_types.h)
Indexes in hash table and conflict resolution chains (Z_NEXT) may be stored as indeces or offsets in bytes, depending on system (32 or 64-bit).
HashTable data filelds are reordered to keep the most useful for zend_hash_find() data in the same CPU cache line.
2015-03-13 17:13:19 +03:00
Nikita Popov
0a4a11b73a Regenerate ext/tokenizer data 2015-03-13 14:14:01 +01:00
Lior Kaplan
a4384bd3d4 s/PHP Version 5/PHP Version 7/g
Follow up for d0cb7153
2015-03-13 11:09:42 +02:00
Vektah
482500b455 Fix a leak 2015-03-13 15:54:30 +11:00
Xinchen Hui
d695a44a7e Revert previously commit by accident 2015-03-13 12:02:39 +08:00
Vektah
950d3d6e9b Fix bug #69227 and #65967
This patch fixes a use (in zend_gc.c) after free (in spl_observer.c).
See https://bugs.php.net/bug.php?id=69227
2015-03-13 15:02:05 +11:00
Wei Dai
25566c67fe Implement preg_replace_callback_array function 2015-03-13 11:52:36 +08:00
Dmitry Stogov
6289f7e52f Executor cleanup: fix GOTO and SWITCH VMs, remove aility to build additional PHP-5.0 compatible VM, hide executor implementation details. 2015-03-12 20:39:04 +03:00
Anatol Belski
41571e7fa9 improve ssl operations with possible renegotiation 2015-03-12 17:31:28 +01:00
Anatol Belski
1cf70266e7 use _set_errno where appropriate 2015-03-12 16:24:56 +01:00
Dmitry Stogov
9d71d65388 Fixed tests 2015-03-12 16:58:50 +03:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Anatol Belski
0e30c543ec upgrade to oniguruman 5.9.6 2015-03-12 13:42:36 +01:00
Anatol Belski
ff337bf52b expose oniguruma version 2015-03-12 13:28:43 +01:00
Anatol Belski
11716401bd fix possible unititialized pointer usage 2015-03-12 13:00:36 +01:00
Anatol Belski
1923c7a9b8 simplify condition 2015-03-12 10:21:43 +01:00
Anatol Belski
53b7258797 force ext/ftp to be always shared on Windows 2015-03-12 00:36:22 +01:00
Anatol Belski
2f443acad1 remove ext/openssl dependency for ext/ftp from conf 2015-03-12 00:13:01 +01:00
Anatol Belski
d2ee0840d2 don't depend on ext/openssl for ftp ssl support
instead just link against the openssl and init manually, that's
more flexible
2015-03-11 23:58:59 +01:00
Anatol Belski
4ee0395a4a init mbstring tsrm_ls_cache on MINIT
as some globals are accessed there already
2015-03-11 23:42:39 +01:00
Anatol Belski
d5f2b4b398 fix ftp_login with ssl enabled 2015-03-11 21:46:40 +01:00
Anatol Belski
f1a47988b0 added comment 2015-03-11 21:46:39 +01:00
Anatol Belski
167979fe76 enable ftps for shared ext/ftp 2015-03-11 21:46:38 +01:00
Daniel Lowrey
589374d027 Merge branch 'PHP-5.6'
* PHP-5.6:
  Don't block on crypto data inside stream_select()
2015-03-11 09:45:28 -06:00
Daniel Lowrey
c661121459 Don't block on crypto data inside stream_select() 2015-03-11 09:44:07 -06:00
Nikita Popov
c532376ee7 Fix some memory leaks in WebPhar 2015-03-11 15:27:42 +01:00
Trevor Suarez
98c6567e71 Putting whitespace back to the way it was. 2015-03-11 09:29:08 -04:00
Dmitry Stogov
d68861eb4b Improved php_json_escape_string() 2015-03-11 15:03:07 +03:00
Dmitry Stogov
781d1c400c Improved table search 2015-03-11 15:02:47 +03:00
Daniel Lowrey
4a336f5d0b Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug# 69215 (Crypto servers should send client CA list)

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-10 18:18:19 -06:00
Daniel Lowrey
3f6b12795c Fix bug# 69215 (Crypto servers should send client CA list) 2015-03-10 18:13:10 -06:00
Dmitry Stogov
026b0adc50 Fixed memory leaks 2015-03-11 01:28:13 +03:00
Dmitry Stogov
48deb1cd94 Free memory if destructor wasn't called 2015-03-11 00:57:28 +03:00
Dmitry Stogov
816b196973 Fixed memory leak 2015-03-10 23:16:09 +03:00
Dmitry Stogov
5d0bacfe67 Merge branch 'PHP-5.6'
* PHP-5.6:
  We don't cache custom strems with callbacks anymore

Conflicts:
	ext/opcache/ZendAccelerator.c
2015-03-10 19:32:38 +03:00
Dmitry Stogov
b52a2940af Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  We don't cache custom strems with callbacks anymore
2015-03-10 19:30:32 +03:00
Dmitry Stogov
c814b3294a We don't cache custom strems with callbacks anymore 2015-03-10 19:25:30 +03:00
Xinchen Hui
d4c1dca98c Merge branch 'master' of https://git.php.net/repository/php-src 2015-03-10 17:09:41 +08:00
Xinchen Hui
a5317e9d41 Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2015-03-10 15:49:02 +08:00
Xinchen Hui
0584b2df3f Update NEWS 2015-03-10 15:38:34 +08:00
Dmitry Stogov
a30d328671 Errors converted to exceptions are not "recoverable" anymore. 2015-03-10 10:31:55 +03:00
Xinchen Hui
d25acb5fd0 Revert "Fixed phar file action failure after engine exception rfc been merged"
This reverts commit f174859acd.
2015-03-10 15:03:15 +08:00
Daniel Lowrey
c5c4d22c10 Deprecate "session_meta_capture" SSL context option
Meta data about encrypted streams is now available as part of the
"crypto" key in the array returned by stream_get_meta_data(). This
update deprecates the use of the "session_meta_capture" ssl
context option in encrypted streams.
2015-03-09 23:15:57 -06:00
Daniel Lowrey
2dec21634c Revert "Add stream_socket_crypto_info() function"
This reverts commit 13acb7ec65.

With the added capability to negotiate application layer protocols
via the TLS ALPN extension userland needs a method to access the
negotiated protocol on a given stream. The reverted commit added
a new stream_socket_crypto_info() function for this purpose.

This original approach was discarded in favor of using the
already-existing stream_get_meta_data() API which specifically
exists for just such purposes and requires the addition of no new
functions.
2015-03-09 23:15:57 -06:00
Daniel Lowrey
676a5059b2 Add crypto info to stream_get_meta_data() result on encrypted streams
A "crypto" key is added to the output of stream_get_meta_data() calls
when invoked using a stream on which crypto is currently active. The
new key's associated array contains the following keys:

 - protocol (string e.g. TLSv1.2, TLSv1.1, etc)
 - cipher_name (string)
 - cipher_bits (int)
 - cipher_version (string)

If the TLS ALPN extension was used to successfully negotiate an
application protocol that protocol's identifier is stored in the
following key:

 - alpn_protocol

If no ALPN protocol was negotiated the "alpn_protocol" key is not
present in the crypto meta data array. More meta information
concerning the stream's active encryption state may be added in the
future.
2015-03-09 23:15:57 -06:00
Juan Basso
6b7b5e777f Renamed test case to match with reported bug 2015-03-10 00:01:26 -04:00
Daniel Lowrey
748433e7bc Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix crypto stream timeout regressions

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-09 16:02:04 -06:00
Daniel Lowrey
69691cc8ca Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix crypto stream timeout regressions
2015-03-09 15:55:33 -06:00
Daniel Lowrey
bbfd4a5e62 Fix crypto stream timeout regressions 2015-03-09 15:53:26 -06:00
Reeze Xia
f174859acd Fixed phar file action failure after engine exception rfc been merged 2015-03-09 17:07:18 +00:00
Xinchen Hui
47f2e42fc9 Remove PHAR_GLOBALS (make it respect ZEND_ENABLE_STATIC_TSRMLS_CACHE) 2015-03-09 23:00:56 +08:00
Juan Basso
cbdeccd6ed Fixed serialization of non string values on __sleep
Returning just N; (null) on the __sleep makes the number of fields/values be incomplete and corrupting the generated value from serialize, making impossible to unserialize it.
2015-03-09 09:04:34 -04:00
Dmitry Stogov
1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00
Nikita Popov
a4262827ea Fix ReflectionFunction::isDeprecated() test
We currently don't have deprecated functions ... so just switch
this to testing a non-deprecated function.
2015-03-09 12:27:06 +01:00
Nikita Popov
7810659cc3 Removed deprecated mcrypt_ecb() etc 2015-03-09 11:37:13 +01:00
Nikita Popov
c488a45701 Remove deprecated mcrypt_generic_end() alias 2015-03-09 11:10:52 +01:00
Nikita Popov
a81e65a501 Remove xsl.security_prefs ini option
Conflicts:
	ext/xsl/php_xsl.c
	ext/xsl/xsltprocessor.c
2015-03-09 11:06:18 +01:00
Nikita Popov
b5184ef336 Remove unsafe curl file uploads
The option CURLOPT_SAFE_UPLOAD still exists, but cannot be disabled.
2015-03-09 11:00:04 +01:00
Xinchen Hui
c24afc8d8f Revert commit by mistake 2015-03-09 17:27:51 +08:00
Xinchen Hui
64bbc98dff Merge branch 'PHP-5.6'
Conflicts:
	ext/mysqli/php_mysqli_structs.h
2015-03-09 17:23:34 +08:00
Xinchen Hui
4ca14f681e Merge branch 'PHP-5.5' into PHP-5.6 2015-03-09 17:23:04 +08:00
Xinchen Hui
9af1383a3f Revert "Fix #63486"
This reverts commit f4c96ffcb5.
2015-03-09 17:22:56 +08:00
Jeff Welch
fdbdb11514 Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used. 2015-03-09 17:14:47 +08:00
Jeff Welch
66a2c528fe Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used. 2015-03-09 17:08:35 +08:00
Xinchen Hui
f66bef2414 Fixed build 2015-03-09 15:50:52 +08:00
Masaki Kagaya
9d81d7ff70 added missing parentheses
added test case for bug #68846
replaced tab with space
added missing parentheses again
See also: http://icu-project.org/docs/papers/gb18030.html#h7
2015-03-08 23:45:11 -07:00