]> granicus.if.org Git - php/log
php
4 years agoMake cast_object handler required
Nikita Popov [Tue, 31 Mar 2020 10:17:32 +0000 (12:17 +0200)]
Make cast_object handler required

Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.

If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.

4 years agoImprove undefined variable error messages
Máté Kocsis [Mon, 30 Mar 2020 15:23:03 +0000 (17:23 +0200)]
Improve undefined variable error messages

Closes GH-5312

4 years agoClarify SimpleXML comparison logic
Nikita Popov [Tue, 31 Mar 2020 10:48:57 +0000 (12:48 +0200)]
Clarify SimpleXML comparison logic

4 years agoAdd a ZEND_UNCOMPARABLE value
Nikita Popov [Tue, 31 Mar 2020 10:36:48 +0000 (12:36 +0200)]
Add a ZEND_UNCOMPARABLE value

To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.

4 years agoReport object cast failures internally
Nikita Popov [Tue, 31 Mar 2020 10:04:59 +0000 (12:04 +0200)]
Report object cast failures internally

Make cast_object return FAILURE for casts to int/float, rather than
throwing a notice and returning SUCCESS. Instead move the emission
of the notice to the code invoking cast_object. This will allow us
to customize the behavior per call-site.

This change is written to be NFC, and the code in
zend_std_compare_objects() should illustrate the current behavior
doesn't make a lot of sense.

4 years agoMake sure php_get_internal_encoding() returns non-empty
Nikita Popov [Tue, 31 Mar 2020 09:06:15 +0000 (11:06 +0200)]
Make sure php_get_internal_encoding() returns non-empty

Even if default_charset is set to "", we should still return
"UTF-8" as the default value here. Setting default_charset to ""
suppresses the header emission, but shouldn't change anything
about our encoding defaults.

4 years agoMake sure mbstring.internal_encoding deprecation is always thrown
Nikita Popov [Tue, 31 Mar 2020 08:46:44 +0000 (10:46 +0200)]
Make sure mbstring.internal_encoding deprecation is always thrown

It was not thrown if the setting was specified via -d at least.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Mar 2020 08:26:01 +0000 (10:26 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Next is 7.3.18

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 31 Mar 2020 08:24:15 +0000 (10:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Next is 7.3.18

4 years agoNext is 7.3.18
Christoph M. Becker [Tue, 31 Mar 2020 08:22:55 +0000 (10:22 +0200)]
Next is 7.3.18

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Mar 2020 06:41:08 +0000 (08:41 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79413: session_create_id() fails for active sessions

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 31 Mar 2020 06:39:34 +0000 (08:39 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79413: session_create_id() fails for active sessions

4 years agoFix #79413: session_create_id() fails for active sessions
Christoph M. Becker [Thu, 26 Mar 2020 18:01:33 +0000 (19:01 +0100)]
Fix #79413: session_create_id() fails for active sessions

The comment on `PS_VALIDATE_SID_FUNC(files)` is very clear that the
function is supposed to return `SUCCESS` if the session already exists.
So to detect a collision, we have to check for `SUCCESS`, not
`FAILURE`.

We also fix the wrong condition in session_regenerate_id() as well.

4 years agoDrop wchar header check as always defined since C95
George Peter Banyard [Sun, 29 Mar 2020 00:10:15 +0000 (01:10 +0100)]
Drop wchar header check as always defined since C95

4 years agoFix format for tm member objects as they are stored as integers
George Peter Banyard [Mon, 30 Mar 2020 02:11:12 +0000 (04:11 +0200)]
Fix format for tm member objects as they are stored as integers

Closes GH-5326

4 years agoClarify that return throws
Nikita Popov [Mon, 30 Mar 2020 14:27:38 +0000 (16:27 +0200)]
Clarify that return throws

4 years agomb_detect_order(): Use proper array|string argument
Nikita Popov [Mon, 30 Mar 2020 14:26:28 +0000 (16:26 +0200)]
mb_detect_order(): Use proper array|string argument

4 years agoRemove persistent arg from parse_encoding_array()
Nikita Popov [Mon, 30 Mar 2020 14:17:35 +0000 (16:17 +0200)]
Remove persistent arg from parse_encoding_array()

It is always zero.

4 years agomb_check_encoding(): Make var a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 14:13:36 +0000 (16:13 +0200)]
mb_check_encoding(): Make var a proper array|string arg

4 years agomb_detect_encoding(): Use proper array|string parameter
Nikita Popov [Mon, 30 Mar 2020 14:06:41 +0000 (16:06 +0200)]
mb_detect_encoding(): Use proper array|string parameter

Needed to add support for nullabiltiy in some places.

4 years agoDo constant evaluation for str_contains in opcache
Tyson Andre [Sun, 29 Mar 2020 21:42:11 +0000 (17:42 -0400)]
Do constant evaluation for str_contains in opcache

Both arguments must be strings.
str_contains deliberately does not emit a warning for an empty needle.

Closes GH-5324

4 years agomb_convert_variables(): Make $from an array|string argument
Nikita Popov [Mon, 30 Mar 2020 13:51:04 +0000 (15:51 +0200)]
mb_convert_variables(): Make $from an array|string argument

4 years agomb_convert_encoding(): Make $input a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 13:41:55 +0000 (15:41 +0200)]
mb_convert_encoding(): Make $input a proper array|string arg

4 years agomb_convert_encoding(): Make $from_encodings a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 13:39:13 +0000 (15:39 +0200)]
mb_convert_encoding(): Make $from_encodings a proper array|string arg

Switching to FastZPP, as we don't support this in normal zpp.

4 years agoAdd test to make sure that (self::class)::method() is not forwarding LSB
Michael Voříšek [Fri, 27 Mar 2020 10:53:37 +0000 (11:53 +0100)]
Add test to make sure that (self::class)::method() is not forwarding LSB

Related with Bug #79419.

Closes GH-5310.

4 years agoParse mb_convert_encoding() encodings only once
Nikita Popov [Mon, 30 Mar 2020 12:15:16 +0000 (14:15 +0200)]
Parse mb_convert_encoding() encodings only once

Instead of re-parsing them for every converted value. Also reuse
the generic parse_array() helper.

4 years agoProperly report unknown encoding in encoding lists
Nikita Popov [Mon, 30 Mar 2020 12:46:10 +0000 (14:46 +0200)]
Properly report unknown encoding in encoding lists

And clean up the related array and list parsing code.

4 years agocleanup
Dmitry Stogov [Mon, 30 Mar 2020 11:27:01 +0000 (14:27 +0300)]
cleanup

4 years agoMove encoding fetching outside php_mb_stripos()
Nikita Popov [Mon, 30 Mar 2020 10:29:11 +0000 (12:29 +0200)]
Move encoding fetching outside php_mb_stripos()

4 years agoRemove unnecessary NULL check
Nikita Popov [Mon, 30 Mar 2020 10:10:52 +0000 (12:10 +0200)]
Remove unnecessary NULL check

This is a required zpp parameter, it cannot be null.

4 years agoInitialize variable numbers
Dmitry Stogov [Mon, 30 Mar 2020 09:50:19 +0000 (12:50 +0300)]
Initialize variable numbers

4 years agoDisable Symfony test on PHP 8
Nikita Popov [Mon, 30 Mar 2020 08:58:33 +0000 (10:58 +0200)]
Disable Symfony test on PHP 8

Symfony is currently has an expected incompatibility with PHP 8:

Fatal error: Declaration of Symfony\Component\HttpClient\Response\MockResponse::schedule(Symfony\Component\HttpClient\Response\MockResponse $response, array &$runningResponses): void must be compatible with Symfony\Component\HttpClient\Response\ResponseTrait::schedule(Symfony\Component\HttpClient\Response\ResponseTrait $response, array &$runningResponses): void in /home/vsts/work/1/s/symfony/src/Symfony/Component/HttpClient/Response/MockResponse.php on line 135

Disable the job until this is fixed.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 30 Mar 2020 08:54:34 +0000 (10:54 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Don't check directory nlink in stat tests

4 years agoDon't check directory nlink in stat tests
Nikita Popov [Mon, 30 Mar 2020 08:52:25 +0000 (10:52 +0200)]
Don't check directory nlink in stat tests

It seems like on many filesystems nlink for directories is the
number of subdirectories (plus two, due to . and ..). However,
this is not a POSIX requirement, and some filesystems don't
implement it this way. This seems to be the case for whatever is
used on the Travis AArch64 builders now.

4 years agoSCCP: Optimize strpos with empty needle
Nikita Popov [Mon, 30 Mar 2020 08:37:12 +0000 (10:37 +0200)]
SCCP: Optimize strpos with empty needle

This is no longer special cases in PHP 8.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 30 Mar 2020 07:18:20 +0000 (09:18 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #74940: DateTimeZone loose comparison always true

4 years agoFix #74940: DateTimeZone loose comparison always true
Christoph M. Becker [Wed, 4 Mar 2020 18:20:10 +0000 (19:20 +0100)]
Fix #74940: DateTimeZone loose comparison always true

Since `DateTimeZone` does not implement a `compare_objects` handler,
nor has any properties, two `DateTimeZone` instances always compare as
being equal, even if they designate totally different timezones.  Even
worse, after calling `var_dump()` on these objects, the actual
comparison may yield a correct result.

We therefore introduce a `compare_objects` handlers, which prevents
different behavior before/after `var_dump()`, and which allows us to
clearly define the intended semantics.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 30 Mar 2020 06:58:45 +0000 (08:58 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79427: Integer Overflow in shmop_open()

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 30 Mar 2020 06:57:29 +0000 (08:57 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79427: Integer Overflow in shmop_open()

4 years agoFix #79427: Integer Overflow in shmop_open()
Christoph M. Becker [Sun, 29 Mar 2020 14:56:57 +0000 (16:56 +0200)]
Fix #79427: Integer Overflow in shmop_open()

If `shm.shm_segsz > ZEND_LONG_MAX` the assignment to `shmop->size` a
few lines below would overflow, so we catch that early and bail out if
necessary.

4 years agoMerge branch 'PHP-7.4'
Jakub Zelenka [Sun, 29 Mar 2020 19:21:24 +0000 (20:21 +0100)]
Merge branch 'PHP-7.4'

4 years agoAllow numeric [UG]ID in FPM listen.{owner,group}
Andre Nathan [Tue, 4 Feb 2020 12:53:16 +0000 (09:53 -0300)]
Allow numeric [UG]ID in FPM listen.{owner,group}

4 years agoMerge branch 'PHP-7.4'
Remi Collet [Sun, 29 Mar 2020 12:24:12 +0000 (14:24 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  NEWS
  Fix #79424 ext/zip: don't use gl_pathc after call to globfree

4 years agoNEWS
Remi Collet [Sun, 29 Mar 2020 12:23:28 +0000 (14:23 +0200)]
NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Sun, 29 Mar 2020 12:23:03 +0000 (14:23 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79424 ext/zip: don't use gl_pathc after call to globfree

4 years agoFix #79424 ext/zip: don't use gl_pathc after call to globfree
Max Rees [Fri, 27 Mar 2020 17:57:24 +0000 (12:57 -0500)]
Fix #79424 ext/zip: don't use gl_pathc after call to globfree

This breaks on Linux with the musl libc, since it zeroes out gl_pathc during
globfree.

4 years agoBIND_GLOBAL and BIND_STATIC don't use value of the first operand
Dmitry Stogov [Fri, 27 Mar 2020 12:20:21 +0000 (15:20 +0300)]
BIND_GLOBAL and BIND_STATIC don't use value of the first operand

4 years agoFix #76999: mb_regex_set_options() return current options
Christoph M. Becker [Fri, 13 Mar 2020 14:48:53 +0000 (15:48 +0100)]
Fix #76999: mb_regex_set_options() return current options

When setting new options, `mb_regex_set_options()` is supposed to
return the *previous* options.

4 years agoRemoved useless variable
Dmitry Stogov [Fri, 27 Mar 2020 09:24:15 +0000 (12:24 +0300)]
Removed useless variable

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 26 Mar 2020 22:17:37 +0000 (23:17 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add missing 'skip' to bug79332.phpt skip message

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 26 Mar 2020 22:15:55 +0000 (23:15 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add missing 'skip' to bug79332.phpt skip message

4 years agoAdd missing 'skip' to bug79332.phpt skip message
Lukas Berger [Thu, 26 Mar 2020 17:39:39 +0000 (10:39 -0700)]
Add missing 'skip' to bug79332.phpt skip message

The skip message must start with the word 'skip', otherwise the test will not be skipped.

*Before:*
Running selected tests.
TEST 1/1 [ext/com_dotnet/tests/bug79332.phpt]
========DIFF========
001+ Fatal error: Uncaught Error: Class 'COMPersistHelper' not found in /srv/php/ext/com_dotnet/tests/bug79332.php:2
001- A com_exception has been thrown
002+ Stack trace:
003+ #0 {main}
004+   thrown in /srv/php/ext/com_dotnet/tests/bug79332.php on line 2
========DONE========
FAIL Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt]

*After:*
Running selected tests.
SKIP Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt] reason: com_dotnet extension not available

4 years agoRemove rand_r implementation
Nikita Popov [Thu, 26 Mar 2020 10:49:27 +0000 (11:49 +0100)]
Remove rand_r implementation

We already use our own mt13397 implementation nowadays, so we no
longer need this shim.

4 years agoRemove HAVE_REALPATH checks
Nikita Popov [Mon, 23 Mar 2020 09:18:00 +0000 (10:18 +0100)]
Remove HAVE_REALPATH checks

We do not actually use realpath(), but a custom implementation.
Make sure the realpath() function is always available.

Closes GH-5290.

4 years agoAdd PhpToken class
Nikita Popov [Thu, 23 Mar 2017 15:14:39 +0000 (16:14 +0100)]
Add PhpToken class

RFC: https://wiki.php.net/rfc/token_as_object

Relative to the RFC, this also adds a __toString() method,
as discussed on list.

Closes GH-5176.

4 years agoCheck abstract method signatures coming from traits
Nikita Popov [Thu, 9 Jan 2020 14:04:33 +0000 (15:04 +0100)]
Check abstract method signatures coming from traits

RFC: https://wiki.php.net/rfc/abstract_trait_method_validation

Closes GH-5068.

4 years agoMerge branch 'PHP-7.4'
Dmitry Stogov [Thu, 26 Mar 2020 07:29:34 +0000 (10:29 +0300)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Explicitly declare the char as signed in zend_ffi_val.

4 years agoExplicitly declare the char as signed in zend_ffi_val.
George Peter Banyard [Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)]
Explicitly declare the char as signed in zend_ffi_val.

This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.

4 years agoExplicitly declare the char as signed in zend_ffi_val.
George Peter Banyard [Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)]
Explicitly declare the char as signed in zend_ffi_val.

This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.

4 years agoFix php_exec() output length
Christoph M. Becker [Wed, 25 Mar 2020 21:49:57 +0000 (22:49 +0100)]
Fix php_exec() output length

If trailing whitespace is stripped, we have to propagate the change of
`bufl` back to php_exec().

4 years agoFix -Wtype-limits warning by using correct type declaration in JIT trace
George Peter Banyard [Wed, 25 Mar 2020 20:44:03 +0000 (21:44 +0100)]
Fix -Wtype-limits warning by using correct type declaration in JIT trace

Namely int as that is the type of 'definition'

Closes GH-5299

4 years agoSeparate zend_jit_var_supports_reg() and cleanup
Dmitry Stogov [Wed, 25 Mar 2020 20:09:32 +0000 (23:09 +0300)]
Separate zend_jit_var_supports_reg() and cleanup

4 years agoFixed incorrect "TSSA start" headers
Dmitry Stogov [Wed, 25 Mar 2020 20:07:21 +0000 (23:07 +0300)]
Fixed incorrect "TSSA start" headers

4 years agoMerge branch 'PHP-7.4'
Dmitry Stogov [Wed, 25 Mar 2020 14:38:08 +0000 (17:38 +0300)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Wed, 25 Mar 2020 14:31:33 +0000 (17:31 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).

4 years agoFixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Dmitry Stogov [Wed, 25 Mar 2020 14:31:06 +0000 (17:31 +0300)]
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).

4 years agoFix #75958 Return void instead of true
Máté Kocsis [Wed, 25 Mar 2020 11:33:38 +0000 (12:33 +0100)]
Fix #75958 Return void instead of true

4 years agoAdd stubs for SplDoublyLinkedList
Máté Kocsis [Wed, 25 Mar 2020 08:24:52 +0000 (09:24 +0100)]
Add stubs for SplDoublyLinkedList

Closes GH-5293

4 years agoAdd new line before basic-block labels (except for the first BB0)
Dmitry Stogov [Wed, 25 Mar 2020 10:22:01 +0000 (13:22 +0300)]
Add new line before basic-block labels (except for the first BB0)

4 years agoAlways print numeric opline numbers
Dmitry Stogov [Wed, 25 Mar 2020 09:42:04 +0000 (12:42 +0300)]
Always print numeric opline numbers

4 years agoClean up php_exec() implementation a bit
Nikita Popov [Wed, 25 Mar 2020 10:11:30 +0000 (11:11 +0100)]
Clean up php_exec() implementation a bit

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 25 Mar 2020 09:51:32 +0000 (10:51 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 25 Mar 2020 09:50:57 +0000 (10:50 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)

4 years agoFix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without...
Christian Schneider [Tue, 24 Mar 2020 15:43:17 +0000 (16:43 +0100)]
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)

Closes GH-5292.

4 years agoRename "var" to "stack". This is an abstract stack that holds TSSA variable numbers.
Dmitry Stogov [Wed, 25 Mar 2020 07:49:01 +0000 (10:49 +0300)]
Rename "var" to "stack". This is an abstract stack that holds TSSA variable numbers.

4 years agoMake SSA dump format controlled by opcache.jit_debug more readable (always print...
Dmitry Stogov [Tue, 24 Mar 2020 19:44:11 +0000 (22:44 +0300)]
Make SSA dump format controlled by opcache.jit_debug more readable (always print opcode number).
This doesn't affect dumps controlled by opcache.opt_debug_level.

4 years agoImprove error messages of ext/hash
Máté Kocsis [Wed, 18 Mar 2020 19:58:45 +0000 (20:58 +0100)]
Improve error messages of ext/hash

Closes GH-5275

4 years agoPromote warnings to exceptions in ext/hash
Máté Kocsis [Wed, 18 Mar 2020 19:58:37 +0000 (20:58 +0100)]
Promote warnings to exceptions in ext/hash

4 years agoAdd stubs for SPL iterators
Máté Kocsis [Sun, 22 Mar 2020 18:27:00 +0000 (19:27 +0100)]
Add stubs for SPL iterators

Closes GH-5286

4 years agoImprove error messages of various extensions
Máté Kocsis [Wed, 18 Mar 2020 21:44:02 +0000 (22:44 +0100)]
Improve error messages of various extensions

Closes GH-5278

4 years agoImprove error messages of ext/reflection
Máté Kocsis [Wed, 18 Mar 2020 20:39:56 +0000 (21:39 +0100)]
Improve error messages of ext/reflection

Closes GH-5277

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 23 Mar 2020 16:14:42 +0000 (17:14 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add test file

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 23 Mar 2020 16:14:16 +0000 (17:14 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add test file

4 years agoAdd test file
Nikita Popov [Mon, 23 Mar 2020 16:13:57 +0000 (17:13 +0100)]
Add test file

Forgot the git add again...

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 23 Mar 2020 16:12:55 +0000 (17:12 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Handle NULL caller_call_opline

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 23 Mar 2020 16:12:12 +0000 (17:12 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Handle NULL caller_call_opline

4 years agoHandle NULL caller_call_opline
Nikita Popov [Mon, 23 Mar 2020 16:10:54 +0000 (17:10 +0100)]
Handle NULL caller_call_opline

This can happen if there is an EXIT in the call arguments, in which
case the DO_CALL opcode may be eliminated as unreachable.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 23 Mar 2020 15:33:26 +0000 (16:33 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix leak on Windows as well

4 years agoFix leak on Windows as well
Christoph M. Becker [Mon, 23 Mar 2020 15:31:45 +0000 (16:31 +0100)]
Fix leak on Windows as well

Cf. <http://git.php.net/?p=php-src.git;a=commit;h=db08ef0d3274b239a6b9e68d71d02bb6acb71d82>

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 23 Mar 2020 15:26:19 +0000 (16:26 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix test for Windows

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 23 Mar 2020 15:23:33 +0000 (16:23 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix test for Windows

4 years agoFix test for Windows
Christoph M. Becker [Mon, 23 Mar 2020 15:19:25 +0000 (16:19 +0100)]
Fix test for Windows

Windows filenames may very well contain a colon, so we adjust the test
accordingly.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 23 Mar 2020 13:31:16 +0000 (14:31 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79200: Some iconv functions cut Windows-1258

4 years agoDon't use quiet zpp in RecursiveIteratorIterator ctor
Nikita Popov [Mon, 23 Mar 2020 13:22:51 +0000 (14:22 +0100)]
Don't use quiet zpp in RecursiveIteratorIterator ctor

Don't be a special snowflake, generate a standard TypeError here.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 23 Mar 2020 13:13:24 +0000 (14:13 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79200: Some iconv functions cut Windows-1258

4 years agoFix #79200: Some iconv functions cut Windows-1258
Christoph M. Becker [Mon, 16 Mar 2020 12:09:16 +0000 (13:09 +0100)]
Fix #79200: Some iconv functions cut Windows-1258

To cater to potentially state-dependent encodings, we have to reset the
conversion descriptor into its initial shift state to properly finish
the conversion.  Furthermore, state-dependent encodings may not show
progress when comparing `in_left` before and after the conversion; we
rather have to see whether `out_left` has decreased.  Also we have to
cater to the fact that the final potentially state resetting call does
not signal failure, but we still have to break respective loops
afterwards.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 23 Mar 2020 12:59:22 +0000 (13:59 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79393: Null coalescing operator failing with SplFixedArray

4 years agoFix ZPP of SplFileInfo::openFile()
Máté Kocsis [Mon, 23 Mar 2020 11:26:47 +0000 (12:26 +0100)]
Fix ZPP of SplFileInfo::openFile()

4 years agoAdd stubs for SplFileInfo et al.
Máté Kocsis [Sat, 21 Mar 2020 22:34:29 +0000 (23:34 +0100)]
Add stubs for SplFileInfo et al.

Closes GH-5287

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 23 Mar 2020 12:31:08 +0000 (13:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79393: Null coalescing operator failing with SplFixedArray