summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in ↵Dmitry Stogov2021-02-173-12/+100
| | | | code involving bitshifts)
* Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)Dmitry Stogov2021-02-162-3/+101
|
* Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-161-2/+3
|\ | | | | | | | | * PHP-7.4: Handle incomplete result set metadata more gracefully
| * Handle incomplete result set metadata more gracefullyNikita Popov2021-02-161-2/+3
| | | | | | | | | | | | | | | | 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.
* | Mark resource-like objects as non-comparableNikita Popov2021-02-1613-0/+17
| | | | | | | | | | | | | | 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.
* | Fixed bug #80723Nikita Popov2021-02-162-0/+22
| | | | | | | | | | This fixes the issue just for the Socket class. Presumably we'll want to do the same for other "resource" objects.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-162-27/+29
|\ \ | |/ | | | | | | * PHP-7.4: Suppress OpenSSL error on missing optional config
| * Suppress OpenSSL error on missing optional configNikita Popov2021-02-162-27/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Adapt test case for libcurl 7.75.0+Christoph M. Becker2021-02-161-1/+1
| | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-0/+21
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #80747
| * Fixed bug #80747Nikita Popov2021-02-152-0/+21
| | | | | | | | If RSA key generation fails, actually report that failure.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-7/+51
|\ \ | |/ | | | | | | * PHP-7.4: Fix #78680: mysqlnd pam plugin missing terminating null
| * Fix #78680: mysqlnd pam plugin missing terminating nullDaniel Black2021-02-152-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-19/+15
|\ \ | |/ | | | | | | * PHP-7.4: Fix leak when breaking out of FilesystemIterator
| * Fix leak when breaking out of FilesystemIteratorNikita Popov2021-02-152-19/+15
| | | | | | | | | | | | | | | | 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.
* | Fixed bug #80718Nikita Popov2021-02-111-2/+3
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-114-8/+27
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #80719
| * Fixed bug #80719Nikita Popov2021-02-114-8/+23
| |
* | Update func info after password_get_info() changeNikita Popov2021-02-111-1/+1
| |
* | Don't return null from password_get_info()Nikita Popov2021-02-113-8/+5
| | | | | | | | | | | | | | | | 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.
* | Make mysqli_ssl_set() arguments nullableNikita Popov2021-02-103-22/+22
| | | | | | | | | | | | | | | | 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.
* | Make finfo_open() $magic_database nullableNikita Popov2021-02-103-5/+5
| | | | | | | | | | | | | | | | 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.
* | Don't pass null action to __doRequestNikita Popov2021-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* | Clarify that location is required in do_requestNikita Popov2021-02-101-5/+2
| | | | | | | | | | | | 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.
* | Regenerate arginfo fileNikita Popov2021-02-101-2/+2
| | | | | | | | Somehow missed this in the previous commit.
* | Accept null $location in SoapClient::__setLocation()Nikita Popov2021-02-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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).
* | Make SoapVar arguments nullableNikita Popov2021-02-103-7/+7
| | | | | | | | | | | | | | $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).
* | Add missing classes to stubsMáté Kocsis2021-02-0914-18/+115
| |
* | Properly check imagegd() signatureNikita Popov2021-02-091-2/+12
| | | | | | | | | | Unlike imagegd2(), this function only accepts two parameters, so we should be checking for that.
* | Make imagegd $file parameter nullableNikita Popov2021-02-093-18/+14
| | | | | | | | | | | | 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...
* | Make NumberFormatter ctor $pattern nullableNikita Popov2021-02-095-8/+8
| | | | | | | | | | | | | | | | 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
* | Make IntlDateFormatter ctor $pattern nullableNikita Popov2021-02-094-8/+8
| | | | | | | | | | The implementation already made this argument nullable, but it was not reflected in the stub.
* | Make Phar $fileNotFoundScript nullableNikita Popov2021-02-0913-15/+15
| | | | | | | | | | | | | | 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.
* | Make createDocument() $namespace nullableNikita Popov2021-02-094-4/+5
| | | | | | | | | | | | 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.
* | Make getElementsByTagNameNS $namespace nullableNikita Popov2021-02-095-12/+20
| | | | | | | | | | According to the DOM specification, this argument is supposed to be nullable.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-081-3/+6
|\ \ | |/ | | | | | | * PHP-7.4: Fix locale dependent parsing of PostgreSQL version number
| * Fix locale dependent parsing of PostgreSQL version numberChristoph M. Becker2021-02-081-6/+9
| | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-081-0/+76
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80706: mail(): Headers after Bcc headers may be ignored
| * Fix #80706: mail(): Headers after Bcc headers may be ignoredChristoph M. Becker2021-02-081-0/+76
| | | | | | | | | | | | | | | | 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.
* | Properly render 2+ namespaces functions in build/gen_stub.phpTyson Andre2021-02-063-3/+19
| | | | | | | | | | | | | | | | Affects ZEND_NS_FE Add test cases of the global function Backported to php 8.0 from GH-6664
* | Fix test expectation for PHP 8.0Christoph M. Becker2021-02-051-1/+1
| | | | | | | | | | Since float to string conversion is no longer locale dependent, we have to expect a dot as decimal separator.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-051-2/+2
|\ \ | |/ | | | | | | * PHP-7.4: Use ST_Y() instead of the deprecated/removed Y() in test
| * Use ST_Y() instead of the deprecated/removed Y() in testChristoph M. Becker2021-02-051-2/+2
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-052-1/+43
|\ \ | |/ | | | | | | * PHP-7.4: Fix #74779: x() and y() truncating floats to integers
| * Fix #74779: x() and y() truncating floats to integersChristoph M. Becker2021-02-052-1/+43
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-041-2/+5
|\ \ | |/ | | | | | | * PHP-7.4: Try SIGTERM before SIGKILL in opcache restart
| * Try SIGTERM before SIGKILL in opcache restartNikita Popov2021-02-041-2/+5
| | | | | | | | | | | | | | SIGTERM is subject to HANDLE_BLOCK_INTERRUPTIONS(), which will allow code to exit critical sections before it gets terminated. Closes GH-6493.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-031-17/+41
|\ \ | |/ | | | | | | * PHP-7.4: Fix #53467: Phar cannot compress large archives
| * Fix #53467: Phar cannot compress large archivesChristoph M. Becker2021-02-031-17/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Phars are flushed, a new temporary file is created for each entry which should be compressed, and the `compressed_filesize` is retrieved. Afterwards, the Phar manifest is written, and only after that the files are copied to the actual Phar. So for each such entry there is an open temp file, what easily exceeds the limit. Therefore, we use a single temporary file for all entries, and store the start offset in the otherwise unused `header_offset` member. We ensure that the `cfp` members are properly set to NULL even if flushing fails, to avoid use after free scenarios. This solution is based on a suggestion by @lserni[1]. Closes GH-6643. [1] <https://github.com/box-project/box2/issues/80#issuecomment-77147371>
* | Fix bug #80600 DOMChildNode::remove does not work on DOMCharacterData.Benjamin Eberlei2021-02-023-38/+17
| | | | | | | | Closes GH-6660