1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Commit Graph

57022 Commits

Author SHA1 Message Date
Nikita Popov e437ed1a4b Merge branch 'PHP-8.0'
* PHP-8.0:
  Check PDOStatement initialization during iteration
2020-10-19 10:23:15 +02:00
Nikita Popov 74fe9170b6 Check PDOStatement initialization during iteration 2020-10-19 10:22:56 +02:00
Christoph M. Becker 521c36c855 Remove IGNORE_URL_WIN macro
This macro is defined to zero as of PHP 5.0.0, and as the comment
indicates, is no longer relevant.  Thus, we remove the definition and
all usages from the core and bundled extensions.

Closes GH-6351.
2020-10-18 23:36:36 +02:00
Máté Kocsis 7fe9df5978 Merge branch 'PHP-8.0' 2020-10-17 12:01:40 +02:00
Máté Kocsis f076ab0c0c Fix #80229: assert_options should have int and bool for parameter PHPDoc
Closes GH-6348
2020-10-17 12:01:07 +02:00
Alex Dowad 84c180d88b Add test suite for ISO-8859-x encoding verification and conversion 2020-10-16 22:25:48 +02:00
Alex Dowad bc18e32690 Do not pass invalid ISO-8859-{3,6,7,8} characters through silently
mbstring has a bad habit of passing invalid characters through silently
when converting to the same (or a "compatible") encoding.

For example, if you give it an invalid JIS X 0208 kuten code encoded with SJIS,
and try to convert that to EUC-JP, mbstring will just quietly re-encode the
invalid code in the EUC-JP representation.

At the same, some parts of the code (like `mb_check_encoding`) assume that
invalid characters will be treated as... well, invalid. Let's unbreak things
by actually catching errors and reporting them, instead of swallowing them.
2020-10-16 22:17:45 +02:00
Alex Dowad 5c6b2a7ad2 Add identify filter for ISO-8859-8 (Latin/Hebrew) 2020-10-16 22:17:45 +02:00
Alex Dowad ea687018cd Add identify filter for ISO-8859-7 (Latin/Greek) 2020-10-16 22:17:45 +02:00
Alex Dowad a6603b60f7 Add identify filter for ISO-8859-6 (Latin/Arabic)
Note that some text encoding conversion libraries, such as Solaris iconv
and FreeBSD iconv, map 0x30-0x39 to the Arabic script numerals rather than
the 'regular' Roman numerals. (That is, to Unicode codepoints 0x660-0x669.)

Further, Windows CP28596 adds more mappings to use the unused bytes in
ISO-8859-6.
2020-10-16 22:17:45 +02:00
Alex Dowad 23270d7f9e Add identify filter for ISO-8859-3 (Latin-3)
There are some bytes in this encoding which are not mapped to any character.
Notably, MicroSoft added their own mappings for these 'unused' bits in their
version of Latin-3, called CP28593.
2020-10-16 22:17:45 +02:00
Alex Dowad 7b9bed0150 Add identify filter for ISO-8859-16 (Latin-10) encoding
Interestingly, it looks like the original author intended to add an identify filter
for this encoding, but never did so. The needed struct is there, but was never added
to the list of identify filters in mbfl_ident.c.
2020-10-16 20:56:45 +02:00
Máté Kocsis e73bf01f9d Merge branch 'PHP-8.0' 2020-10-16 11:00:05 +02:00
Máté Kocsis d6264b0966 Verify parameter names of function aliases
Closes GH-6335
2020-10-16 10:56:33 +02:00
Nikita Popov ccf7c516a9 Merge branch 'PHP-8.0'
* PHP-8.0:
  DragonFlyBSD build update for opcache JIT part.
2020-10-15 14:50:34 +02:00
David Carlier 3841ea338e DragonFlyBSD build update for opcache JIT part.
Closes GH-6339.
2020-10-15 14:50:23 +02:00
Dmitry Stogov 14a1e66676 Merge branch 'PHP-8.0'
* PHP-8.0:
  Avoid refcounting when return CV (similar to optimization in VM).
2020-10-15 15:27:59 +03:00
Dmitry Stogov 5572318166 Avoid refcounting when return CV (similar to optimization in VM). 2020-10-15 15:27:00 +03:00
Christoph M. Becker f5b2dedc09 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix broken fix for #80239
2020-10-15 13:21:27 +02:00
Christoph M. Becker ecd51aa099 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix broken fix for #80239
2020-10-15 13:20:58 +02:00
Christoph M. Becker bc214c8423 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix broken fix for #80239
2020-10-15 13:19:30 +02:00
Christoph M. Becker 4b9db65f68 Fix broken fix for #80239
No idea why that `git am` failed that badly.
2020-10-15 13:18:34 +02:00
Christoph M. Becker 42d6844358 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix #80239: imap_rfc822_write_address() leaks memory
2020-10-15 12:58:07 +02:00
Christoph M. Becker b7c1834c6a Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80239: imap_rfc822_write_address() leaks memory
2020-10-15 12:57:35 +02:00
Christoph M. Becker 7899ac4c14 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80239: imap_rfc822_write_address() leaks memory
2020-10-15 12:56:02 +02:00
Christoph M. Becker 5941b30bb8 Fix #80239: imap_rfc822_write_address() leaks memory
We have to free the address when we're finished with it.
2020-10-15 12:54:53 +02:00
Côme Chilliet a7170727b5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Change $controls parameter to default to null in ext/ldap
2020-10-15 11:49:38 +02:00
Côme Chilliet 15a3eca3ef Change $controls parameter to default to null in ext/ldap
It appeared that not passing $controls and passing [] caused different
 behaviors, when not passing it the controls set through ldap_set_option
 would be used, when passing [] they would not.

So, this parameter is now nullable and defaults to null to have a
 consistent behavior.
2020-10-15 11:48:47 +02:00
Nikita Popov d384233c87 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix leak in gmp_export()
2020-10-15 10:18:13 +02:00
Nikita Popov 682cc42900 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix leak in gmp_export()
2020-10-15 10:17:55 +02:00
Nikita Popov fb246bec14 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix leak in gmp_export()
2020-10-15 10:16:56 +02:00
Nikita Popov a29016d70d Fix leak in gmp_export() 2020-10-15 10:16:22 +02:00
Christoph M. Becker 4601926635 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Adapt test expectation to cURL 7.73.0
2020-10-14 19:12:32 +02:00
Christoph M. Becker e076455026 Adapt test expectation to cURL 7.73.0
cURL 7.73.0 introduced support for the MQTT protocol, so we have to
adapt our expectations regarding the supported protocols.
2020-10-14 19:11:58 +02:00
Nikita Popov e6e9f64a96 Merge branch 'PHP-8.0'
* PHP-8.0:
  Sync zpp in phar interceptors
2020-10-14 16:58:13 +02:00
Nikita Popov e065d97e94 Sync zpp in phar interceptors
This should match the zpp of the intercepted functions...
2020-10-14 16:58:07 +02:00
Nikita Popov a16699e1e5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix null foreground in imagewbmp
  Mark ldap_exop() param as UNKNOWN
2020-10-14 16:40:57 +02:00
Nikita Popov 187efc6496 Fix null foreground in imagewbmp
The variable was not actually passed to zpp...
2020-10-14 16:40:35 +02:00
Nikita Popov 1610e81b51 Mark ldap_exop() param as UNKNOWN
This function actually has very different behavior depending on
whether $response_data is passed or not.
2020-10-14 16:38:56 +02:00
Nikita Popov a008094fc8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Initialize calendar_long variable
2020-10-14 11:58:44 +02:00
Nikita Popov 5e34744fd9 Initialize calendar_long variable
As reported by cmb, this results a VC runtime warning. I don't
believe there's a problem here, as we only use calendar_long if
both calendar_is_null and calendar_obj are not set, but it doesn't
hurt to initialize it either...
2020-10-14 11:57:05 +02:00
Nikita Popov 59a8007d88 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix nullability of openssl_cms_sign() parameter
2020-10-14 11:34:28 +02:00
Nikita Popov 251af7329f Fix nullability of openssl_cms_sign() parameter 2020-10-14 11:34:15 +02:00
Nikita Popov adf59840db Merge branch 'PHP-8.0'
* PHP-8.0:
  Allow passing $tag for non-authenticated encryption
2020-10-14 10:57:22 +02:00
Nikita Popov 2540f68d0e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Allow passing $tag for non-authenticated encryption
2020-10-14 10:56:51 +02:00
Nikita Popov 6c6a58e930 Allow passing $tag for non-authenticated encryption
openssl_encrypt() currently throws a warning if the $tag out
parameter is passed for a non-authenticated cipher. This violates
the principle that a function should behave the same if a parameter
is not passed, and if the default value is passed for the parameter.

I believe this warning should simply be dropped and the $tag be
populated with null, as is already the case. Otherwise, it is not
possible to use openssl_encrypt() in generic wrapper APIs, that are
compatible with both authenticated and non-authenticated encryption.

Closes GH-6333.
2020-10-14 10:54:06 +02:00
Alex Dowad 7dc16374b4 Remove unused IS_SJIS1 and IS_SJIS2 macros 2020-10-14 08:31:51 +02:00
Dmitry Stogov b2ff40cfdf Merge branch 'PHP-8.0'
* PHP-8.0:
  Added missing side exit
  Update NEWS for 8.0.0RC3
  Update NEWS for PHP 8.0.0RC2
2020-10-14 01:19:24 +03:00
Dmitry Stogov 06bb1feb09 Added missing side exit 2020-10-14 01:17:39 +03:00
Nikita Popov bd2488bc49 Merge branch 'PHP-8.0'
* PHP-8.0:
  Normalize mb_ereg() return value
2020-10-13 20:41:33 +02:00