1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 06:02:23 +02:00
Commit Graph

117692 Commits

Author SHA1 Message Date
Nikita Popov
f15f3272cf Remove empty "interface gets implemented" handlers 2020-03-03 17:06:38 +01:00
Nikita Popov
262f52d5e2 Small code cleanup
I found what the modifier code does with XOR pretty confusing.
It's just removing the PPP bits...

Also remove an outdated reference to OVERLOADED_FUNCTION.
2020-03-03 15:00:51 +01:00
Nikita Popov
2c5fcd57c0 Resolve trait alias refers to earlier
Make sure all trait method references are converted to absolute
method references in advance. This regresses one error message
that I don't think is particularly valuable.
2020-03-03 14:23:31 +01:00
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
Derick Rethans
ec03689eb9 Merge branch 'PHP-7.4' 2020-03-03 11:29:48 +00:00
Derick Rethans
dc3e3e64f2 PHP-7.4 is now 7.4.5-dev 2020-03-03 11:29:10 +00: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
aa9a3ff891 Add test for bug #69084
This is another bug fixed by the precending commit.
2020-03-03 12:10:54 +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
feef00e929 Merge branch 'PHP-7.4'
* PHP-7.4:
  Next is 7.3.17
2020-03-03 10:22:52 +01:00
Christoph M. Becker
22307b4c44 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Next is 7.3.17
2020-03-03 10:20:42 +01:00
Christoph M. Becker
9dda3b9eb2 Next is 7.3.17 2020-03-03 10:19:31 +01:00
Xinchen Hui
534c3438e3 Updated maintainer ranges 2020-03-03 14:26:42 +08: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
Remi Collet
c932db8654 add myself as zip maintainer 2020-03-02 16:47:47 +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
Benjamin Eberlei
531ea6d340 Add upgrading note regarding merge of RFC for new DOMParentNode/DOMChildNode APIs. 2020-02-28 17:35:54 +01:00
Nikita Popov
6c84ed6b18 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove generated lexer
2020-02-28 17:26:06 +01:00
Nikita Popov
533633deda Remove generated lexer
Accidentially committed this when merging from 7.3.
2020-02-28 17:25:47 +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
Nikita Popov
b314603f7f Update ext maintenance ranges
Also add myself as reflection maintainer.
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