]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 10 Oct 2020 21:25:43 +0000 (23:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80215: imap_mail_compose() may modify by-val parameters

4 years agoFix #80215: imap_mail_compose() may modify by-val parameters
Christoph M. Becker [Sat, 10 Oct 2020 15:16:41 +0000 (17:16 +0200)]
Fix #80215: imap_mail_compose() may modify by-val parameters

We separate the input arrays and all sub-arrays to avoid modification
of the passed parameters.

This should be rewritten to use `zend_string`s for the "master" branch.

Closes GH-6316.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 10 Oct 2020 17:17:59 +0000 (19:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80213: imap_mail_compose() segfaults on certain $bodies

4 years agoFix #80213: imap_mail_compose() segfaults on certain $bodies
Christoph M. Becker [Sat, 10 Oct 2020 12:09:07 +0000 (14:09 +0200)]
Fix #80213: imap_mail_compose() segfaults on certain $bodies

We have to cater to non-associative arrays where the key may be `NULL`;
we just skip these elements.

Closes GH-6315.

4 years agoDon't specify symfony branch
Nikita Popov [Sat, 10 Oct 2020 09:07:49 +0000 (11:07 +0200)]
Don't specify symfony branch

This was renamed from master to 5.x. Just use the default branch.

4 years agoFixed bug #80186
Nikita Popov [Fri, 9 Oct 2020 14:56:08 +0000 (16:56 +0200)]
Fixed bug #80186

Early exit in FE_RESET if get_properties() returns empty array,
as we cannot add HT iterators to zend_empty_array.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 9 Oct 2020 13:24:53 +0000 (15:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Make iconv errno support test pass on Solaris.

4 years agoMake iconv errno support test pass on Solaris.
Petr Sumbera [Wed, 7 Oct 2020 13:07:23 +0000 (15:07 +0200)]
Make iconv errno support test pass on Solaris.

Closes GH-6291.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 9 Oct 2020 12:05:23 +0000 (14:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  XFAIL test broken by timelib update

4 years agoXFAIL test broken by timelib update
Nikita Popov [Fri, 9 Oct 2020 12:04:47 +0000 (14:04 +0200)]
XFAIL test broken by timelib update

I was expecting this to get fixed quickly, but it didn't.
XFAIL for now.

4 years agoUpdated to version 2020.2 (2020b)
Derick Rethans [Thu, 8 Oct 2020 14:19:47 +0000 (15:19 +0100)]
Updated to version 2020.2 (2020b)

4 years agoEmpty merge
Derick Rethans [Thu, 8 Oct 2020 14:19:47 +0000 (15:19 +0100)]
Empty merge

4 years agoUpdated to version 2020.2 (2020b)
Derick Rethans [Thu, 8 Oct 2020 14:19:46 +0000 (15:19 +0100)]
Updated to version 2020.2 (2020b)

4 years agoUpdated to version 2020.2 (2020b)
Derick Rethans [Thu, 8 Oct 2020 14:05:39 +0000 (15:05 +0100)]
Updated to version 2020.2 (2020b)

4 years agoEmpty merge
Derick Rethans [Thu, 8 Oct 2020 14:05:39 +0000 (15:05 +0100)]
Empty merge

4 years agoUpdated to version 2020.2 (2020b)
Derick Rethans [Thu, 8 Oct 2020 14:05:38 +0000 (15:05 +0100)]
Updated to version 2020.2 (2020b)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 8 Oct 2020 10:08:35 +0000 (12:08 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix too strict imap test expectations

4 years agoFix too strict imap test expectations
Christoph M. Becker [Thu, 8 Oct 2020 10:04:02 +0000 (12:04 +0200)]
Fix too strict imap test expectations

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 7 Oct 2020 15:47:40 +0000 (17:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #77040: tidyNode::isHtml() is completely broken

4 years agoFix #77040: tidyNode::isHtml() is completely broken
Christoph M. Becker [Wed, 7 Oct 2020 10:45:43 +0000 (12:45 +0200)]
Fix #77040: tidyNode::isHtml() is completely broken

The documentation of `tidyNode::isHtml()` states that this method
"checks if a node is part of a HTML document".  That is, of course,
nonsense, since a tidyNode is "an HTML node in an HTML file, as
detected by tidy."

What this method is actually supposed to do is to check whether a node
is an element (unless it is the root element).  This has been broken by
commit d8eeb8e[1], which assumed that `enum TidyNodeType` would
represent flags of a bitmask, what it does not.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d8eeb8e28673236bca3f066ded75037a5bdf6378>

Closes GH-6290.

4 years agoFixed bug #80194
Nikita Popov [Wed, 7 Oct 2020 13:03:12 +0000 (15:03 +0200)]
Fixed bug #80194

We should strip NOPs from unreachable_free blocks as well, to make
sure that the free really is the first op.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 7 Oct 2020 11:24:55 +0000 (13:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80185: jdtounix() fails after 2037

4 years agoFix #80185: jdtounix() fails after 2037
Christoph M. Becker [Wed, 7 Oct 2020 08:38:30 +0000 (10:38 +0200)]
Fix #80185: jdtounix() fails after 2037

There is no such thing as the "end of the unix epoch", and if it was,
it would certainly not be 2037-10-11T02:00:00.  There is, however,
potential integer overflow which we need to avoid.

Closes GH-6288.

4 years agoFix bug #80126
Nikita Popov [Tue, 6 Oct 2020 14:30:58 +0000 (16:30 +0200)]
Fix bug #80126

When performing an unlinked instanceof, we also need to consider
interfaces of parent classes, as they may not have been inherited
yet.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 5 Oct 2020 15:47:21 +0000 (17:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #46050: odbc_next_result corrupts prepared resource

4 years agoFix #46050: odbc_next_result corrupts prepared resource
Christoph M. Becker [Mon, 5 Oct 2020 15:46:37 +0000 (17:46 +0200)]
Fix #46050: odbc_next_result corrupts prepared resource

When resetting the result's values, we also have to reset its numcols.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 5 Oct 2020 08:46:46 +0000 (10:46 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix -Wimplicit-function-declaration in configure

4 years agoFix -Wimplicit-function-declaration in configure
Nikita Popov [Mon, 5 Oct 2020 08:43:58 +0000 (10:43 +0200)]
Fix -Wimplicit-function-declaration in configure

As this is an error with xcode 12, see bug #80171.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 2 Oct 2020 13:04:38 +0000 (15:04 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix out-of-bounds write

4 years agoFix out-of-bounds write
K.Kosako [Mon, 21 Sep 2020 03:58:29 +0000 (12:58 +0900)]
Fix out-of-bounds write

Fixes CVE-2020-26159.

Backported from <https://github.com/kkos/oniguruma/commit/cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0>.

4 years ago[ci skip] moved soap fix to 7.4.11
Matteo Beccati [Fri, 2 Oct 2020 07:33:50 +0000 (09:33 +0200)]
[ci skip] moved soap fix to 7.4.11

When committing I didn't notice that version had been just bumped

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Matteo Beccati [Fri, 2 Oct 2020 07:33:20 +0000 (09:33 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] moved soap fix to 7.3.23

4 years ago[ci skip] moved soap fix to 7.3.23
Matteo Beccati [Fri, 2 Oct 2020 07:32:52 +0000 (09:32 +0200)]
[ci skip] moved soap fix to 7.3.23

When committing I didn't notice that version had been just bumped

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Thu, 1 Oct 2020 10:19:27 +0000 (13:19 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Backport of a partial fix for bug Bug #76982 (memory leak declaring closure in included file).

4 years agoBackport of a partial fix for bug Bug #76982 (memory leak declaring closure in includ...
Dmitry Stogov [Thu, 1 Oct 2020 10:18:21 +0000 (13:18 +0300)]
Backport of a partial fix for bug Bug #76982 (memory leak declaring closure in included file).

4 years agoFixed hex char parsing
Dmitry Stogov [Wed, 30 Sep 2020 08:00:25 +0000 (11:00 +0300)]
Fixed hex char parsing

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Wed, 30 Sep 2020 05:42:28 +0000 (07:42 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  bump version to 7.2.35-dev

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Wed, 30 Sep 2020 05:42:14 +0000 (07:42 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  bump version to 7.2.35-dev

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Wed, 30 Sep 2020 05:37:35 +0000 (08:37 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed incorrect error message

4 years agoFixed incorrect error message
George Peter Banyard [Wed, 30 Sep 2020 05:37:16 +0000 (08:37 +0300)]
Fixed incorrect error message

4 years agobump version to 7.2.35-dev
Remi Collet [Wed, 30 Sep 2020 05:36:59 +0000 (07:36 +0200)]
bump version to 7.2.35-dev

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Wed, 30 Sep 2020 05:29:21 +0000 (08:29 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed incorrect logical condition

4 years agoFixed incorrect logical condition
George Peter Banyard [Wed, 30 Sep 2020 05:29:00 +0000 (08:29 +0300)]
Fixed incorrect logical condition

4 years agoFixed incorrect logical conditions
George Peter Banyard [Wed, 30 Sep 2020 05:21:46 +0000 (08:21 +0300)]
Fixed incorrect logical conditions

4 years ago[ci skip] Add 7.4.11 security fixes to NEWS
Stanislav Malyshev [Tue, 29 Sep 2020 17:13:38 +0000 (10:13 -0700)]
[ci skip] Add 7.4.11 security fixes to NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Tue, 29 Sep 2020 17:11:52 +0000 (10:11 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Add 7.3.23 security fixes to NEWS

4 years ago[ci skip] Add 7.3.23 security fixes to NEWS
Stanislav Malyshev [Tue, 29 Sep 2020 17:09:33 +0000 (10:09 -0700)]
[ci skip] Add 7.3.23 security fixes to NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 29 Sep 2020 10:11:48 +0000 (12:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Fix version

4 years ago[ci skip] Fix version
Christoph M. Becker [Tue, 29 Sep 2020 10:10:36 +0000 (12:10 +0200)]
[ci skip] Fix version

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 29 Sep 2020 09:35:28 +0000 (11:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80152: odbc_execute() moves internal pointer of $params

4 years agoFix #80152: odbc_execute() moves internal pointer of $params
Christoph M. Becker [Sat, 26 Sep 2020 11:14:40 +0000 (13:14 +0200)]
Fix #80152: odbc_execute() moves internal pointer of $params

As least intrusive fix, we separate the passed array argument.

Closes GH-6219.

4 years agoFixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459
Dmitry Stogov [Tue, 29 Sep 2020 09:11:01 +0000 (12:11 +0300)]
Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 29 Sep 2020 09:03:52 +0000 (11:03 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80150: Failure to fetch error message

4 years agoFix #80150: Failure to fetch error message
Christoph M. Becker [Fri, 25 Sep 2020 15:27:41 +0000 (17:27 +0200)]
Fix #80150: Failure to fetch error message

In case of statement related errors, we need to pass the respective
statement handle to `SQLError()`.

Closes GH-6217.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 29 Sep 2020 08:59:32 +0000 (10:59 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #80137
  Fix bug #80138

4 years agoFix bug #80137
Matthias Karbe [Wed, 23 Sep 2020 12:54:25 +0000 (14:54 +0200)]
Fix bug #80137

Skip getprotobyname() and getprotobynumber() tests on *nix if there
is no /etc/protocols file.

Closes GH-6193.

4 years agoFix bug #80138
Matthias Karbe [Wed, 23 Sep 2020 12:25:30 +0000 (14:25 +0200)]
Fix bug #80138

Skip getservbyname() and getservbyport() tests on *nix if there is
no /etc/services file.

Closes GH-6191.

4 years agoSynchronize php.ini-development and php.ini-production
Giovanni Giacobbi [Mon, 28 Sep 2020 22:43:23 +0000 (00:43 +0200)]
Synchronize php.ini-development and php.ini-production

Closes GH-6231.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 29 Sep 2020 06:51:03 +0000 (08:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] typo
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 29 Sep 2020 06:50:14 +0000 (08:50 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  [ci skip] typo
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years ago[ci skip] typo
Remi Collet [Tue, 29 Sep 2020 06:49:56 +0000 (08:49 +0200)]
[ci skip] typo

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Tue, 29 Sep 2020 04:42:19 +0000 (21:42 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update UPGRADING
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoDo not decode cookie names anymore
Stanislav Malyshev [Mon, 21 Sep 2020 01:08:55 +0000 (18:08 -0700)]
Do not decode cookie names anymore

4 years agoFix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
Stanislav Malyshev [Sun, 27 Sep 2020 05:08:52 +0000 (22:08 -0700)]
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Tue, 29 Sep 2020 04:39:34 +0000 (21:39 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoUpdate UPGRADING
Stanislav Malyshev [Tue, 29 Sep 2020 04:39:20 +0000 (21:39 -0700)]
Update UPGRADING

4 years agoUpdate UPGRADING
Stanislav Malyshev [Tue, 29 Sep 2020 04:38:58 +0000 (21:38 -0700)]
Update UPGRADING

4 years agoUpdate NEWS & UPGRADING
Stanislav Malyshev [Tue, 29 Sep 2020 04:34:52 +0000 (21:34 -0700)]
Update NEWS & UPGRADING

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 28 Sep 2020 20:57:59 +0000 (22:57 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #67465: NULL Pointer dereference in odbc_handle_preparer

4 years agoFix #67465: NULL Pointer dereference in odbc_handle_preparer
Christoph M. Becker [Mon, 28 Sep 2020 15:05:17 +0000 (17:05 +0200)]
Fix #67465: NULL Pointer dereference in odbc_handle_preparer

We have to initialize `stmt->driver_data` before we use it.

Closes GH-6225.

4 years agoDo not decode cookie names anymore
Stanislav Malyshev [Mon, 21 Sep 2020 01:08:55 +0000 (18:08 -0700)]
Do not decode cookie names anymore

4 years agoFix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
Stanislav Malyshev [Sun, 27 Sep 2020 05:08:52 +0000 (22:08 -0700)]
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 25 Sep 2020 15:32:41 +0000 (16:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix logic error in PDO

4 years agoFix logic error in PDO
George Peter Banyard [Fri, 25 Sep 2020 13:54:25 +0000 (14:54 +0100)]
Fix logic error in PDO

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 25 Sep 2020 11:51:55 +0000 (13:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80147: BINARY strings may not be properly zero-terminated

4 years agoFix #80147: BINARY strings may not be properly zero-terminated
Christoph M. Becker [Fri, 25 Sep 2020 09:25:02 +0000 (11:25 +0200)]
Fix #80147: BINARY strings may not be properly zero-terminated

We have to manually ensure that all strings fetched from a data source
are zero-terminated.

Closes GH-6213.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 24 Sep 2020 15:13:01 +0000 (17:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Use proper skipif section

4 years agoUse proper skipif section
Christoph M. Becker [Thu, 24 Sep 2020 15:10:09 +0000 (17:10 +0200)]
Use proper skipif section

The ODBC tests have to be skipped if no connection to the server can be
established.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 24 Sep 2020 10:16:34 +0000 (12:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78470: odbc_specialcolumns() no longer accepts $nullable

4 years agoFix #78470: odbc_specialcolumns() no longer accepts $nullable
Christoph M. Becker [Thu, 24 Sep 2020 08:30:41 +0000 (10:30 +0200)]
Fix #78470: odbc_specialcolumns() no longer accepts $nullable

It is mandatory to pass either `SQL_NO_NULLS` or `SQL_NULLABLE` as
tenth parameter to `SQLSpecialColumns()`; otherwise the function call
fails.  Therefore the user must be allowed to pass the desired value
as parameter to `odbc_specialcolumns()` again.

Closes GH-6200.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 23 Sep 2020 08:54:40 +0000 (10:54 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #76735: Incorrect message in fopen on invalid mode

4 years agoFix #76735: Incorrect message in fopen on invalid mode
Christoph M. Becker [Tue, 22 Sep 2020 16:57:21 +0000 (18:57 +0200)]
Fix #76735: Incorrect message in fopen on invalid mode

We have to log errors in `stream_opener` callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated `errno` or a
most generic message.

Closes GH-6187.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 23 Sep 2020 08:44:06 +0000 (10:44 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #77493: curl_basic_009 fails with newer curl versions

4 years agoFix #77493: curl_basic_009 fails with newer curl versions
Christoph M. Becker [Wed, 23 Sep 2020 08:38:59 +0000 (10:38 +0200)]
Fix #77493: curl_basic_009 fails with newer curl versions

libcurl 7.62.0 introduced a maximum protocol length of 8, so this test
case failed with `CURLE_URL_MALFORMAT`.  While this is lifted to 40 as
of libcurl 7.65.0, and this test case has already been fixed with
commit e27301c[1], we restore the original intention to check for a
`CURLE_UNSUPPORTED_PROTOCOL ` error.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=e27301c7b37f6a1643a0dc1966919bd62a32bc74>

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 22 Sep 2020 14:11:56 +0000 (16:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #76943: Inconsistent stream_wrapper_restore() errors

4 years agoFix #76943: Inconsistent stream_wrapper_restore() errors
Christoph M. Becker [Tue, 22 Sep 2020 11:01:32 +0000 (13:01 +0200)]
Fix #76943: Inconsistent stream_wrapper_restore() errors

If restoring of any not registered built-in wrapper is requested, the
function is supposed to fail with a warning, so we have to check this
condition first.

Furthermore, to be able to detect whether a built-in wrapper has been
changed, it is not sufficient to check whether *any* userland wrapper
has been registered, but rather whether the specific wrapper has been
modified.

Closes GH-6183.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 22 Sep 2020 11:16:42 +0000 (13:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79423: copy command is limited to size of file it can copy

4 years agoFix #79423: copy command is limited to size of file it can copy
Christoph M. Becker [Wed, 9 Sep 2020 17:21:41 +0000 (19:21 +0200)]
Fix #79423: copy command is limited to size of file it can copy

Passing `NULL` as `lpFileSizeHigh` to `GetFileSize()` gives wrong
results for files larger than 0xFFFFFFFF bytes.  We fix this by using
`GetFileSizeEx()`, and let the mapping fail, if the file size is too
large for the architecture.

Closes GH-5319.

4 years agoFix mmap copying
Christoph M. Becker [Mon, 21 Sep 2020 11:57:05 +0000 (13:57 +0200)]
Fix mmap copying

Instead of attempting to map large files into memory at once, we map
chunks of at most `PHP_STREAM_MMAP_MAX` bytes, and repeat that until we
hit the point where `php_stream_seek()` fails (see bug 54902), and copy
the rest of the file by reading and writing small chunks.

We also fix the mapping behavior for zero bytes on Windows, which did
not error (as with `mmap()`), but would have mapped the remaining file.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 21 Sep 2020 09:26:41 +0000 (11:26 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix memory leak in php_imap_mutf7()

4 years agoFix memory leak in php_imap_mutf7()
Christoph M. Becker [Mon, 21 Sep 2020 09:21:46 +0000 (11:21 +0200)]
Fix memory leak in php_imap_mutf7()

We have to free the string which has been allocated by libc-client.

4 years agoFix #80118: Erroneous whitespace match with JIT only
Christoph M. Becker [Sat, 19 Sep 2020 10:37:57 +0000 (12:37 +0200)]
Fix #80118: Erroneous whitespace match with JIT only

We backport r1273[1] from PCRE2.

[1] <https://vcs.pcre.org/pcre2?revision=1273&view=revision>

Closes GH-6165.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sun, 20 Sep 2020 13:36:30 +0000 (15:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80114: parse_url does not accept URLs with port 0

4 years agoFix #80114: parse_url does not accept URLs with port 0
Christoph M. Becker [Sun, 20 Sep 2020 11:45:09 +0000 (13:45 +0200)]
Fix #80114: parse_url does not accept URLs with port 0

URIs with a 0 port are generally valid, so `parse_url()` should
recognize such URIs, but still report the port as missing.

Co-authored-by: twosee <twose@qq.com>
Closes GH-6152.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Sun, 20 Sep 2020 08:02:32 +0000 (10:02 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix mysqli build with mysqlnd and without PDO

4 years agoFix mysqli build with mysqlnd and without PDO
Bob Weinand [Sun, 20 Sep 2020 00:57:39 +0000 (02:57 +0200)]
Fix mysqli build with mysqlnd and without PDO

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 18 Sep 2020 13:30:06 +0000 (15:30 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78179: mysqli/mysqlnd transaction extensions

4 years agoFix #78179: mysqli/mysqlnd transaction extensions
Daniel Black [Tue, 21 Jul 2020 06:23:14 +0000 (16:23 +1000)]
Fix #78179: mysqli/mysqlnd transaction extensions

MariaDB versioning created a mess with regarding testing
features based on version. We sidestep the problem here
by assuming the extensions are present, and if a syntax
error occurs with a SQL mode TRANS_START_READ_WRITE |
TRANS_START_READ_ONLY enabled, then output the same
warning as before.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 18 Sep 2020 13:25:35 +0000 (15:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Support NO_BACKSLASH_ESCAPES with newer libmysqlclient

4 years agoSupport NO_BACKSLASH_ESCAPES with newer libmysqlclient
Nikita Popov [Fri, 18 Sep 2020 08:29:28 +0000 (10:29 +0200)]
Support NO_BACKSLASH_ESCAPES with newer libmysqlclient

Requires the use of mysql_real_escape_string_quote().