]>
granicus.if.org Git - php/log
Máté Kocsis [Fri, 10 Apr 2020 16:04:17 +0000 (18:04 +0200)]
Fix the default value of the $length parameter of grapheme_substr()
Máté Kocsis [Fri, 10 Apr 2020 16:03:20 +0000 (18:03 +0200)]
Fix default value of the $class_name parameter of mysqli_fetch_object()
Máté Kocsis [Fri, 10 Apr 2020 15:39:21 +0000 (17:39 +0200)]
Fix the default value of the $flags parameter of mysqli_begin_transaction()
Máté Kocsis [Fri, 10 Apr 2020 15:30:30 +0000 (17:30 +0200)]
Add missing parameter to the stub of mysqli_real_connect
George Peter Banyard [Fri, 10 Apr 2020 15:54:59 +0000 (17:54 +0200)]
Refactor and remove dead code in mb_ereg(i)_replace
We do not support the 'e' option anymore.
Merged together code which would emit an error if this option is present.
This also makes it clearer that the whole branch in the replacement section supporting this option is never hit, thus removed.
Máté Kocsis [Fri, 10 Apr 2020 15:17:12 +0000 (17:17 +0200)]
Fix the default parameter values of stream_socket_client()
$timeout and $flags were mixed up
Máté Kocsis [Fri, 10 Apr 2020 15:06:15 +0000 (17:06 +0200)]
Fix the default parameter values of session_set_save_handler()
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
Dmitry Stogov [Fri, 10 Apr 2020 13:10:19 +0000 (16:10 +0300)]
Separate zend_jit_dump_lifetime_interval() function
Dmitry Stogov [Fri, 10 Apr 2020 11:42:26 +0000 (14:42 +0300)]
Fixed overflow handling
Dmitry Stogov [Thu, 9 Apr 2020 16:31:18 +0000 (19:31 +0300)]
Register allocator refactoring
Nikita Popov [Thu, 9 Apr 2020 14:50:46 +0000 (16:50 +0200)]
Mark $time argument of touch() as UNKNOWN as well
For some reason I thought that passing 0 is same as current time,
but that's not the case.
Nikita Popov [Thu, 9 Apr 2020 14:47:39 +0000 (16:47 +0200)]
Mark spl_autoload_register function arg as UNKNOWN
Not passing any parameters to this function has magic behavior.
Nikita Popov [Thu, 9 Apr 2020 14:42:26 +0000 (16:42 +0200)]
Fix mysqli_get_client_info() stub
The dummy link argument is not nullable.
Nikita Popov [Thu, 9 Apr 2020 14:21:48 +0000 (16:21 +0200)]
Mark fgets() argument as UNKNOWN
If no value is passed, this reads as much as necessary, not 1024
bytes.
Christoph M. Becker [Thu, 9 Apr 2020 12:51:55 +0000 (14:51 +0200)]
Change parameter default to always available value
`SIGTERM` is only defined in ext/pcntl, and as such never available on
Windows. Moving the constant to ext/standard does not make much sense,
because that parameter is actually unused on Windows. Therefore, we
use the magic number `15` instead, what is also done in the PHP manual.
Nikita Popov [Thu, 9 Apr 2020 14:06:37 +0000 (16:06 +0200)]
Make touch() $atime parameter UNKNOWN
The actual default here is $time, not 0.
Nikita Popov [Thu, 9 Apr 2020 14:01:44 +0000 (16:01 +0200)]
Mark rand/mt_rand args as UNKNOWN
The second argument should be mt_getrandmax(), not PHP_INT_MAX.
Additionally this function only accepts either zero or two arguments,
so err on the side of being conservative and mark both UNKNOWN.
Nikita Popov [Thu, 9 Apr 2020 13:52:05 +0000 (15:52 +0200)]
Mark array_walk $userdata arg as UNKNOWN
It makes a difference whether this arg is not passed or is null.
Nikita Popov [Thu, 9 Apr 2020 13:46:33 +0000 (15:46 +0200)]
Make stream_socket_enable_crypto() session stream nullable
Nikita Popov [Thu, 9 Apr 2020 13:36:29 +0000 (15:36 +0200)]
Accept null context in stream_socket_(client|server)
Nikita Popov [Thu, 9 Apr 2020 13:39:11 +0000 (15:39 +0200)]
Add Z_PARAM_RESOURCE_OR_NULL()
As a more explicit alternative to Z_PARAM_RESOURCE_EX(, 1, 0).
Nikita Popov [Thu, 9 Apr 2020 13:06:53 +0000 (15:06 +0200)]
Export the zend_string_concat3() API
Nikita Popov [Thu, 9 Apr 2020 12:55:55 +0000 (14:55 +0200)]
Export API for fetching internal func default
Make this functionality available outside reflection.
Christoph M. Becker [Thu, 9 Apr 2020 12:06:11 +0000 (14:06 +0200)]
Fix typo (UNKOWN -> UNKNOWN)
George Peter Banyard [Wed, 8 Apr 2020 19:05:59 +0000 (21:05 +0200)]
Convert if blocks to assertions and adapt stubs accordingly
George Peter Banyard [Mon, 6 Apr 2020 13:22:59 +0000 (15:22 +0200)]
Cache MBFL encoding for Oniguruma regex functions.
Closes GH-5355
Dmitry Stogov [Thu, 9 Apr 2020 11:33:29 +0000 (14:33 +0300)]
cleanup
Dmitry Stogov [Thu, 9 Apr 2020 10:38:40 +0000 (13:38 +0300)]
Don't get number of passed arguments from "fake" INIT frames
Christoph M. Becker [Thu, 9 Apr 2020 08:55:53 +0000 (10:55 +0200)]
Fix #79462: method_exists and property_exists incoherent behavior
Both functions are closely related, so should behave the same for wrong
input types, i.e. both should throw a TypeError.
Nikita Popov [Thu, 9 Apr 2020 09:22:00 +0000 (11:22 +0200)]
Add test to make sure internal param default eval doesn't error
Nikita Popov [Thu, 9 Apr 2020 08:35:50 +0000 (10:35 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #78434
Nikita Popov [Fri, 3 Apr 2020 08:06:41 +0000 (10:06 +0200)]
Fixed bug #78434
The DO_INIT flag, which will skip the first resume on a primed
generator, should always be set when starting to yield from a
new generator, not only when the yield from happens during priming.
Máté Kocsis [Mon, 6 Apr 2020 09:02:13 +0000 (11:02 +0200)]
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Nikita Popov [Wed, 8 Apr 2020 15:11:50 +0000 (17:11 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Add php_cli_server_connect() helper
Nikita Popov [Wed, 8 Apr 2020 15:10:20 +0000 (17:10 +0200)]
Add php_cli_server_connect() helper
To encapsulate the repeated fsockopen() code.
This gives us a chance to control the timeout in one place:
Raise it to one second.
Nikita Popov [Wed, 8 Apr 2020 14:38:18 +0000 (16:38 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Make mysqli_poll test more deterministic
Nikita Popov [Wed, 8 Apr 2020 14:36:01 +0000 (16:36 +0200)]
Make mysqli_poll test more deterministic
Handle errors appearing in different order.
Nikita Popov [Wed, 8 Apr 2020 10:02:27 +0000 (12:02 +0200)]
Fix typo in GD stub
Nikita Popov [Wed, 8 Apr 2020 10:00:48 +0000 (12:00 +0200)]
Update mb_strrpos() stub
We no longer accept the encoding as 3rd param, so we can make this
a proper int argument.
Dmitry Stogov [Wed, 8 Apr 2020 09:39:24 +0000 (12:39 +0300)]
Dump information about trace side exits
Christoph M. Becker [Wed, 8 Apr 2020 09:35:28 +0000 (11:35 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Relax overly strict test expectation
Christoph M. Becker [Wed, 8 Apr 2020 09:29:49 +0000 (11:29 +0200)]
Relax overly strict test expectation
There is no reason to expect a `1` after the PID; neither the session
ID nor the memory usage are required to contain one. Actually, we just
want to verify here, that the process with the $child_pid is running,
and is a php.exe process.
Christoph M. Becker [Wed, 8 Apr 2020 08:37:28 +0000 (10:37 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix memory leak introduced by fixing bug #78221
Christoph M. Becker [Wed, 8 Apr 2020 08:36:57 +0000 (10:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix memory leak introduced by fixing bug #78221
Christoph M. Becker [Wed, 8 Apr 2020 08:35:54 +0000 (10:35 +0200)]
Fix memory leak introduced by fixing bug #78221
We have to free the retrieved text content; to keep the code readable,
we extract a helper function to check for empty nodes. Unfortunately,
we cannot use xmlIsBlankNode(), because that also recognizes whitespace
only text content.
We also make sure to properly handle NULL returns from
xmlNodeGetContent().
Nikita Popov [Wed, 8 Apr 2020 07:41:26 +0000 (09:41 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix test
Nikita Popov [Wed, 8 Apr 2020 07:41:14 +0000 (09:41 +0200)]
Fix test
Dmitry Stogov [Wed, 8 Apr 2020 07:34:24 +0000 (10:34 +0300)]
Update stack type, only if necessary
Dmitry Stogov [Tue, 7 Apr 2020 21:27:19 +0000 (00:27 +0300)]
Fixed TYPE/INFO mismatch
George Peter Banyard [Tue, 7 Apr 2020 20:49:17 +0000 (22:49 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Revert "Went to fast and forgot to update tests"
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
George Peter Banyard [Tue, 7 Apr 2020 20:27:00 +0000 (22:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Revert "Went to fast and forgot to update tests"
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
George Peter Banyard [Tue, 7 Apr 2020 20:24:40 +0000 (22:24 +0200)]
Revert "Went to fast and forgot to update tests"
This reverts commit
656eac74fa6074aebc087bb73d2e4651f7dc8c9e .
George Peter Banyard [Tue, 7 Apr 2020 20:23:24 +0000 (22:23 +0200)]
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
This commit brings some substantial changes in behaviour due to the weird implementation.
This will be fixed in master due to BC concerns.
This reverts commit
1333b46d6dc0c293c1fd626803f91bc69743eb79 .
Dmitry Stogov [Tue, 7 Apr 2020 18:37:10 +0000 (21:37 +0300)]
cleanup
Dmitry Stogov [Tue, 7 Apr 2020 18:34:18 +0000 (21:34 +0300)]
Revert "cleanup" (wrong commit)
This reverts commit
5db5f71f2831df4d32484a5638f6f6aa72e364a5 .
Dmitry Stogov [Tue, 7 Apr 2020 18:30:47 +0000 (21:30 +0300)]
cleanup
Nikita Popov [Tue, 7 Apr 2020 14:42:40 +0000 (16:42 +0200)]
Remove most uses of _default_get_name()
Instead fetch the name from the respective structure. The only
place where this is still used is ReflectionClassConst,
as zend_class_const does not store the name.
Nikita Popov [Tue, 7 Apr 2020 14:25:44 +0000 (16:25 +0200)]
Eliminate uses of _default_load_name()
Instead fetch the name from the function/class/property,
as appropriate. This makes us independent of the property,
and eliminates error conditions related to it.
Nikita Popov [Tue, 7 Apr 2020 14:10:19 +0000 (16:10 +0200)]
Optimize internal name fetching in reflection
Directly fetch the name property, instead of construction the
properties hash table and performing a lookup in it. This is both
slow and wastes a lot of memory.
Nikita Popov [Tue, 7 Apr 2020 14:05:33 +0000 (16:05 +0200)]
Assert that arginfo parameter name is present
Christoph M. Becker [Tue, 7 Apr 2020 11:09:10 +0000 (13:09 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
Christoph M. Becker [Tue, 7 Apr 2020 11:05:37 +0000 (13:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
Christoph M. Becker [Wed, 11 Mar 2020 12:02:09 +0000 (13:02 +0100)]
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
If a text node is not followed by another text node, we remove it, if
its textContent is empty.
Dmitry Stogov [Tue, 7 Apr 2020 09:01:48 +0000 (12:01 +0300)]
Free room for information about register allocation at astact stack and at trace_exit_info. Implement simple deoptimizer.
Dmitry Stogov [Mon, 6 Apr 2020 20:48:20 +0000 (23:48 +0300)]
Save CPU regesters on side exit for deoptimization
Dmitry Stogov [Mon, 6 Apr 2020 13:17:02 +0000 (16:17 +0300)]
Minor register allocator refactoring
Christoph M. Becker [Mon, 6 Apr 2020 10:03:01 +0000 (12:03 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #69264: __debugInfo() ignored while extending SPL classes
Christoph M. Becker [Mon, 6 Apr 2020 09:02:15 +0000 (11:02 +0200)]
Fix #69264: __debugInfo() ignored while extending SPL classes
We actually implement `::__debugInfo()` and drop the `get_debug_info()`
handlers of all relevant SPL classes. This is cleaner and gives more
flexibility regarding overriding the functionality in descendant
classes.
Nikita Popov [Mon, 6 Apr 2020 09:41:44 +0000 (11:41 +0200)]
Inline a ZEND_NUM_ARGS() variable
Christoph M. Becker [Mon, 6 Apr 2020 08:51:10 +0000 (10:51 +0200)]
Clean up constructor handling in com_dotnet
We substitute the construction magic with standard constructors, move
the ZPP checks to the beginning of the ctors, and also let the function
entries be generated from the stubs.
Máté Kocsis [Wed, 1 Apr 2020 21:32:39 +0000 (23:32 +0200)]
Improve some ValueError messages
Closes GH-5340
Máté Kocsis [Sun, 5 Apr 2020 19:15:30 +0000 (21:15 +0200)]
Generate function entries for another batch of extensions
Closes GH-5352
Máté Kocsis [Sun, 5 Apr 2020 18:09:58 +0000 (20:09 +0200)]
Add missing stub for xmlrpc_get_type()
George Peter Banyard [Sun, 5 Apr 2020 01:33:08 +0000 (03:33 +0200)]
Promote invalid case mode to ValueError in mb_case_converter
Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb_strtolower.
This means these functions can't return false anymore, ammend stubs accordingly.
George Peter Banyard [Fri, 3 Apr 2020 17:20:26 +0000 (19:20 +0200)]
mb_scrub() can't return false anymore
Also drop the intermediary function which was only used here
George Peter Banyard [Fri, 3 Apr 2020 17:14:42 +0000 (19:14 +0200)]
Promote some warnings to ValueError in mbstring
Promoted warnings are:
* Empty encoding lists
* Unknown language
* Start and Width out of bound
George Peter Banyard [Fri, 3 Apr 2020 16:20:43 +0000 (18:20 +0200)]
Convert some if blocks to assertions
Máté Kocsis [Sat, 4 Apr 2020 21:51:10 +0000 (23:51 +0200)]
Generate functions entries from stubs for another set of extensions
Closes GH-5351
Máté Kocsis [Sat, 4 Apr 2020 22:03:08 +0000 (00:03 +0200)]
Move variable declaration closer to its usage
Máté Kocsis [Sat, 4 Apr 2020 19:26:46 +0000 (21:26 +0200)]
Improve gen_stub.php
Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.
Máté Kocsis [Sat, 4 Apr 2020 18:41:42 +0000 (20:41 +0200)]
Generate function entries from stubs for a couple of extensions
Closes GH-5347
Máté Kocsis [Sat, 4 Apr 2020 11:03:16 +0000 (13:03 +0200)]
Annotate function aliases in stubs
George Peter Banyard [Fri, 3 Apr 2020 20:23:03 +0000 (22:23 +0200)]
Merge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 20:10:56 +0000 (22:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 20:03:00 +0000 (22:03 +0200)]
Went to fast and forgot to update tests
However due to the really lax conversion to integer all strings pass as 0
George Peter Banyard [Fri, 3 Apr 2020 19:30:35 +0000 (21:30 +0200)]
Merge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 19:28:07 +0000 (21:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 19:16:04 +0000 (21:16 +0200)]
Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
Nikita Popov [Fri, 3 Apr 2020 16:21:40 +0000 (18:21 +0200)]
Fix stub for zend_terminate_string()
Nikita Popov [Fri, 3 Apr 2020 14:49:11 +0000 (16:49 +0200)]
Verify that all stubs have a return type
Nikita Popov [Fri, 3 Apr 2020 14:18:47 +0000 (16:18 +0200)]
Stubs: Store information per-class
We'll need this if we want to generate method entries.
Nikita Popov [Fri, 3 Apr 2020 13:10:30 +0000 (15:10 +0200)]
Remove now unnecessary PHP_FUNCTION() declarations
Nikita Popov [Fri, 21 Feb 2020 14:08:56 +0000 (15:08 +0100)]
Generate function entries from stubs
If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.
Currently limited to free functions only.
Máté Kocsis [Sun, 29 Mar 2020 18:24:16 +0000 (20:24 +0200)]
Do not include the same stub multiple times
Closes GH-5322
Christoph M. Becker [Fri, 3 Apr 2020 12:11:04 +0000 (14:11 +0200)]
Fix #68690: Hypothetical off-by-one condition
We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can
never be true here.
George Peter Banyard [Wed, 1 Apr 2020 12:40:15 +0000 (14:40 +0200)]
Promote unknown encoding throws in encoding array/string list
For the string list we emit still emit a warning by comparing arg_num to 0
Closes GH-5337
Remi Collet [Thu, 2 Apr 2020 14:48:43 +0000 (16:48 +0200)]
add some output when generating arginfo
Remi Collet [Thu, 2 Apr 2020 14:34:05 +0000 (16:34 +0200)]
Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile
Nikita Popov [Fri, 3 Apr 2020 08:06:52 +0000 (10:06 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix incorrect free for last_message
Nikita Popov [Fri, 3 Apr 2020 08:06:09 +0000 (10:06 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix incorrect free for last_message