]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 19 Oct 2020 16:43:20 +0000 (19:43 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Use zero-extended mov insted of sign-signed movsxd

4 years agoUse zero-extended mov insted of sign-signed movsxd
Dmitry Stogov [Mon, 19 Oct 2020 16:39:51 +0000 (19:39 +0300)]
Use zero-extended mov insted of sign-signed movsxd

4 years agoUse zend_accel_error_noreturn in more places
Nikita Popov [Mon, 19 Oct 2020 14:59:00 +0000 (16:59 +0200)]
Use zend_accel_error_noreturn in more places

Missed the place in accelerator_blacklist that was the actual
motivation here...

4 years agoAdd zend_accel_error_noreturn() helper
Nikita Popov [Mon, 19 Oct 2020 14:09:03 +0000 (16:09 +0200)]
Add zend_accel_error_noreturn() helper

Avoid confusing the compiler when code relies on the fact that
LOG_FATAL/LOG_ERROR will bailout/abort.

4 years agoDon't use global for array_walk_fci
Nikita Popov [Mon, 19 Oct 2020 13:24:29 +0000 (15:24 +0200)]
Don't use global for array_walk_fci

There's really no good reason for this to be a global, we can
easily pass it down to php_array_walk().

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 19 Oct 2020 13:14:57 +0000 (15:14 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80255

4 years agoFixed bug #80255
Nikita Popov [Mon, 19 Oct 2020 13:13:40 +0000 (15:13 +0200)]
Fixed bug #80255

This was a copy&paste mistake, target_block was used where
follow_block was intended. Also update copy&paste mistakes in
the comments.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 19 Oct 2020 09:24:26 +0000 (11:24 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Revert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"

4 years agoRevert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"
Nikita Popov [Mon, 19 Oct 2020 09:22:32 +0000 (11:22 +0200)]
Revert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"

This reverts commit 98bfad738ad2734dfba5733323f7ba733daf3ec3.

This doesn't work well in some setups, see bug #80113 and GH-5051.
Reverting this for now.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 19 Oct 2020 09:09:32 +0000 (11:09 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix bug #79983: Add support for OCB mode

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 19 Oct 2020 09:09:17 +0000 (11:09 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix bug #79983: Add support for OCB mode

4 years agoFix bug #79983: Add support for OCB mode
Nikita Popov [Wed, 14 Oct 2020 11:03:03 +0000 (13:03 +0200)]
Fix bug #79983: Add support for OCB mode

OCB mode ciphers were already exposed to openssl_encrypt/decrypt,
but misbehaved, because they were not treated as AEAD ciphers.
From that perspective, OCB should be treated the same way as GCM.
In OpenSSL 1.1 the necessary controls were unified under
EVP_CTRL_AEAD_* (and OCB is only supported since OpenSSL 1.1).

Closes GH-6337.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 19 Oct 2020 08:45:01 +0000 (10:45 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Disable Laravel testing

4 years agoDisable Laravel testing
Nikita Popov [Mon, 19 Oct 2020 08:43:43 +0000 (10:43 +0200)]
Disable Laravel testing

This has been failing for months now, let's make the scheduled
build status meaningful again.

[ci skip]

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 19 Oct 2020 08:35:40 +0000 (10:35 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add additional initialization checks to SplFileInfo
  Updated to version 2020.3 (2020c)

4 years agoAdd additional initialization checks to SplFileInfo
Nikita Popov [Mon, 19 Oct 2020 08:34:17 +0000 (10:34 +0200)]
Add additional initialization checks to SplFileInfo

4 years agoUpdated to version 2020.3 (2020c)
Derick Rethans [Mon, 19 Oct 2020 08:31:04 +0000 (09:31 +0100)]
Updated to version 2020.3 (2020c)

4 years agoUpdated to version 2020.3 (2020c)
Derick Rethans [Mon, 19 Oct 2020 08:31:04 +0000 (09:31 +0100)]
Updated to version 2020.3 (2020c)

4 years agoEmpty merge
Derick Rethans [Mon, 19 Oct 2020 08:31:04 +0000 (09:31 +0100)]
Empty merge

4 years agoEmpty merge
Derick Rethans [Mon, 19 Oct 2020 08:31:04 +0000 (09:31 +0100)]
Empty merge

4 years agoUpdated to version 2020.3 (2020c)
Derick Rethans [Mon, 19 Oct 2020 08:31:03 +0000 (09:31 +0100)]
Updated to version 2020.3 (2020c)

4 years agoEmpty merge
Derick Rethans [Mon, 19 Oct 2020 08:31:03 +0000 (09:31 +0100)]
Empty merge

4 years agoUpdated to version 2020.3 (2020c)
Derick Rethans [Mon, 19 Oct 2020 08:31:02 +0000 (09:31 +0100)]
Updated to version 2020.3 (2020c)

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 19 Oct 2020 08:23:15 +0000 (10:23 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Check PDOStatement initialization during iteration

4 years agoCheck PDOStatement initialization during iteration
Nikita Popov [Mon, 19 Oct 2020 08:22:08 +0000 (10:22 +0200)]
Check PDOStatement initialization during iteration

4 years agoRemove IGNORE_URL_WIN macro
Christoph M. Becker [Sun, 18 Oct 2020 16:27:01 +0000 (18:27 +0200)]
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.

4 years agoMerge branch 'PHP-8.0'
Máté Kocsis [Sat, 17 Oct 2020 10:01:40 +0000 (12:01 +0200)]
Merge branch 'PHP-8.0'

4 years agoFix #80229: assert_options should have int and bool for parameter PHPDoc
Máté Kocsis [Sat, 17 Oct 2020 09:29:13 +0000 (11:29 +0200)]
Fix #80229: assert_options should have int and bool for parameter PHPDoc

Closes GH-6348

4 years agoAdd test suite for ISO-8859-x encoding verification and conversion
Alex Dowad [Sat, 19 Sep 2020 16:04:27 +0000 (18:04 +0200)]
Add test suite for ISO-8859-x encoding verification and conversion

4 years agoDo not pass invalid ISO-8859-{3,6,7,8} characters through silently
Alex Dowad [Fri, 16 Oct 2020 20:03:27 +0000 (22:03 +0200)]
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.

4 years agoAdd identify filter for ISO-8859-8 (Latin/Hebrew)
Alex Dowad [Sat, 19 Sep 2020 18:41:01 +0000 (20:41 +0200)]
Add identify filter for ISO-8859-8 (Latin/Hebrew)

4 years agoAdd identify filter for ISO-8859-7 (Latin/Greek)
Alex Dowad [Sat, 19 Sep 2020 18:38:13 +0000 (20:38 +0200)]
Add identify filter for ISO-8859-7 (Latin/Greek)

4 years agoAdd identify filter for ISO-8859-6 (Latin/Arabic)
Alex Dowad [Sat, 19 Sep 2020 18:34:13 +0000 (20:34 +0200)]
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.

4 years agoAdd identify filter for ISO-8859-3 (Latin-3)
Alex Dowad [Sat, 19 Sep 2020 18:27:55 +0000 (20:27 +0200)]
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.

4 years agoAdd identify filter for ISO-8859-16 (Latin-10) encoding
Alex Dowad [Mon, 7 Sep 2020 06:42:16 +0000 (08:42 +0200)]
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.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 16 Oct 2020 16:38:34 +0000 (18:38 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Properly handle NULL output start filename

4 years agoProperly handle NULL output start filename
Nikita Popov [Fri, 16 Oct 2020 16:38:03 +0000 (18:38 +0200)]
Properly handle NULL output start filename

4 years agoRemove unused global
Nikita Popov [Fri, 16 Oct 2020 15:32:02 +0000 (17:32 +0200)]
Remove unused global

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 16 Oct 2020 15:29:22 +0000 (17:29 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Make sure output start filename is not freed early

4 years agoMake sure output start filename is not freed early
Nikita Popov [Fri, 16 Oct 2020 15:23:10 +0000 (17:23 +0200)]
Make sure output start filename is not freed early

As filenames are no longer interned, we need to keep a reference
to the zend_string to make sure it isn't freed.

To avoid a nominal source compatibility break, create a new member
in the globals.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 16 Oct 2020 14:58:58 +0000 (16:58 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix leak when setting dynamic property on generator

4 years agoFix leak when setting dynamic property on generator
Nikita Popov [Fri, 16 Oct 2020 14:57:50 +0000 (16:57 +0200)]
Fix leak when setting dynamic property on generator

4 years agoMerge branch 'PHP-8.0' into master
Christoph M. Becker [Fri, 16 Oct 2020 10:16:28 +0000 (12:16 +0200)]
Merge branch 'PHP-8.0' into master

* PHP-8.0:
  [ci skip] Make it clear what GD uses instead of resources

4 years ago[ci skip] Make it clear what GD uses instead of resources
Anatoly Pashin [Fri, 16 Oct 2020 09:06:11 +0000 (19:06 +1000)]
[ci skip] Make it clear what GD uses instead of resources

Closes GH-6342.

4 years agoMerge branch 'PHP-8.0'
Máté Kocsis [Fri, 16 Oct 2020 09:00:05 +0000 (11:00 +0200)]
Merge branch 'PHP-8.0'

4 years agoVerify parameter names of function aliases
Máté Kocsis [Tue, 13 Oct 2020 18:03:00 +0000 (20:03 +0200)]
Verify parameter names of function aliases

Closes GH-6335

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 15 Oct 2020 12:50:34 +0000 (14:50 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  DragonFlyBSD build update for opcache JIT part.

4 years agoDragonFlyBSD build update for opcache JIT part.
David Carlier [Wed, 14 Oct 2020 18:49:30 +0000 (19:49 +0100)]
DragonFlyBSD build update for opcache JIT part.

Closes GH-6339.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Thu, 15 Oct 2020 12:27:59 +0000 (15:27 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Avoid refcounting when return CV (similar to optimization in VM).

4 years agoAvoid refcounting when return CV (similar to optimization in VM).
Dmitry Stogov [Thu, 15 Oct 2020 12:27:00 +0000 (15:27 +0300)]
Avoid refcounting when return CV (similar to optimization in VM).

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 15 Oct 2020 12:24:44 +0000 (14:24 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix bug #80055

4 years agoFix bug #80055
Nikita Popov [Thu, 15 Oct 2020 10:46:07 +0000 (12:46 +0200)]
Fix bug #80055

We need to perform trait scope fixup for both methods involved
in the inheritance check. For that purpose we already need to
thread through a separate fn scope through the entire inheritance
checking machinery.

4 years agoMerge branch 'PHP-8.0' into master
Christoph M. Becker [Thu, 15 Oct 2020 11:21:27 +0000 (13:21 +0200)]
Merge branch 'PHP-8.0' into master

* PHP-8.0:
  Fix broken fix for #80239

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 15 Oct 2020 11:20:58 +0000 (13:20 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix broken fix for #80239

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 15 Oct 2020 11:19:30 +0000 (13:19 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix broken fix for #80239

4 years agoFix broken fix for #80239
Christoph M. Becker [Thu, 15 Oct 2020 11:18:34 +0000 (13:18 +0200)]
Fix broken fix for #80239

No idea why that `git am` failed that badly.

4 years agoMerge branch 'PHP-8.0' into master
Christoph M. Becker [Thu, 15 Oct 2020 10:58:07 +0000 (12:58 +0200)]
Merge branch 'PHP-8.0' into master

* PHP-8.0:
  Fix #80239: imap_rfc822_write_address() leaks memory

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 15 Oct 2020 10:57:13 +0000 (12:57 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80239: imap_rfc822_write_address() leaks memory

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

* PHP-7.3:
  Fix #80239: imap_rfc822_write_address() leaks memory

4 years agoFix #80239: imap_rfc822_write_address() leaks memory
Christoph M. Becker [Thu, 15 Oct 2020 10:51:10 +0000 (12:51 +0200)]
Fix #80239: imap_rfc822_write_address() leaks memory

We have to free the address when we're finished with it.

4 years agoMerge branch 'PHP-8.0'
Côme Chilliet [Thu, 15 Oct 2020 09:49:38 +0000 (11:49 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Change $controls parameter to default to null in ext/ldap

4 years agoChange $controls parameter to default to null in ext/ldap
Côme Chilliet [Thu, 15 Oct 2020 09:46:44 +0000 (11:46 +0200)]
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.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 15 Oct 2020 08:46:40 +0000 (10:46 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Skip arginfo test under msan

4 years agoSkip arginfo test under msan
Nikita Popov [Thu, 15 Oct 2020 08:40:23 +0000 (10:40 +0200)]
Skip arginfo test under msan

Msan is missing interceptors for some functions that result in
false positives.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 15 Oct 2020 08:18:13 +0000 (10:18 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix leak in gmp_export()

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 15 Oct 2020 08:17:55 +0000 (10:17 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix leak in gmp_export()

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 15 Oct 2020 08:16:56 +0000 (10:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix leak in gmp_export()

4 years agoFix leak in gmp_export()
Nikita Popov [Thu, 15 Oct 2020 08:16:22 +0000 (10:16 +0200)]
Fix leak in gmp_export()

4 years agoMerge branch 'PHP-8.0' into master
Christoph M. Becker [Wed, 14 Oct 2020 17:12:32 +0000 (19:12 +0200)]
Merge branch 'PHP-8.0' into master

* PHP-8.0:
  Adapt test expectation to cURL 7.73.0

4 years agoAdapt test expectation to cURL 7.73.0
Christoph M. Becker [Wed, 14 Oct 2020 16:50:56 +0000 (18:50 +0200)]
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.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 14 Oct 2020 14:58:13 +0000 (16:58 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Sync zpp in phar interceptors

4 years agoSync zpp in phar interceptors
Nikita Popov [Wed, 14 Oct 2020 14:57:38 +0000 (16:57 +0200)]
Sync zpp in phar interceptors

This should match the zpp of the intercepted functions...

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 14 Oct 2020 14:40:57 +0000 (16:40 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix null foreground in imagewbmp
  Mark ldap_exop() param as UNKNOWN

4 years agoFix null foreground in imagewbmp
Nikita Popov [Wed, 14 Oct 2020 14:40:09 +0000 (16:40 +0200)]
Fix null foreground in imagewbmp

The variable was not actually passed to zpp...

4 years agoMark ldap_exop() param as UNKNOWN
Nikita Popov [Wed, 14 Oct 2020 09:43:22 +0000 (11:43 +0200)]
Mark ldap_exop() param as UNKNOWN

This function actually has very different behavior depending on
whether $response_data is passed or not.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 14 Oct 2020 14:26:27 +0000 (16:26 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  More arginfo/zpp verification

4 years agoMore arginfo/zpp verification
Nikita Popov [Tue, 21 Jul 2020 14:21:14 +0000 (16:21 +0200)]
More arginfo/zpp verification

Run all functions with a varying number of null arguments, which
helps us flush out all kinds of bugs.

Closes GH-5881.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 14 Oct 2020 09:58:44 +0000 (11:58 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Initialize calendar_long variable

4 years agoInitialize calendar_long variable
Nikita Popov [Wed, 14 Oct 2020 09:57:05 +0000 (11:57 +0200)]
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...

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 14 Oct 2020 09:34:28 +0000 (11:34 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix nullability of openssl_cms_sign() parameter

4 years agoFix nullability of openssl_cms_sign() parameter
Nikita Popov [Wed, 14 Oct 2020 09:31:58 +0000 (11:31 +0200)]
Fix nullability of openssl_cms_sign() parameter

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 14 Oct 2020 08:57:22 +0000 (10:57 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Allow passing $tag for non-authenticated encryption

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 14 Oct 2020 08:56:51 +0000 (10:56 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Allow passing $tag for non-authenticated encryption

4 years agoAllow passing $tag for non-authenticated encryption
Nikita Popov [Tue, 13 Oct 2020 14:46:32 +0000 (16:46 +0200)]
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.

4 years agoSanity check zpp max argument count
Nikita Popov [Tue, 13 Oct 2020 15:53:49 +0000 (17:53 +0200)]
Sanity check zpp max argument count

This would have prevented 9b4094c.

Closes GH-6334.

4 years agoRemove unused IS_SJIS1 and IS_SJIS2 macros
Alex Dowad [Mon, 12 Oct 2020 15:42:01 +0000 (17:42 +0200)]
Remove unused IS_SJIS1 and IS_SJIS2 macros

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 13 Oct 2020 22:19:24 +0000 (01:19 +0300)]
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

4 years agoAdded missing side exit
Dmitry Stogov [Tue, 13 Oct 2020 22:17:39 +0000 (01:17 +0300)]
Added missing side exit

4 years agoUpdate NEWS for 8.0.0RC3
Sara Golemon [Tue, 13 Oct 2020 21:59:53 +0000 (21:59 +0000)]
Update NEWS for 8.0.0RC3

4 years agoUpdate NEWS for PHP 8.0.0RC2
Sara Golemon [Tue, 13 Oct 2020 21:53:31 +0000 (21:53 +0000)]
Update NEWS for PHP 8.0.0RC2

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 13 Oct 2020 18:41:33 +0000 (20:41 +0200)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Normalize mb_ereg() return value

4 years agoNormalize mb_ereg() return value
Nikita Popov [Tue, 13 Oct 2020 14:17:40 +0000 (16:17 +0200)]
Normalize mb_ereg() return value

mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:

> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.

Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.

The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.

This fixes the default value integrity violation in PHP 8.

Closes GH-6331.

4 years agomUTF-7 (UTF7-IMAP) conversion: handle illegal (non-RFC-compliant) input correctly
Alex Dowad [Fri, 11 Sep 2020 18:56:44 +0000 (20:56 +0200)]
mUTF-7 (UTF7-IMAP) conversion: handle illegal (non-RFC-compliant) input correctly

Instead of looking the other way and letting things slide, report errors when
the input does not follow the RFC.

4 years agoAdd 'mUTF-7' alias for UTF7-IMAP encoding
Alex Dowad [Sat, 12 Sep 2020 08:09:01 +0000 (10:09 +0200)]
Add 'mUTF-7' alias for UTF7-IMAP encoding

4 years agoAdd comment explaining mUTF-7 to mbfilter_utf7imap.c
Alex Dowad [Thu, 10 Sep 2020 18:33:46 +0000 (20:33 +0200)]
Add comment explaining mUTF-7 to mbfilter_utf7imap.c

4 years agoAdd identify filter for UCS-2, UCS-2BE, and UCS-2LE encodings
Alex Dowad [Sun, 6 Sep 2020 11:13:37 +0000 (13:13 +0200)]
Add identify filter for UCS-2, UCS-2BE, and UCS-2LE encodings

4 years agoAdd mbstring identify filter for 'binary' encoding
Alex Dowad [Sun, 6 Sep 2020 11:10:52 +0000 (13:10 +0200)]
Add mbstring identify filter for 'binary' encoding

4 years agoAdd identify filter for UTF-16, UTF-16LE, UTF-16BE
Alex Dowad [Sun, 6 Sep 2020 08:32:58 +0000 (10:32 +0200)]
Add identify filter for UTF-16, UTF-16LE, UTF-16BE

There was one faulty test in the suite which only passed before because UTF-16 had no
identify filter. After this was fixed, it exposed the problem with the test.

4 years agoMerge branch 'PHP-8.0' into master
Christoph M. Becker [Tue, 13 Oct 2020 17:41:54 +0000 (19:41 +0200)]
Merge branch 'PHP-8.0' into master

* PHP-8.0:
  Fix #64076: imap_sort() does not return FALSE on failure

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 13 Oct 2020 17:40:49 +0000 (19:40 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #64076: imap_sort() does not return FALSE on failure