]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 17 Nov 2020 20:56:39 +0000 (23:56 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed trampoline handling

4 years agoFixed trampoline handling
Dmitry Stogov [Tue, 17 Nov 2020 20:56:05 +0000 (23:56 +0300)]
Fixed trampoline handling

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 17 Nov 2020 20:54:48 +0000 (23:54 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Update NEWS for 8.0.0
  Update NEWS for PHP 8.0.0RC5

4 years agoUpdate NEWS for 8.0.0
Gabriel Caruso [Tue, 17 Nov 2020 16:34:55 +0000 (16:34 +0000)]
Update NEWS for 8.0.0

4 years agoUpdate NEWS for PHP 8.0.0RC5
Gabriel Caruso [Tue, 17 Nov 2020 16:23:11 +0000 (16:23 +0000)]
Update NEWS for PHP 8.0.0RC5

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 17 Nov 2020 15:32:01 +0000 (18:32 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed allocated register clobbering

4 years agoFixed allocated register clobbering
Dmitry Stogov [Tue, 17 Nov 2020 15:31:14 +0000 (18:31 +0300)]
Fixed allocated register clobbering

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 17 Nov 2020 13:24:44 +0000 (16:24 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed false pasitive ASAN NULL pointer dereference warning

4 years agoFixed false pasitive ASAN NULL pointer dereference warning
Dmitry Stogov [Tue, 17 Nov 2020 13:23:30 +0000 (16:23 +0300)]
Fixed false pasitive ASAN NULL pointer dereference warning

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 17 Nov 2020 12:16:32 +0000 (13:16 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #80312: change default engine from MyISAM to InnoDB in tests

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 17 Nov 2020 12:16:17 +0000 (13:16 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80312: change default engine from MyISAM to InnoDB in tests

4 years agoFix #80312: change default engine from MyISAM to InnoDB in tests
Darek Slusarczyk [Fri, 6 Nov 2020 14:41:15 +0000 (15:41 +0100)]
Fix #80312: change default engine from MyISAM to InnoDB in tests

Change mysqli and pdo_mysql tests configuration to use by default
InnoDB instead of MyISAM.

Closes GH-6405.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 17 Nov 2020 09:54:38 +0000 (10:54 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80370: Segmentation fault reflecting attributes of dynamic property

4 years agoFixed bug #80370: Segmentation fault reflecting attributes of dynamic property
Benjamin Eberlei [Sun, 15 Nov 2020 07:45:26 +0000 (08:45 +0100)]
Fixed bug #80370: Segmentation fault reflecting attributes of dynamic property

Closes GH-6428.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 17 Nov 2020 09:30:20 +0000 (10:30 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Provide unused retvals to observers

4 years agoProvide unused retvals to observers
Sammy Kaye Powers [Wed, 11 Nov 2020 22:25:39 +0000 (14:25 -0800)]
Provide unused retvals to observers

Make sure that the return value is available to observers, even if
it is not used by the caller.

Closes GH-6422.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 17 Nov 2020 09:20:52 +0000 (10:20 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix incorrectly optimized out live range

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 17 Nov 2020 09:20:23 +0000 (10:20 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix incorrectly optimized out live range

4 years agoFix incorrectly optimized out live range
Nikita Popov [Tue, 17 Nov 2020 09:18:37 +0000 (10:18 +0100)]
Fix incorrectly optimized out live range

For x ? y : z style structures, the live range starts at z, but
may also hold the value of y. Make sure that the refcounting check
takes this into account, by checking the type of a potential phi
user.

4 years agoMerge branch 'PHP-8.0'
Sammy Kaye Powers [Mon, 16 Nov 2020 23:13:29 +0000 (15:13 -0800)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fire open observer end handlers after a zend_bailout

4 years agoFire open observer end handlers after a zend_bailout
Sammy Kaye Powers [Fri, 23 Oct 2020 18:43:31 +0000 (11:43 -0700)]
Fire open observer end handlers after a zend_bailout

Closes GH-6377

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 16 Nov 2020 15:17:17 +0000 (18:17 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed MAY_BE_INDIRECT inference

4 years agoFixed MAY_BE_INDIRECT inference
Dmitry Stogov [Mon, 16 Nov 2020 15:17:05 +0000 (18:17 +0300)]
Fixed MAY_BE_INDIRECT inference

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Mon, 16 Nov 2020 13:34:52 +0000 (14:34 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #74558: Can't rebind closure returned by Closure::fromCallable()

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 16 Nov 2020 13:33:45 +0000 (14:33 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #74558: Can't rebind closure returned by Closure::fromCallable()

4 years agoFix #74558: Can't rebind closure returned by Closure::fromCallable()
Christoph M. Becker [Thu, 12 Nov 2020 14:37:51 +0000 (15:37 +0100)]
Fix #74558: Can't rebind closure returned by Closure::fromCallable()

Failure to rebind such closures is not necessarily related to them
being created by `ReflectionFunctionAbstract::getClosure()`, so we fix
the error message.

Closes GH-6424.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 16 Nov 2020 13:11:48 +0000 (16:11 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed alias handling

4 years agoFixed alias handling
Dmitry Stogov [Mon, 16 Nov 2020 13:11:25 +0000 (16:11 +0300)]
Fixed alias handling

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 16 Nov 2020 11:52:18 +0000 (14:52 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed reference-counting
  Fixed incorrect FETCH_THIS optimization

4 years agoFixed reference-counting
Dmitry Stogov [Mon, 16 Nov 2020 11:51:55 +0000 (14:51 +0300)]
Fixed reference-counting

4 years agoFixed incorrect FETCH_THIS optimization
Dmitry Stogov [Mon, 16 Nov 2020 11:51:39 +0000 (14:51 +0300)]
Fixed incorrect FETCH_THIS optimization

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 16 Nov 2020 10:21:03 +0000 (13:21 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed inconsistent VM stack state

4 years agoFixed inconsistent VM stack state
Dmitry Stogov [Mon, 16 Nov 2020 10:19:44 +0000 (13:19 +0300)]
Fixed inconsistent VM stack state

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 16 Nov 2020 09:06:09 +0000 (12:06 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Trampoline cleanup

4 years agoTrampoline cleanup
Dmitry Stogov [Mon, 16 Nov 2020 09:05:45 +0000 (12:05 +0300)]
Trampoline cleanup

4 years agoAdd --repeat flag to usage info of run-tests.php
Christoph M. Becker [Sun, 15 Nov 2020 14:19:38 +0000 (15:19 +0100)]
Add --repeat flag to usage info of run-tests.php

Closes GH-6429.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Sat, 14 Nov 2020 14:18:52 +0000 (15:18 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  [ci skip] Add note that imagedestroy() no longer has an effect

4 years ago[ci skip] Add note that imagedestroy() no longer has an effect
Pavel Djundik [Sat, 14 Nov 2020 11:12:38 +0000 (13:12 +0200)]
[ci skip] Add note that imagedestroy() no longer has an effect

Closes GH-6427.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 13 Nov 2020 13:57:31 +0000 (14:57 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Inline pair production in json parser

4 years agoInline pair production in json parser
Nikita Popov [Fri, 13 Nov 2020 13:55:26 +0000 (14:55 +0100)]
Inline pair production in json parser

Having this as a separate production has a noticeable performance
impact, and doesn't really make things clearer either.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Thu, 12 Nov 2020 15:43:57 +0000 (16:43 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Strip trailing line breaks and periods from Windows error messages

4 years agoStrip trailing line breaks and periods from Windows error messages
Christoph M. Becker [Thu, 12 Nov 2020 13:58:47 +0000 (14:58 +0100)]
Strip trailing line breaks and periods from Windows error messages

PHP error messages should not contain line breaks, so we remove these
from the Windows specific error messages.  We also remove trailing
periods for the same reason.

Closes GH-6423.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 12 Nov 2020 14:12:57 +0000 (15:12 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Don't assume libmysqlclient library name

4 years agoDon't assume libmysqlclient library name
Nikita Popov [Thu, 12 Nov 2020 14:09:18 +0000 (15:09 +0100)]
Don't assume libmysqlclient library name

By simply dropping the additional checks, in line with the general
guideline of trusting the output of config scripts (this should
be migrated to pkg-config though).

Also drop the code for manually adding -z if mysql_config does not
-- that's not our problem.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 12 Nov 2020 11:18:49 +0000 (12:18 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix memory leak when user filter onCreate returns false

4 years agoFix memory leak when user filter onCreate returns false
Nikita Popov [Thu, 12 Nov 2020 11:18:33 +0000 (12:18 +0100)]
Fix memory leak when user filter onCreate returns false

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 12 Nov 2020 10:38:23 +0000 (11:38 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix memory leak with bcsqrt on number 0<X<1

4 years agoFix memory leak with bcsqrt on number 0<X<1
Nikita Popov [Thu, 12 Nov 2020 10:37:54 +0000 (11:37 +0100)]
Fix memory leak with bcsqrt on number 0<X<1

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 12 Nov 2020 10:02:50 +0000 (11:02 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix reflection getDefaultValue() with user arg info

4 years agoFix reflection getDefaultValue() with user arg info
Nikita Popov [Thu, 12 Nov 2020 10:02:04 +0000 (11:02 +0100)]
Fix reflection getDefaultValue() with user arg info

The default value is part of the op_array in that case, but we have
no way to access it. Fail gracefully.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 11 Nov 2020 17:14:40 +0000 (20:14 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed incorrectly eliminated type store

4 years agoFixed incorrectly eliminated type store
Dmitry Stogov [Wed, 11 Nov 2020 17:13:58 +0000 (20:13 +0300)]
Fixed incorrectly eliminated type store

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 11 Nov 2020 15:34:30 +0000 (18:34 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Remove assertion

4 years agoRemove assertion
Dmitry Stogov [Wed, 11 Nov 2020 15:34:16 +0000 (18:34 +0300)]
Remove assertion

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 11 Nov 2020 15:03:32 +0000 (16:03 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Handle errors during next_result()

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 11 Nov 2020 15:03:10 +0000 (16:03 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Handle errors during next_result()

4 years agoHandle errors during next_result()
Nikita Popov [Wed, 11 Nov 2020 14:56:05 +0000 (15:56 +0100)]
Handle errors during next_result()

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 11 Nov 2020 14:35:14 +0000 (17:35 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed incorrect invariant guard motion

4 years agoFixed incorrect invariant guard motion
Dmitry Stogov [Wed, 11 Nov 2020 14:34:46 +0000 (17:34 +0300)]
Fixed incorrect invariant guard motion

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 11 Nov 2020 11:55:08 +0000 (14:55 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Stop on fake frame
  Fixed reference-counting propagation

4 years agoStop on fake frame
Dmitry Stogov [Wed, 11 Nov 2020 11:54:54 +0000 (14:54 +0300)]
Stop on fake frame

4 years agoFixed reference-counting propagation
Dmitry Stogov [Wed, 11 Nov 2020 11:54:00 +0000 (14:54 +0300)]
Fixed reference-counting propagation

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 11 Nov 2020 11:48:44 +0000 (12:48 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix double free when socket_accept fails

4 years agoFix double free when socket_accept fails
Nikita Popov [Wed, 11 Nov 2020 11:48:25 +0000 (12:48 +0100)]
Fix double free when socket_accept fails

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 11 Nov 2020 10:56:39 +0000 (11:56 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Retain reference to share handle from curl handle

4 years agoRetain reference to share handle from curl handle
Nikita Popov [Wed, 11 Nov 2020 10:51:20 +0000 (11:51 +0100)]
Retain reference to share handle from curl handle

Not keeping a reference will not result in use after free, because
curl protects against it, but it will result in a memory leak,
because curl_share_cleanup() will fail. We should make sure that
the share handle object stays alive as long as the curl handles
use it.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 11 Nov 2020 10:51:07 +0000 (13:51 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  [Observer+JIT] Save opline before calling begin/end handlers

4 years ago[Observer+JIT] Save opline before calling begin/end handlers
Dmitry Stogov [Wed, 11 Nov 2020 10:50:53 +0000 (13:50 +0300)]
[Observer+JIT] Save opline before calling begin/end handlers

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 11 Nov 2020 10:07:12 +0000 (13:07 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  [Observer] Save opline before calling begin/end handlers

4 years ago[Observer] Save opline before calling begin/end handlers
Dmitry Stogov [Wed, 11 Nov 2020 10:06:55 +0000 (13:06 +0300)]
[Observer] Save opline before calling begin/end handlers

4 years agoConsolidate all single-byte encodings in one source file
Alex Dowad [Tue, 3 Nov 2020 07:57:41 +0000 (09:57 +0200)]
Consolidate all single-byte encodings in one source file

We can squeeze out a lot of duplicated code in this way.

4 years agoEnhance mbstring support for UCS-2 text
Alex Dowad [Fri, 4 Sep 2020 20:17:59 +0000 (22:17 +0200)]
Enhance mbstring support for UCS-2 text

- For consistency with UTF-16, UTF-32, and UCS-4, strip leading byte
  order marks.
- Treat it as an error if string is truncated (i.e. has an odd number
  of bytes).

4 years agoLeading BOM is stripped for UTF-32
Alex Dowad [Fri, 4 Sep 2020 20:21:20 +0000 (22:21 +0200)]
Leading BOM is stripped for UTF-32

For consistency with UTF-16 and UCS-4.

Also, do some code cleanup.

4 years agoAdd test suite for SJIS-mac encoding
Alex Dowad [Wed, 9 Sep 2020 18:02:46 +0000 (20:02 +0200)]
Add test suite for SJIS-mac encoding

4 years agoUnicode -> SJIS-mac conversion doesn't reject valid codepoints after a bad transcodin...
Alex Dowad [Mon, 9 Nov 2020 19:40:08 +0000 (21:40 +0200)]
Unicode -> SJIS-mac conversion doesn't reject valid codepoints after a bad transcoding hint

To give the background on this issue, here is an excerpt from JAPANESE.txt,
from the Unicode Consortium:

    Apple has defined a block of 32 corporate characters as "transcoding
    hints." These are used in combination with standard Unicode characters
    to force them to be treated in a special way for mapping to other
    encodings; they have no other effect. Sixteen of these transcoding
    hints are "grouping hints" - they indicate that the next 2-4 Unicode
    characters should be treated as a single entity for transcoding. The
    other sixteen transcoding hints are "variant tags" - they are like
    combining characters, and can follow a standard Unicode (or a sequence
    consisting of a base character and other combining characters) to
    cause it to be treated in a special way for transcoding. These always
    terminate a combining-character sequence.

    The transcoding coding hints used in this mapping table are:

    0xF860  group next 2 characters as a single entity for transcoding
    0xF861  group next 3 characters as a single entity for transcoding
    0xF862  group next 4 characters as a single entity for transcoding
    0xF87A  variant tag for "negative" (i.e. black & white reversed)
    0xF87E  variant tag for vertical form
    0xF87F  variant tag for other alternate form

    For example, the Apple addition character 0x85AB is Roman numeral
    thirteen. There is no single Unicode for this (although there are
    standard Unicodes for Roman numerals 1-12). Using the grouping hint
    0xF862 in combination with standard Unicodes, we can map this as
    0xF862+0x0058+0x0049+0x0049+0x0049 (i.e. X + I + I + I).

Our SJIS-mac conversion code actually recognizes some special sequences
which start with an Apple 'transcoding hint'. However, if a transcoding
hint is misplaced and is not followed by one of the expected sequences,
we can just emit one error marker for the bad transcoding hint and then
process the following codepoint as normal.

4 years agoSJIS-mac encoding conversion: Stop the carnage of innocent Unicode codepoints
Alex Dowad [Sat, 19 Sep 2020 13:16:51 +0000 (15:16 +0200)]
SJIS-mac encoding conversion: Stop the carnage of innocent Unicode codepoints

When converting Unicode to MacJapanese, some special sequences of Unicode
codepoints are collapsed into a single SJIS character. When the implementation
sees a codepoint which *might* begin such a sequence, it is cached and examined
again after the next codepoint arrives.

If it turns out that it wasn't one of the 'special' sequences, then a 'fallback'
conversion table is consulted to convert the cached codepoint. Then we re-enter
the regular conversion code to convert the immediately following codepoint.
BUT, local variables need to be reinitialized properly when doing this!

Because the locals weren't reinitialized, the sad result was that some codepoints
would get chopped up into bit salad and emitted as something totally bogus
(which might not even be valid SJIS-mac text at all).

4 years agoConvert Unicode halfwidth Yen sign to MacJapanese halfwidth Yen sign
Alex Dowad [Sat, 19 Sep 2020 12:27:14 +0000 (14:27 +0200)]
Convert Unicode halfwidth Yen sign to MacJapanese halfwidth Yen sign

Since 1993, Unicode has had a specific codepoint for a fullwidth Yen sign.
Likewise, MacJapanese has separate kuten codes for halfwidth and fullwidth
Yen signs. But mbstring mapped _both_ Yen sign codepoints to the
MacJapanese fullwidth Yen sign.

It's probably more appropriate to map the 'ordinary' Yen sign to the
MacJapanese halfwidth Yen sign. Besides, this means that the conversion
between Unicode and MacJapanese is closer to being lossless and reversible.

4 years agoSJIS-mac encoding conversion: handle invalid (or truncated) 2nd byte for Kanji correctly
Alex Dowad [Wed, 9 Sep 2020 19:18:54 +0000 (21:18 +0200)]
SJIS-mac encoding conversion: handle invalid (or truncated) 2nd byte for Kanji correctly

Also, don't accept 1st bytes above 0xED, since none of the possible 2-byte
sequences starting with 0xEE and above are actually mapped to any character.

4 years agoAdd test suite for SJIS-2004 encoding
Alex Dowad [Tue, 8 Sep 2020 20:14:36 +0000 (22:14 +0200)]
Add test suite for SJIS-2004 encoding

4 years agoDon't mangle non-Japanese chars which appear after a 'combining' kana in SJIS-2004
Alex Dowad [Thu, 17 Sep 2020 20:34:59 +0000 (22:34 +0200)]
Don't mangle non-Japanese chars which appear after a 'combining' kana in SJIS-2004

Unicode has 'combining' characters which join with another following character.
Japanese hiragana and katakana with the 'two dots' voice mark can be represented
in this way, with one Unicode character for the 'base' kana and another one which
adds the voice mark.

In SJIS-2004, however, there are dedicated characters for voiced and unvoiced
kana. So some special checks are done to identify sequences of Unicode characters
which need to be 'collapsed' into a single SJIS-2004 character.

If a kana is immediately followed by some other unrelated character, like a
Cyrillic letter, then the cached kana should be output 'as is' and we
proceed with encoding the unrelated character. When doing this, though,
we need to re-initialize local variables, or else the unrelated character
will be mangled in some cases.

4 years agoSJIS-2004 encoding conversion: handle invalid (or truncated) 2nd byte for Kanji correctly
Alex Dowad [Tue, 8 Sep 2020 20:57:28 +0000 (22:57 +0200)]
SJIS-2004 encoding conversion: handle invalid (or truncated) 2nd byte for Kanji correctly

If the 2nd byte of a 2-byte character is invalid, then mb_substitute_character()
should be respected. Instead, what mbstring was doing was 'swallowing' the
first byte, then emitting the 2nd byte as if it was an ASCII character.

Likewise, if the 2nd byte is missing, instead of just keeping quiet, report an
illegal character as specified by mb_substitute_character().

4 years agoFix broken binary search function in mbstring
Alex Dowad [Mon, 9 Nov 2020 19:37:04 +0000 (21:37 +0200)]
Fix broken binary search function in mbstring

This faulty binary search would never reject values at the very high
end of the range being searched, even if they were not actually in
the table.

Among other things, this meant that some Unicode codepoints which do
not correspond to any character in JIS X 0213 would be converted to
bogus Shift-JIS-2004 values rather than being rejected.

4 years agoDon't redundantly flush mbstring filters multiple times
Alex Dowad [Mon, 9 Nov 2020 19:33:32 +0000 (21:33 +0200)]
Don't redundantly flush mbstring filters multiple times

Each flush function in a chain of mbstring conversion filters always
calls the next flush function in the chain. So it is not necessary to
explicitly flush the second filter in a chain. (Due to this bug, in many
cases, flush functions were actually being called three times.)

4 years agoTest EUC-JP and Shift-JIS more thoroughly
Alex Dowad [Mon, 9 Nov 2020 20:59:07 +0000 (22:59 +0200)]
Test EUC-JP and Shift-JIS more thoroughly

Previously, the unit tests for these text encodings covered all mappings
from legacy -> Unicode, and all _reversible_ mappings from Unicode -> legacy.
However, we should also test the few Unicode -> legacy mappings which
are not reversible.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 11 Nov 2020 08:28:44 +0000 (09:28 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix community job

4 years agoFix community job
Nikita Popov [Wed, 11 Nov 2020 08:28:20 +0000 (09:28 +0100)]
Fix community job

Made a mistake while merging...

4 years agoMerge branch 'PHP-8.0'
Derick Rethans [Tue, 10 Nov 2020 17:58:50 +0000 (17:58 +0000)]
Merge branch 'PHP-8.0'

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 10 Nov 2020 17:58:38 +0000 (17:58 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

4 years agoPHP-7.4 is now for 7.4.14
Derick Rethans [Tue, 10 Nov 2020 17:58:21 +0000 (17:58 +0000)]
PHP-7.4 is now for 7.4.14

4 years agoUpdate NEWS for 8.0.0
Gabriel Caruso [Tue, 10 Nov 2020 11:02:35 +0000 (11:02 +0000)]
Update NEWS for 8.0.0

4 years agoUpdate NEWS for PHP 8.0.0RC4
Gabriel Caruso [Tue, 10 Nov 2020 10:52:13 +0000 (10:52 +0000)]
Update NEWS for PHP 8.0.0RC4

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 10 Nov 2020 10:46:07 +0000 (11:46 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add integration test for symfony preloading

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 10 Nov 2020 10:45:59 +0000 (11:45 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Add integration test for symfony preloading

4 years agoAdd integration test for symfony preloading
Nikita Popov [Mon, 9 Nov 2020 14:13:33 +0000 (15:13 +0100)]
Add integration test for symfony preloading

To help catch regressions like the one that occurred in PHP 7.4.12.

Closes GH-6414.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 10 Nov 2020 10:11:34 +0000 (11:11 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  7.3.26 is next

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 10 Nov 2020 10:11:06 +0000 (11:11 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  7.3.26 is next

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 10 Nov 2020 10:09:40 +0000 (11:09 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.26 is next

4 years ago7.3.26 is next
Christoph M. Becker [Tue, 10 Nov 2020 10:08:16 +0000 (11:08 +0100)]
7.3.26 is next

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 9 Nov 2020 16:08:46 +0000 (17:08 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix phi use chain management when renaming variable

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 9 Nov 2020 16:08:38 +0000 (17:08 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix phi use chain management when renaming variable