1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 07:02:33 +02:00
Commit Graph

54361 Commits

Author SHA1 Message Date
Remi Collet
ef03236d9d Merge branch 'PHP-7.4'
* PHP-7.4:
  this test needs json
2020-03-03 13:06:46 +01:00
Remi Collet
b093bd6ae8 this test needs json 2020-03-03 13:06:31 +01:00
Cameron Porter
a55b0abef3 oci8: Fix two tests that fail with stricter internal checks
Closes GH-5230
2020-03-03 12:13:44 +01:00
Nikita Popov
53efa1b0c6 Store aliased name of trait method
Currently, trait methods are aliased will continue to use the
original function name. In a few places in the codebase, we will
try to look up the actual method name instead. However, this does
not work if an aliased method is used indirectly
(https://bugs.php.net/bug.php?id=69180).

I think it would be better to instead actually change the method
name to the alias. This is in principle easy: We have to allow
function_name to be changed even if op array is otherwise shared
(similar to static_variables). This means we need to addref/release
the function_name separately, but I don't think there is a
performance concern here (especially as everything is usually
interned).

There is a bit of complication in opcache, where we need to make
sure that the function name is released the correct number of times
(interning may overwrite the name in the original op_array, but we
need to release it as many times as the op_array is shared).

Fixes bug #69180.
Fixes bug #74939.
Closes GH-5226.
2020-03-03 11:55:48 +01:00
Nikita Popov
a7a2e9857e Fix memory leak in dom_zvals_to_fragment 2020-03-03 10:36:04 +01:00
Christoph M. Becker
b9c157726b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79013: Content-Length missing when posting a curlFile with curl
2020-03-02 19:12:49 +01:00
Christoph M. Becker
fc8b3ab7cb Fix #79013: Content-Length missing when posting a curlFile with curl
Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI
specifications correctly wrt. chunked uploads (i.e. Transfer-encoding:
chunked), but instead pass -1 as CONTENT_LENGTH to the CGI
application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not
support this.

Therefore we try to retrieve the stream size in advance and pass it to
`curl_mime_data_cb()` to prevent libcurl from doing chunked uploads.
This is basically the same approach that `curl_mime_filedata()`
implements, except that we are keeping already opened streams open for
the `read_cb()`.
2020-03-02 19:11:33 +01:00
Remi Collet
a6d86c9bba bump zip version + NEWS 2020-03-02 16:51:55 +01:00
Remi Collet
fb8e221907 - add ZipArchive::FL_RECOMPRESS, FL_ENCRYPTED, FL_OVERWRITE, FL_LOCAL, FL_CENTRAL constants
- add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and addFromString methods
- add "flags" options to ZipArchive::addGlob and addPattern methods
  keeping previous behavior having FL_OVERWRITE by default
- add ZipArchive::replaceFile() method
2020-03-02 16:48:53 +01:00
Christoph M. Becker
3abe64f16a Merge branch 'PHP-7.4'
* PHP-7.4:
  Native Windows support for mysqlnd sha256 authentification
  Abstract over crypto operations
2020-03-02 16:33:40 +01:00
Christoph M. Becker
a0377021c5 Native Windows support for mysqlnd sha256 authentification
We implement that on top of Cryptography API: Next Generation (CNG).
2020-03-02 16:32:51 +01:00
Christoph M. Becker
a7400d5fd3 Abstract over crypto operations 2020-03-02 16:26:53 +01:00
Nikita Popov
336eb48c36 Automatically implement Stringable interface 2020-03-02 15:25:33 +01:00
Nicolas Grekas
9e775db025 Define Stringable with __toString():string method 2020-03-02 15:25:32 +01:00
Christoph M. Becker
c06850b9fa Merge branch 'PHP-7.4'
* PHP-7.4:
  Update libmagic.patch
2020-03-02 15:10:15 +01:00
Christoph M. Becker
7fa6e2a25c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update libmagic.patch
2020-03-02 15:08:50 +01:00
Christoph M. Becker
f15ab32af8 Update libmagic.patch
Some commits missed to update the patch file, so we're catching up on
this.

To generally make this easier, we back-port generate_patch.sh from
PHP-7.4, where we now also generate magic.h from magic.h.in.
2020-03-02 15:03:45 +01:00
Christoph M. Becker
c987e538ac Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79333: com_print_typeinfo() leaks memory
2020-03-02 11:38:50 +01:00
Christoph M. Becker
318757551a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79333: com_print_typeinfo() leaks memory
2020-03-02 11:38:03 +01:00
Christoph M. Becker
53140e5c56 Fix #79333: com_print_typeinfo() leaks memory
We have to free the `ansiname`s, regardless of whether they have been
put into the hashtable or not.

Since bug79299.phpt already shows the leak when run with a leak
checker, there is no need for another regression test.
2020-03-02 11:36:30 +01:00
Christoph M. Becker
b05c7fae33 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79332: php_istreams are never freed
2020-03-02 10:48:14 +01:00
Christoph M. Becker
b9843c9418 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79332: php_istreams are never freed
2020-03-02 10:46:46 +01:00
Christoph M. Becker
2adf1c4d23 Fix #79332: php_istreams are never freed
Releasing the `com_dotnet_istream_wrapper` in `istream_destructor()` is
pointless, since `istream_destructor()` is only called when the
resource is going to be released.  This recursion is not a real issue,
though, since the resource is never exposed to userland, and has at
most refcount 1, so due to well defined unsigned integer underflow, it
never is released twice.  However, returning early in this case causes
a memory leak which needs to be fixed.
2020-03-02 10:45:37 +01:00
Máté Kocsis
cb933d63c2 Add stubs for IntlChar
Closes GH-5217
2020-02-28 18:10:52 +01:00
Máté Kocsis
118b04bd6e Improve argument error messages in ext/sodium
Closes GH-5197
2020-02-28 18:09:39 +01:00
Nikita Popov
0d06a63ee3 Fixed bug #77325
Make ReflectionClassConstant->class the declaring class, not the
class on which the constant was fetched. This matches the behavior
for properties and methods.
2020-02-28 17:21:19 +01:00
Nikita Popov
30c2388738 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79062
2020-02-28 17:08:27 +01:00
Nikita Popov
375191aae7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79062
2020-02-28 17:07:36 +01:00
Nikita Popov
6c48da9a50 Fixed bug #79062
Back up the doc comment when performing heredoc scanahead.
2020-02-28 17:06:05 +01:00
Benjamin Eberlei
5acd86df8e [RFC] Implement new DOM Living Standard APIs in ext/dom 2020-02-28 16:13:39 +01:00
Nikita Popov
87bc99439d Fixed bug #64592
Make ReflectionClass::getMethods() behave the same ways as
ReflectionClass::getProperties() by not including private methods
from parent classes.
2020-02-28 15:54:42 +01:00
Christoph M. Becker
3a74d7a725 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79311: enchant_dict_suggest() fails on big endian architecture
2020-02-28 15:46:17 +01:00
Christoph M. Becker
0bffee4a35 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79311: enchant_dict_suggest() fails on big endian architecture
2020-02-28 15:44:52 +01:00
Christoph M. Becker
6adb885966 Fix #79311: enchant_dict_suggest() fails on big endian architecture
For obvious reasons, we must not assign a `size_t` value to an `int`
variable using memcpy().  However, there is actually no need for the
intermediate `n_sugg_st` here, if we use the proper types in the first
place.

A regression test is not necessary, because dict_suggest.phpt already
exhibits the erroneous behavior on big endian architectures.
2020-02-28 15:43:44 +01:00
Nikita Popov
bb85478bcc Merge branch 'PHP-7.4'
* PHP-7.4:
  Try to fix msvc build
2020-02-28 14:49:03 +01:00
Nikita Popov
a7de98fb12 Try to fix msvc build 2020-02-28 14:48:02 +01:00
Máté Kocsis
d70e6bdcde Add stubs for UConverter
Closes GH-5218
2020-02-28 14:37:37 +01:00
Máté Kocsis
3ab75ac019 Update MySQLi function info
Closes GH-5214
2020-02-28 14:36:54 +01:00
Nikita Popov
519a72e0b4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79252
2020-02-28 12:49:45 +01:00
Nikita Popov
30ee3f48d4 Fixed bug #79252 2020-02-28 12:47:56 +01:00
Remi Collet
06750d75e9 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix test
2020-02-28 10:39:43 +01:00
Remi Collet
5b82fd491a fix test 2020-02-28 10:39:08 +01:00
Remi Collet
7f0d3f1eab Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79315 ZipArchive::addFile doesn't honor start/length parameters
2020-02-28 10:35:39 +01:00
Remi Collet
d31fc591e0 Fix #79315 ZipArchive::addFile doesn't honor start/length parameters 2020-02-28 10:29:50 +01:00
Remi Collet
165d38a38d Merge branch 'PHP-7.4'
* PHP-7.4:
  NEWS
  Fix #79315 ZipArchive::addFile doesn't honor start/length parameters
2020-02-28 10:29:30 +01:00
Remi Collet
fb881cbdfc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79315 ZipArchive::addFile doesn't honor start/length parameters
2020-02-28 10:23:19 +01:00
Nikita Popov
c5e8c25dda Merge branch 'PHP-7.4'
* PHP-7.4:
  Use type-checked ref assignment in UConverter
2020-02-28 10:22:11 +01:00
Nikita Popov
6d19acf54b Use type-checked ref assignment in UConverter 2020-02-28 10:21:50 +01:00
Remi Collet
5b2d4c0ecc Fix #79315 ZipArchive::addFile doesn't honor start/length parameters 2020-02-28 10:21:19 +01:00
George Peter Banyard
5d62f95ec7 Use {0} to initialize instead of {NULL}
Clang emits a [-Wmissing-field-initializers] when using {NULL} instead of {0}
2020-02-28 00:21:25 +01:00