]> granicus.if.org Git - php/log
php
3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Felipe Pena [Thu, 25 Feb 2021 20:54:24 +0000 (20:54 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFix memleak on ReflectionFunction and ReflectionGenerator classes when calling __cons...
Felipe Pena [Thu, 25 Feb 2021 20:53:14 +0000 (20:53 +0000)]
Fix memleak on ReflectionFunction and ReflectionGenerator classes when calling __construct after instantiation

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Remi Collet [Thu, 25 Feb 2021 12:54:19 +0000 (13:54 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  skip test with openssl < 1.1.0

3 years agoskip test with openssl < 1.1.0
Remi Collet [Thu, 25 Feb 2021 12:52:35 +0000 (13:52 +0100)]
skip test with openssl < 1.1.0

The test fails, but without any crash
(this test is designed to catch a crash)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 25 Feb 2021 11:03:43 +0000 (12:03 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Capture Microsoft-defined HRESULT exit codes exit codes

3 years agoCapture Microsoft-defined HRESULT exit codes exit codes
Dylan K. Taylor [Tue, 23 Feb 2021 21:34:51 +0000 (22:34 +0100)]
Capture Microsoft-defined HRESULT exit codes exit codes

The lack of such a check leads to false-passes of tests on Windows
which expect no output, but produce a segfault or similar issue. I
discovered this a while ago due to bad tests in an extension I maintain.

Closes GH-6722.

3 years agocrc32 module, clang spurious warning removal.
David CARLIER [Wed, 24 Feb 2021 20:34:33 +0000 (20:34 +0000)]
crc32 module, clang spurious warning removal.

Closes GH-6725.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 25 Feb 2021 08:52:07 +0000 (09:52 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  mysqlnd pam fix test error message

3 years agomysqlnd pam fix test error message
Daniel Black [Thu, 25 Feb 2021 02:09:08 +0000 (13:09 +1100)]
mysqlnd pam fix test error message

Closes GH-6727.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 24 Feb 2021 20:30:44 +0000 (21:30 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix potential file collision in dom tests

3 years agoFix potential file collision in dom tests
Nikita Popov [Wed, 24 Feb 2021 20:30:20 +0000 (21:30 +0100)]
Fix potential file collision in dom tests

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Felipe Pena [Wed, 24 Feb 2021 19:07:22 +0000 (19:07 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFix bug #80757 (Exit code is 0 when could not open file)
Felipe Pena [Wed, 24 Feb 2021 18:17:27 +0000 (18:17 +0000)]
Fix bug #80757 (Exit code is 0 when could not open file)

3 years agoUpdate NEWS
Felipe Pena [Wed, 24 Feb 2021 18:40:32 +0000 (18:40 +0000)]
Update NEWS

3 years agoFixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)
Dmitry Stogov [Wed, 24 Feb 2021 09:20:20 +0000 (12:20 +0300)]
Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 23 Feb 2021 12:22:25 +0000 (13:22 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  run-tests: fixed exit code not being set on BORKED tests

3 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 23 Feb 2021 12:14:42 +0000 (13:14 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  run-tests: fixed exit code not being set on BORKED tests

3 years agorun-tests: fixed exit code not being set on BORKED tests PHP-7.3
Dylan K. Taylor [Mon, 22 Feb 2021 23:56:11 +0000 (23:56 +0000)]
run-tests: fixed exit code not being set on BORKED tests

When no test paths are specified this shows up when 'make test' is used on a PECL extension without specifying tests to run (or in php-src too, I guess...)

Closes GH-6717.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 23 Feb 2021 11:16:15 +0000 (12:16 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Update php_version.h to proper version number

3 years agoUpdate php_version.h to proper version number
Christoph M. Becker [Tue, 23 Feb 2021 11:09:06 +0000 (12:09 +0100)]
Update php_version.h to proper version number

3 years agoFixed bug #80786
Nikita Popov [Tue, 23 Feb 2021 09:17:30 +0000 (10:17 +0100)]
Fixed bug #80786

Don't use r0 as temporary register in math_double_long if it is
already used for a memory result.

This was already done in one branch, but not the other.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 22 Feb 2021 14:31:49 +0000 (15:31 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #75776: Flushing streams with compression filter is broken

3 years agoFix #75776: Flushing streams with compression filter is broken
Christoph M. Becker [Tue, 16 Feb 2021 18:36:37 +0000 (19:36 +0100)]
Fix #75776: Flushing streams with compression filter is broken

First, the `bzip2.compress` filter has the same issue as `zlib.deflate`
so we port the respective fix[1] to ext/bz2.

Second, there is still an issue, if a stream with an attached
compression filter is flushed before it is closed, without any writes
in between.  In that case, the compression is never finalized.  We fix
this by enforcing a `_php_stream_flush()` with the `closing` flag set
in `_php_stream_free()`, whenever a write filter is attached.  This
call is superfluous for most write filters, but does not hurt, even
when it is unnecessary.

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

Closes GH-6703.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 22 Feb 2021 13:33:49 +0000 (14:33 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI

3 years agoFix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
Christoph M. Becker [Mon, 22 Feb 2021 11:24:15 +0000 (12:24 +0100)]
Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI

There is no good reason not to show the credits in text based SAPIs,
except for brevity.  Thus, we suppress the credits from `php -i`.

Closes GH-6710.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 22 Feb 2021 11:34:54 +0000 (12:34 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80774: session_name() problem with backslash

3 years agoFix #80774: session_name() problem with backslash
Christoph M. Becker [Fri, 19 Feb 2021 12:14:26 +0000 (13:14 +0100)]
Fix #80774: session_name() problem with backslash

Since we do no longer URL decode cookie names[1], we must not URL
encode the session name.  We need to prevent broken Set-Cookie headers,
by rejecting names which contain invalid characters.

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

Closes GH-6711.

3 years agoFix trampoline leak on dynamic static call of non-static method
Nikita Popov [Mon, 22 Feb 2021 09:32:28 +0000 (10:32 +0100)]
Fix trampoline leak on dynamic static call of non-static method

Fixes oss-fuzz #30317.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 22 Feb 2021 08:37:51 +0000 (09:37 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80781

3 years agoFixed bug #80781
Nikita Popov [Mon, 22 Feb 2021 08:33:23 +0000 (09:33 +0100)]
Fixed bug #80781

zend_find_array_dim_slow() may throw, make sure to handle this.
This backports the code we already use for this on PHP-8.0,
and also backports an exception check that makes this easier to
catch.

3 years agoAvoid signed integer overflow in substr()
Nikita Popov [Thu, 18 Feb 2021 09:29:19 +0000 (10:29 +0100)]
Avoid signed integer overflow in substr()

Perform negation after the (size_t) cast rather than before,
so as to avoid a signed integer overflow for PHP_INT_MIN.

Fixes oss-fuzz #31069.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 17 Feb 2021 16:28:22 +0000 (17:28 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80763: msgfmt_format() does not accept DateTime references

3 years agoFix #80763: msgfmt_format() does not accept DateTime references
Christoph M. Becker [Wed, 17 Feb 2021 13:05:28 +0000 (14:05 +0100)]
Fix #80763: msgfmt_format() does not accept DateTime references

`intl_zval_to_millis()` needs to cater to references.

Closes GH-6707.

3 years agoColor LEAK&FAIL like a failure
Nikita Popov [Wed, 17 Feb 2021 11:39:27 +0000 (12:39 +0100)]
Color LEAK&FAIL like a failure

3 years agoPrep for 8.0.4
Sara Golemon [Wed, 17 Feb 2021 15:24:36 +0000 (15:24 +0000)]
Prep for 8.0.4

3 years agoFixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involvi...
Dmitry Stogov [Wed, 17 Feb 2021 08:51:13 +0000 (11:51 +0300)]
Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts)

3 years agoRemove generated zend_jit_x86.c on `make clean`
Dylan T [Tue, 16 Feb 2021 18:40:26 +0000 (18:40 +0000)]
Remove generated zend_jit_x86.c on `make clean`

Not removing this causes build failure when reconfiguring and rebuilding after a `make clean`, e.g. enabling/disabling ZTS.

This makes https://bugs.php.net/bug.php?id=80561 more bearable. Ideally it would be rebuilt automatically on configuration change if necessary, but I have no idea how to implement this.

Closes GH-6702.

3 years agoFixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)
Dmitry Stogov [Tue, 16 Feb 2021 17:02:12 +0000 (20:02 +0300)]
Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 16 Feb 2021 14:34:29 +0000 (15:34 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Handle incomplete result set metadata more gracefully

3 years agoHandle incomplete result set metadata more gracefully
Nikita Popov [Tue, 16 Feb 2021 14:26:31 +0000 (15:26 +0100)]
Handle incomplete result set metadata more gracefully

Rather than segfaulting because sname is missing lateron, report
a FAIL here. As this indicates a server bug, the errors is reported
as an out of band warning, rather than a client error.

This fixes the PHP side of bug #80713.

3 years agoMark resource-like objects as non-comparable
Nikita Popov [Tue, 16 Feb 2021 13:20:45 +0000 (14:20 +0100)]
Mark resource-like objects as non-comparable

As these hold on to some internal resource, there can't be two
"equal" objects with different identity. Make sure the lack of
public properties doesn't result in these being treated as always
equal.

3 years agoFixed bug #80723
Nikita Popov [Tue, 16 Feb 2021 11:32:43 +0000 (12:32 +0100)]
Fixed bug #80723

This fixes the issue just for the Socket class. Presumably we'll
want to do the same for other "resource" objects.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Feb 2021 11:31:43 +0000 (11:31 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFixed dates
Derick Rethans [Tue, 16 Feb 2021 11:31:34 +0000 (11:31 +0000)]
Fixed dates

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Feb 2021 11:27:17 +0000 (11:27 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoPHP-7.4 is now 7.4.17-dev
Derick Rethans [Tue, 16 Feb 2021 11:26:47 +0000 (11:26 +0000)]
PHP-7.4 is now 7.4.17-dev

3 years agoIncrease timeout on asan job
Nikita Popov [Tue, 16 Feb 2021 09:15:08 +0000 (10:15 +0100)]
Increase timeout on asan job

Regularly runs against the 5:10 hour limit on master. Increase it
to 6:00 hours.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 16 Feb 2021 09:12:42 +0000 (10:12 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Suppress OpenSSL error on missing optional config

3 years agoSuppress OpenSSL error on missing optional config
Nikita Popov [Mon, 15 Feb 2021 14:54:49 +0000 (15:54 +0100)]
Suppress OpenSSL error on missing optional config

openssl_pkey_new() fetches various options from the config file --
most of these are optional, and not specifying them is not an error
condition from the perspective of the user. Unfortunately, the
CONF_get_string() API pushes an error when accessing a key that
doesn't exist (_CONF_get_string does not, but that is presumably a
private API). This commit adds a helper php_openssl_conf_get_string()
that automatically clears the error in this case. I've found that
OpenSSL occasionally does the same thing internally:
https://github.com/openssl/openssl/blob/22040fb790c854cefb04bed98ed38ea6357daf83/apps/req.c#L515-L517

Closes GH-6699.

3 years agoAdapt test case for libcurl 7.75.0+
Christoph M. Becker [Mon, 15 Feb 2021 23:17:13 +0000 (00:17 +0100)]
Adapt test case for libcurl 7.75.0+

libcurl 7.75.0 finally adds support for `gophers://`, i.e. gopher over
TLS.  The protocol is neither standardized, nor is the protocol
registered with IANA, but well, it is there and the test case should
cater to that.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Feb 2021 14:34:11 +0000 (15:34 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80747

3 years agoFixed bug #80747
Nikita Popov [Mon, 15 Feb 2021 14:33:42 +0000 (15:33 +0100)]
Fixed bug #80747

If RSA key generation fails, actually report that failure.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Feb 2021 13:58:59 +0000 (14:58 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix symtable cache being used while cleaning symtable

3 years agoFix symtable cache being used while cleaning symtable
Nikita Popov [Mon, 15 Feb 2021 13:52:38 +0000 (14:52 +0100)]
Fix symtable cache being used while cleaning symtable

We need to first clean the symtable and then check whether a cache
slot is available for it. Otherwise, it may happen that a destructor
runs while cleaning the table and uses up all the remaining slots
in the cache.

This is particularly insidious because once we overflow the cache,
the first pointer we modify is symtable_cache_ptr, making it hard
to understand what happened after the fact.

Fixes oss-fuzz #30815.

3 years agoFix assertion failure in cufa optimization with named args
Nikita Popov [Mon, 15 Feb 2021 11:42:48 +0000 (12:42 +0100)]
Fix assertion failure in cufa optimization with named args

Fixes oss-fuzz#30764.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Feb 2021 10:32:41 +0000 (11:32 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #78680: mysqlnd pam plugin missing terminating null

3 years agoFix #78680: mysqlnd pam plugin missing terminating null
Daniel Black [Fri, 5 Feb 2021 05:54:08 +0000 (16:54 +1100)]
Fix #78680: mysqlnd pam plugin missing terminating null

The PAM service requires the terminating null to be part
of the communication.

Tested with MariaDB-10.4(pam) and Percona Server 5.7.32(auth_pam_compat).

Also changed MySQL Enterprise test to the server side plugin, authentication_pam
as opposed to the client plugin mysql_clear_password.

Add additional check for pamtest user and pam service file as
all are required for the test.

More importantly, test result should actually succeed.

Thanks Geoff Montee for bug report.

Closes GH-78680.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Feb 2021 09:38:21 +0000 (10:38 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix leak when breaking out of FilesystemIterator

3 years agoFix leak when breaking out of FilesystemIterator
Nikita Popov [Mon, 15 Feb 2021 09:36:48 +0000 (10:36 +0100)]
Fix leak when breaking out of FilesystemIterator

We need to always destroy current, not just when iter.data is not
set.

Take this opportunity to clean up the iterator destructor code a
bit, to remove redundant checks and incorrect comments.

3 years agoFixed bug #80600
Benjamin Eberlei [Fri, 12 Feb 2021 16:16:48 +0000 (17:16 +0100)]
Fixed bug #80600

3 years agoFixed bug #80718
Nikita Popov [Thu, 11 Feb 2021 15:49:39 +0000 (16:49 +0100)]
Fixed bug #80718

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 11 Feb 2021 15:13:56 +0000 (16:13 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80719

3 years agoFixed bug #80719
Nikita Popov [Thu, 11 Feb 2021 15:12:06 +0000 (16:12 +0100)]
Fixed bug #80719

3 years agoUpdate func info after password_get_info() change
Nikita Popov [Thu, 11 Feb 2021 10:44:14 +0000 (11:44 +0100)]
Update func info after password_get_info() change

3 years agoDon't return null from password_get_info()
Nikita Popov [Thu, 11 Feb 2021 09:21:31 +0000 (10:21 +0100)]
Don't return null from password_get_info()

The get_info() handler should never fail, but even if it does,
we should still return a proper info array -- it doesn't make
sense that a completely incorrect hash returns an info array,
but a hash that is recognized but for which the options can't
be extracted would return null.

3 years agoDon't throw additional Error in require_once if exception already thrown
Nikita Popov [Thu, 11 Feb 2021 08:40:19 +0000 (09:40 +0100)]
Don't throw additional Error in require_once if exception already thrown

As pointed out in comments on bug #66216.

3 years agoMake mysqli_ssl_set() arguments nullable
Nikita Popov [Wed, 10 Feb 2021 14:31:27 +0000 (15:31 +0100)]
Make mysqli_ssl_set() arguments nullable

This function internally converts zero length arguments to NULL
argument -- but we should also accept them in the first place.

Null arguments being accepted was actually documented, before
bug #78399 adjusted the docs to match current behavior.

3 years agoMake finfo_open() $magic_database nullable
Nikita Popov [Wed, 10 Feb 2021 11:18:42 +0000 (12:18 +0100)]
Make finfo_open() $magic_database nullable

Empty string was interpreted as a special value here, which indicates
that the default magic database should be used. It makes more sense
to use null for this purpose.

The documentation also explicitly mentions that null can be used.

3 years agoDon't pass null action to __doRequest
Nikita Popov [Wed, 10 Feb 2021 11:00:20 +0000 (12:00 +0100)]
Don't pass null action to __doRequest

The parameter is not nullable, so it will be interpreted as
an empty string anyway.

The entire code here is pretty confusing though, and probably
deserves a second loop. The HTTP code only send SOAPAction/action
if soapaction is non-NULL -- but it always is, because it is
accepted through a non-nullable string parameter.

Regarding the SOAPAction header, it appears that always sending
it is actually a requirement of the standard:
> An HTTP client MUST use this header field when issuing a SOAP
> HTTP Request.
Although it does make a distinction between absence of value and
an empty string:
> The header field value of empty string ("") means that the intent
> of the SOAP message is provided by the HTTP Request-URI. No value
> means that there is no indication of the intent of the message.
The empty string interpretation appears to be the desired one.

However, for the action MIME tag the SOAP 1.2 Part 2 specification
says that
> The media type specifies an optional action parameter, which can
> be used to optimize dispatch or routing, among other things.
but also
> The SOAP Action feature defines a single property, which is
> described in Table 14. The value of this property MUST be an
> absolute URI[RFC 3986] and MUST NOT be empty.
which would indicate that we should not be sending an empty
action here.

As I'm not familiar with SOAP and this is long-standing behavior,
I'm just leaving this alone for now...

3 years agoClarify that location is required in do_request
Nikita Popov [Wed, 10 Feb 2021 10:18:20 +0000 (11:18 +0100)]
Clarify that location is required in do_request

As far as I can tell, the location is always non-null here,
and the code wouldn't be able to meaningfully work without a
location.

3 years agoRegenerate arginfo file
Nikita Popov [Wed, 10 Feb 2021 10:18:06 +0000 (11:18 +0100)]
Regenerate arginfo file

Somehow missed this in the previous commit.

3 years agoAccept null $location in SoapClient::__setLocation()
Nikita Popov [Wed, 10 Feb 2021 09:50:42 +0000 (10:50 +0100)]
Accept null $location in SoapClient::__setLocation()

Currently an empty string is used to unset the location. Once
again, it makes more sense to use a null value for this purpose
(though the special behavior of empty strings is retained).

The code comment above the function also explicitly indicates
that null should be accepted, and the function does return null
rather than an empty string for the old location value (if it
is missing).

3 years agoMake SoapVar arguments nullable
Nikita Popov [Wed, 10 Feb 2021 09:36:32 +0000 (10:36 +0100)]
Make SoapVar arguments nullable

$typeName, $typeNamespace, $nodeName and $nodeNamespace all
special-case the empty string and don't set the property entirely
in that case. It makes more sense to use null to indicate absence
here (though of course the empty string behavior is retained).

3 years agoAdd missing classes to stubs
Máté Kocsis [Tue, 9 Feb 2021 21:38:06 +0000 (22:38 +0100)]
Add missing classes to stubs

3 years agoProperly check imagegd() signature
Nikita Popov [Tue, 9 Feb 2021 14:18:59 +0000 (15:18 +0100)]
Properly check imagegd() signature

Unlike imagegd2(), this function only accepts two parameters,
so we should be checking for that.

3 years agoMake imagegd $file parameter nullable
Nikita Popov [Tue, 9 Feb 2021 14:15:20 +0000 (15:15 +0100)]
Make imagegd $file parameter nullable

It is explicitly documented to be nullable, and this matches other
functions like imagepng. It is also documented to accept a stream,
which it currently does not...

3 years agoUse E_ERROR to report arginfo/zpp mismatch
Nikita Popov [Tue, 9 Feb 2021 13:32:17 +0000 (14:32 +0100)]
Use E_ERROR to report arginfo/zpp mismatch

When E_CORE_ERROR is used, we don't get correct file/line information.

3 years agoMake NumberFormatter ctor $pattern nullable
Nikita Popov [Tue, 9 Feb 2021 13:18:18 +0000 (14:18 +0100)]
Make NumberFormatter ctor $pattern nullable

Whether the pattern is needed depends on the used style. If no
pattern is needed, null is a more sensible value than an empty
string.

fixup

3 years agoMake IntlDateFormatter ctor $pattern nullable
Nikita Popov [Tue, 9 Feb 2021 13:23:42 +0000 (14:23 +0100)]
Make IntlDateFormatter ctor $pattern nullable

The implementation already made this argument nullable, but it
was not reflected in the stub.

3 years agoMake Phar $fileNotFoundScript nullable
Nikita Popov [Tue, 9 Feb 2021 11:55:33 +0000 (12:55 +0100)]
Make Phar $fileNotFoundScript nullable

While "" is already treated the same way as absence, null is the
logically correct default here. Making this one argument non-nullable
is particularly pecular when considering that the preceding $alias
and $index arguments are both nullable.

3 years agoMake createDocument() $namespace nullable
Nikita Popov [Tue, 9 Feb 2021 11:28:28 +0000 (12:28 +0100)]
Make createDocument() $namespace nullable

According to the DOM specification, this argument should be
nullable. It's also supposed to be a required argument, but
not changing that at this point.

3 years agoMake getElementsByTagNameNS $namespace nullable
Nikita Popov [Tue, 9 Feb 2021 11:19:44 +0000 (12:19 +0100)]
Make getElementsByTagNameNS $namespace nullable

According to the DOM specification, this argument is supposed to
be nullable.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 8 Feb 2021 22:12:49 +0000 (23:12 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Avoid C4090 level 1 warning

3 years agoAvoid C4090 level 1 warning
Christoph M. Becker [Mon, 8 Feb 2021 22:11:37 +0000 (23:11 +0100)]
Avoid C4090 level 1 warning

This breaks the build for PHP 8 by default.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 8 Feb 2021 18:00:37 +0000 (19:00 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix locale dependent parsing of PostgreSQL version number

3 years agoFix locale dependent parsing of PostgreSQL version number
Christoph M. Becker [Fri, 5 Feb 2021 11:53:25 +0000 (12:53 +0100)]
Fix locale dependent parsing of PostgreSQL version number

Version numbers are not supposed to be localized, so we must not apply
locale dependent parsing with `atof()`.

Using `php_version_compare()` might even be better.

Closes GH-6668.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 8 Feb 2021 17:43:36 +0000 (18:43 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80706: mail(): Headers after Bcc headers may be ignored

3 years agoFix #80706: mail(): Headers after Bcc headers may be ignored
Christoph M. Becker [Thu, 4 Feb 2021 16:43:53 +0000 (17:43 +0100)]
Fix #80706: mail(): Headers after Bcc headers may be ignored

We need to handle the case where a CRLF after a Bcc header is not the
beginning of a folding marker, because in that case the Bcc header was
not the last "thing".

Closes GH-6666.

3 years agoRestore Laravel test workaround
Nikita Popov [Sun, 7 Feb 2021 16:34:01 +0000 (17:34 +0100)]
Restore Laravel test workaround

I accidentally dropped this during a merge, making the Laravel
job fail.

3 years agoProperly render 2+ namespaces functions in build/gen_stub.php
Tyson Andre [Sat, 6 Feb 2021 19:13:22 +0000 (14:13 -0500)]
Properly render 2+ namespaces functions in build/gen_stub.php

Affects ZEND_NS_FE

Add test cases of the global function

Backported to php 8.0 from GH-6664

3 years agoFix test expectation for PHP 8.0
Christoph M. Becker [Fri, 5 Feb 2021 13:55:26 +0000 (14:55 +0100)]
Fix test expectation for PHP 8.0

Since float to string conversion is no longer locale dependent, we have
to expect a dot as decimal separator.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Fri, 5 Feb 2021 13:54:25 +0000 (14:54 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Use ST_Y() instead of the deprecated/removed Y() in test

3 years agoUse ST_Y() instead of the deprecated/removed Y() in test
Christoph M. Becker [Fri, 5 Feb 2021 13:53:19 +0000 (14:53 +0100)]
Use ST_Y() instead of the deprecated/removed Y() in test

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Fri, 5 Feb 2021 12:11:22 +0000 (13:11 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #74779: x() and y() truncating floats to integers

3 years agoFix #74779: x() and y() truncating floats to integers
Christoph M. Becker [Thu, 4 Feb 2021 13:43:17 +0000 (14:43 +0100)]
Fix #74779: x() and y() truncating floats to integers

We must not use the locale dependent `atof()`, but instead use the
(hopefully) locale independent `zend_strtod()`, when converting string
representations of floating point numbers which are sent by the server.

Closes GH-6665.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 4 Feb 2021 16:07:30 +0000 (17:07 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Try SIGTERM before SIGKILL in opcache restart

3 years agoTry SIGTERM before SIGKILL in opcache restart
Nikita Popov [Mon, 7 Dec 2020 11:57:30 +0000 (12:57 +0100)]
Try SIGTERM before SIGKILL in opcache restart

SIGTERM is subject to HANDLE_BLOCK_INTERRUPTIONS(), which will
allow code to exit critical sections before it gets terminated.

Closes GH-6493.

3 years agoFix CLI server worker support
Nikita Popov [Thu, 4 Feb 2021 14:18:45 +0000 (15:18 +0100)]
Fix CLI server worker support

If we create separate listening sockets in each worker using
SO_REUSEADDR, then an incoming connection may be load-balanced
to a process that is already busy, either due to a long-running
request, or because it is a recursive request (in which case we
would deadlock).

Instead, only create one listening socket, and only create worker
forks afterwards. This way the incoming request will be served
by one of the workers that is currently listening for an incoming
connection.

3 years ago[ci skip] Merge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 3 Feb 2021 11:44:52 +0000 (12:44 +0100)]
[ci skip] Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix newly introduced compiler warning

3 years ago[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 3 Feb 2021 11:43:15 +0000 (12:43 +0100)]
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix newly introduced compiler warning