]>
granicus.if.org Git - php/log
Nikita Popov [Tue, 27 Oct 2020 10:42:18 +0000 (11:42 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Don't throw for out of bounds offsets in strspn()
Nikita Popov [Tue, 27 Oct 2020 10:23:49 +0000 (11:23 +0100)]
Don't throw for out of bounds offsets in strspn()
Make strspn($str1, $str2, $offset, $length) behaviorally
equivalent to strspn(substr($str1, $offset, $length), $str2)
by not throwing for out of bounds offset.
There have been two reports that this change cause issues,
including bug #80285.
Máté Kocsis [Tue, 27 Oct 2020 10:28:48 +0000 (11:28 +0100)]
Merge branch 'PHP-8.0'
Máté Kocsis [Sat, 24 Oct 2020 12:15:07 +0000 (14:15 +0200)]
Parameter type and name fixes in ext/standard
Closes GH-6382
Dmitry Stogov [Tue, 27 Oct 2020 09:59:53 +0000 (12:59 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed support for typed references
Dmitry Stogov [Tue, 27 Oct 2020 09:59:35 +0000 (12:59 +0300)]
Fixed support for typed references
Nikita Popov [Tue, 27 Oct 2020 09:35:54 +0000 (10:35 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Skip bug46024.phpt under asan
Nikita Popov [Tue, 27 Oct 2020 09:33:59 +0000 (10:33 +0100)]
Skip bug46024.phpt under asan
There is a legitimate leak here, but I don't think it's worthwhile
to fix it. It involves a process terminated while printing phpinfo.
Alex Dowad [Wed, 14 Oct 2020 11:01:25 +0000 (13:01 +0200)]
UTF-32 conversion treats truncated characters as illegal
Alex Dowad [Sun, 6 Sep 2020 12:42:55 +0000 (14:42 +0200)]
Add identify filter for UTF-32{,BE,LE}
Alex Dowad [Wed, 14 Oct 2020 18:25:19 +0000 (20:25 +0200)]
Improve error handling for UTF-16{,BE,LE}
Catch various errors such as the first part of a surrogate pair not being
followed by a proper second part, the first part of a surrogate pair appearing
at the end of a string, the second part of a surrogate pair appearing out
of place, and so on.
Alex Dowad [Tue, 13 Oct 2020 13:17:00 +0000 (15:17 +0200)]
UTF-16 text conversion handles truncated characters as illegal
This broke one old test (Zend/tests/multibyte_encoding_003.phpt), which used
a PHP script encoded as UTF-16. The problem was that to terminate the test
script, we need the text: "\n--EXPECT--". Out of that text, the terminating
newline (0x0A byte) becomes part of the resulting test script; but a bare
0x0A byte with no 0x00 is not valid UTF-16.
Since we now treat truncated UTF-16 characters as erroneous, an extra '?' is
appended to the output as an 'illegal character' marker.
Really, if we are running PHP scripts which are treated as encoded in UTF-16
or some other arbitrary text encoding (not ASCII), and the script is not
actually a valid string in that encoding, inserting '?' characters into the
code which the PHP interpreter runs is a bad thing to do. In such cases, the
script shouldn't be treated as UTF-16 (or whatever) at all.
I wonder if mbstring's encoding detection is being used in 'non-strict' mode?
Dmitry Stogov [Tue, 27 Oct 2020 07:31:09 +0000 (10:31 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed tracing JIT for tests/classes/unset_properties.phpt
Dmitry Stogov [Tue, 27 Oct 2020 07:30:38 +0000 (10:30 +0300)]
Fixed tracing JIT for tests/classes/unset_properties.phpt
Dmitry Stogov [Mon, 26 Oct 2020 22:20:46 +0000 (01:20 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed memory leak
Dmitry Stogov [Mon, 26 Oct 2020 22:20:22 +0000 (01:20 +0300)]
Fixed memory leak
Sammy Kaye Powers [Mon, 26 Oct 2020 22:15:45 +0000 (15:15 -0700)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Add missing observer tests
Sammy Kaye Powers [Fri, 23 Oct 2020 20:38:42 +0000 (13:38 -0700)]
Add missing observer tests
Closes GH-6378
Dmitry Stogov [Mon, 26 Oct 2020 18:49:14 +0000 (21:49 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed register allocation
Fixed MAY_BE_INDIRECT inference.
Dmitry Stogov [Mon, 26 Oct 2020 18:48:47 +0000 (21:48 +0300)]
Fixed register allocation
Dmitry Stogov [Mon, 26 Oct 2020 18:48:13 +0000 (21:48 +0300)]
Fixed MAY_BE_INDIRECT inference.
Dmitry Stogov [Mon, 26 Oct 2020 16:05:23 +0000 (19:05 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Better JIT support for aliases
Dmitry Stogov [Mon, 26 Oct 2020 16:05:08 +0000 (19:05 +0300)]
Better JIT support for aliases
Nikita Popov [Mon, 26 Oct 2020 16:01:25 +0000 (17:01 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix inconsistency in PDO transaction state
Nikita Popov [Tue, 20 Oct 2020 09:29:47 +0000 (11:29 +0200)]
Fix inconsistency in PDO transaction state
This addresses an issue introduced by #4996 and reported in
https://bugs.php.net/bug.php?id=80260.
Now that PDO::inTransaction() reports the real transaction state
of the connection, there may be a mismatch with PDOs internal
transaction state (in_tcx). This is compounded by the fact that
MySQL performs implicit commits for DDL queries.
This patch fixes the issue by making beginTransaction/commit/rollBack
work on the real transaction state provided by the driver as well
(or falling back to in_tcx if the driver does not support it).
This does mean that writing something like
$pdo->beginTransaction();
$pdo->exec('CREATE DATABASE ...');
$pdo->rollBack(); // <- illegal
will now result in an error, because the CREATE DATABASE already
committed the transaction. I believe this behavior is both correct
and desired -- otherwise, there is no indication that the code did
not behave correctly and the rollBack() was effectively ignored.
However, this is also a BC break.
Closes GH-6355.
Nikita Popov [Mon, 26 Oct 2020 15:54:58 +0000 (16:54 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Deny serialization of finfo objects
Nikita Popov [Mon, 26 Oct 2020 15:54:30 +0000 (16:54 +0100)]
Deny serialization of finfo objects
The resulting objects were already unusable, make it error out
earlier.
Nikita Popov [Mon, 26 Oct 2020 15:52:22 +0000 (16:52 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Deny cloning of fileinfo objects
Nikita Popov [Mon, 26 Oct 2020 15:51:53 +0000 (16:51 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Deny cloning of fileinfo objects
Nikita Popov [Mon, 26 Oct 2020 15:50:48 +0000 (16:50 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Deny cloning of fileinfo objects
Nikita Popov [Mon, 26 Oct 2020 15:50:20 +0000 (16:50 +0100)]
Deny cloning of fileinfo objects
Using a cloned finfo object will crash.
Nikita Popov [Mon, 26 Oct 2020 15:25:31 +0000 (16:25 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Consistent error handling in mysqli_poll
Dharman [Wed, 14 Oct 2020 22:17:48 +0000 (23:17 +0100)]
Consistent error handling in mysqli_poll
This error condition should not actually be reachable, but change
it to be consistent with the other ones.
Also fix a memory leak.
Closes GH-6340.
Christoph M. Becker [Mon, 26 Oct 2020 14:42:32 +0000 (15:42 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Revert "Fix out-of-bounds write"
Christoph M. Becker [Mon, 26 Oct 2020 14:42:08 +0000 (15:42 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Revert "Fix out-of-bounds write"
Christoph M. Becker [Mon, 26 Oct 2020 14:40:55 +0000 (15:40 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Revert "Fix out-of-bounds write"
Christoph M. Becker [Tue, 20 Oct 2020 15:09:20 +0000 (17:09 +0200)]
Revert "Fix out-of-bounds write"
This reverts commit
bf6873a18e3b6b00f82a645c0893a281ae8eadb8 .
CVE-2020-26159 is bogus; the "bug" was apparently a false positive
reported by Coverity, and the "fix" apparently wrong, see
<https://github.com/kkos/oniguruma/issues/221>.
Closes GH-6357.
Nikita Popov [Mon, 26 Oct 2020 13:31:55 +0000 (14:31 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Re-enable laravel tests
Nikita Popov [Mon, 19 Oct 2020 14:45:44 +0000 (16:45 +0200)]
Re-enable laravel tests
Laravel is now sufficiently PHP 8 compatible.
Closes GH-6353.
Dmitry Stogov [Mon, 26 Oct 2020 12:57:23 +0000 (15:57 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed incorrect register allocation in ext/gd/tests/imagecopyresampled_variation1.phpt
Dmitry Stogov [Mon, 26 Oct 2020 12:56:37 +0000 (15:56 +0300)]
Fixed incorrect register allocation in ext/gd/tests/imagecopyresampled_variation1.phpt
Christoph M. Becker [Mon, 26 Oct 2020 12:15:33 +0000 (13:15 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #80268: loadHTML() truncates at NUL bytes
Christoph M. Becker [Mon, 26 Oct 2020 12:14:05 +0000 (13:14 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80268: loadHTML() truncates at NUL bytes
Nikita Popov [Mon, 26 Oct 2020 12:11:00 +0000 (13:11 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Don't set xdebug.default_enable in run-tests
bashkarev [Mon, 12 Oct 2020 12:28:48 +0000 (15:28 +0300)]
Don't set xdebug.default_enable in run-tests
This throws a deprecation warning in XDebug 3.
Closes GH-6324.
Christoph M. Becker [Mon, 26 Oct 2020 12:08:47 +0000 (13:08 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80268: loadHTML() truncates at NUL bytes
Christoph M. Becker [Fri, 23 Oct 2020 09:06:30 +0000 (11:06 +0200)]
Fix #80268: loadHTML() truncates at NUL bytes
libxml2 has no particular issues parsing HTML strings with NUL bytes;
these just cause truncation of the current text content, but parsing
continues generally. Since `::loadHTMLFile()` already supports NUL
bytes, `::loadHTML()` should as well.
Note that this is different from XML, which does not allow any NUL
bytes.
Closes GH-6368.
Nikita Popov [Mon, 26 Oct 2020 11:41:19 +0000 (12:41 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Declare may_retry_reparse_point on windows only
Nikita Popov [Mon, 26 Oct 2020 11:41:12 +0000 (12:41 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Declare may_retry_reparse_point on windows only
Nikita Popov [Mon, 26 Oct 2020 11:40:56 +0000 (12:40 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Declare may_retry_reparse_point on windows only
Nikita Popov [Mon, 26 Oct 2020 11:40:27 +0000 (12:40 +0100)]
Declare may_retry_reparse_point on windows only
Nikita Popov [Mon, 26 Oct 2020 11:24:32 +0000 (12:24 +0100)]
Remove dated results from ext/hash/bench.php
These are not exactly representative anymore.
Christoph M. Becker [Mon, 26 Oct 2020 10:55:46 +0000 (11:55 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #62474: com_event_sink crashes on certain arguments
Christoph M. Becker [Mon, 26 Oct 2020 10:55:10 +0000 (11:55 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #62474: com_event_sink crashes on certain arguments
Christoph M. Becker [Mon, 26 Oct 2020 10:54:33 +0000 (11:54 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #62474: com_event_sink crashes on certain arguments
Christoph M. Becker [Thu, 22 Oct 2020 15:50:22 +0000 (17:50 +0200)]
Fix #62474: com_event_sink crashes on certain arguments
We have to make sure that the variant is of type `VT_DISPATCH` before
we access it as such.
Closes GH-6372.
Christoph M. Becker [Tue, 20 Oct 2020 10:31:58 +0000 (12:31 +0200)]
Raise E_WARNING on PHP related errors
If Zip operations fails due to PHP error conditions before libzip even
has been called, there is no meaningful indication what failed; the
functions just return false, and the Zip status indicated that no error
did occur. Therefore we raise `E_WARNING` in these cases.
Closes GH-6356.
Christoph M. Becker [Mon, 26 Oct 2020 10:22:55 +0000 (11:22 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #80258: Windows Deduplication Enabled, randon permission errors
Christoph M. Becker [Mon, 26 Oct 2020 10:22:16 +0000 (11:22 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80258: Windows Deduplication Enabled, randon permission errors
Christoph M. Becker [Mon, 26 Oct 2020 10:21:35 +0000 (11:21 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80258: Windows Deduplication Enabled, randon permission errors
Christoph M. Becker [Mon, 19 Oct 2020 15:41:58 +0000 (17:41 +0200)]
Fix #80258: Windows Deduplication Enabled, randon permission errors
A recent bug fix regarding symlinks claimed:
> After resolving reparse points, the path still may be a reparse
> point; in that case we have to resolve that reparse point as well.
While that is basically correct, some reparse points may point to
inaccessible system folders (e.g. `IO_REPARSE_TAG_DEDUP` points to
"\System Volume Information"). Since we don't know details about
arbitrary reparse points, and are mainly interested in nested symlinks,
we take a step back, and only resolve `IO_REPARSE_TAG_SYMLINK` for now.
Close GH-6354.
Christoph M. Becker [Mon, 26 Oct 2020 10:06:25 +0000 (11:06 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
Christoph M. Becker [Mon, 26 Oct 2020 10:05:48 +0000 (11:05 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
Christoph M. Becker [Mon, 26 Oct 2020 10:04:57 +0000 (11:04 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
Christoph M. Becker [Sat, 24 Oct 2020 14:08:02 +0000 (16:08 +0200)]
Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
`ADD_EXTENSION_DEP()` relies on the `PHP_<extname>` config variables to
be set to `"yes"`, and since the standard and date extension are always
enabled, we define the respective variables uncoditionally.
Closes GH-6383.
Christoph M. Becker [Mon, 26 Oct 2020 10:00:13 +0000 (11:00 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix bug 76618
Fix bug 76618
Christoph M. Becker [Mon, 26 Oct 2020 09:59:46 +0000 (10:59 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix bug 76618
Fix bug 76618
Christoph M. Becker [Mon, 26 Oct 2020 09:58:26 +0000 (10:58 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix bug 76618
Nikita Popov [Mon, 26 Oct 2020 08:26:26 +0000 (09:26 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Use separate directory in dit_004.phpt
Nikita Popov [Mon, 26 Oct 2020 08:25:38 +0000 (09:25 +0100)]
Use separate directory in dit_004.phpt
Make sure the directory is not modified while we're iterating it,
which may give unstable results.
Nikita Popov [Mon, 26 Oct 2020 08:05:37 +0000 (09:05 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix parameter stats generation
[ci skip]
Nikita Popov [Mon, 26 Oct 2020 08:05:25 +0000 (09:05 +0100)]
Fix parameter stats generation
[ci skip]
Nikita Popov [Mon, 26 Oct 2020 07:59:11 +0000 (08:59 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Document breaking change in strspn/strcspn
[ci skip]
Thiemo Kreuz [Sat, 24 Oct 2020 10:26:27 +0000 (12:26 +0200)]
Document breaking change in strspn/strcspn
See https://phabricator.wikimedia.org/T264502.
[ci skip]
Nikita Popov [Mon, 26 Oct 2020 07:52:50 +0000 (08:52 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Revert "Make ReflectionUnionType final"
Nikita Popov [Mon, 26 Oct 2020 07:51:06 +0000 (08:51 +0100)]
Revert "Make ReflectionUnionType final"
This reverts commit
ef6adb4e27853eb19bf50bad6486311920d6af7b .
Per Ondrej's comment, this is already being used by BetterReflection
adaptors, ugh.
Máté Kocsis [Sun, 25 Oct 2020 19:16:11 +0000 (20:16 +0100)]
Merge branch 'PHP-8.0'
Máté Kocsis [Sun, 25 Oct 2020 18:20:03 +0000 (19:20 +0100)]
Make ReflectionUnionType final
Closes GH-6384
Christoph M. Becker [Sun, 25 Oct 2020 15:27:45 +0000 (16:27 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
[ci skip] Fix typos in UPGRADING
Christoph M. Becker [Sun, 25 Oct 2020 15:27:20 +0000 (16:27 +0100)]
[ci skip] Fix typos in UPGRADING
Christoph M. Becker [Sat, 24 Oct 2020 13:36:44 +0000 (15:36 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Define config var PHP_JSON
Christoph M. Becker [Sat, 24 Oct 2020 13:31:10 +0000 (15:31 +0200)]
Define config var PHP_JSON
Otherwise, `ADD_EXTENSION_DEP('foo', 'json')` fails, even though the
JSON extension is available.
George Peter Banyard [Fri, 23 Oct 2020 19:48:52 +0000 (20:48 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Throw Value/TypeError for invalid $bodies in imap_mail_compose()
George Peter Banyard [Thu, 22 Oct 2020 14:23:35 +0000 (15:23 +0100)]
Throw Value/TypeError for invalid $bodies in imap_mail_compose()
Small drive by refactoring to use HashTables
Closes GH-6371
Nikita Popov [Fri, 23 Oct 2020 09:10:21 +0000 (11:10 +0200)]
waitpid in ftp server tests
This is not relevant right now, but ensures consistent order if
the tests are repeated.
Nikita Popov [Fri, 23 Oct 2020 14:17:13 +0000 (16:17 +0200)]
Allow running session tests in parallel
Use unique session IDs and/or save paths. Also removes the annoying
order-dependence of session tests.
Máté Kocsis [Fri, 23 Oct 2020 14:34:40 +0000 (16:34 +0200)]
Merge branch 'PHP-8.0'
Máté Kocsis [Fri, 23 Oct 2020 12:09:23 +0000 (14:09 +0200)]
Require stubs to declare return types for magic methods when possible
Closes GH-6376
Nikita Popov [Fri, 23 Oct 2020 09:29:44 +0000 (11:29 +0200)]
Use ephemeral port in more server tests
Port the main php_cli_server.inc to use ephemeral ports, thus
allowing CLI server tests to be parallelized.
A complication here is that we also need to give each test a
separate doc root, to avoid index.php files writing over each
other.
Closes GH-6375.
Nikita Popov [Fri, 23 Oct 2020 09:46:54 +0000 (11:46 +0200)]
Fix pasv_port determination
Apparently the ftp server is also used by ext/standard/tests/streams,
and only that part actually uses pasv.
Nikita Popov [Thu, 22 Oct 2020 10:53:57 +0000 (12:53 +0200)]
Use ephemeral port in ftp tests
And enable them to run in parallel.
Nikita Popov [Fri, 23 Oct 2020 08:31:55 +0000 (10:31 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Make GC default threshold handling consistent
Nikita Popov [Fri, 23 Oct 2020 08:30:07 +0000 (10:30 +0200)]
Make GC default threshold handling consistent
While the initial threshold is set to 10001 roots, the threshold
adjustment logic may then set it to 10000. The exact value really
doesn't matter, but we should make it consistent.
Nikita Popov [Fri, 23 Oct 2020 07:47:36 +0000 (09:47 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Don't allow passing unknown named params to class without ctor
Nikita Popov [Wed, 21 Oct 2020 09:55:03 +0000 (11:55 +0200)]
Don't allow passing unknown named params to class without ctor
See also https://externals.io/message/112083.
Closes GH-6364.
Nikita Popov [Fri, 23 Oct 2020 07:34:37 +0000 (09:34 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed some typos
[ci skip]
Javier Eguiluz [Thu, 22 Oct 2020 17:46:24 +0000 (19:46 +0200)]
Fixed some typos
Closes GH-6373.
[ci skip]
Dmitry Stogov [Thu, 22 Oct 2020 20:17:19 +0000 (23:17 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed register allocation
Fixed reference-counter inference
Missed warning
Dmitry Stogov [Thu, 22 Oct 2020 20:16:41 +0000 (23:16 +0300)]
Fixed register allocation
Dmitry Stogov [Thu, 22 Oct 2020 20:15:39 +0000 (23:15 +0300)]
Fixed reference-counter inference