summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update versions for PHP 8.0.0RC2php-8.0.0RC2Sara Golemon2020-10-132-3/+3
|
* Update NEWS for PHP 8.0.0RC2Sara Golemon2020-10-131-1/+1
|
* Normalize mb_ereg() return valueNikita Popov2020-10-1316-77/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-133-0/+27
|\ | | | | | | | | * PHP-7.4: Fix #64076: imap_sort() does not return FALSE on failure
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-133-0/+28
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #64076: imap_sort() does not return FALSE on failure
| | * Fix #64076: imap_sort() does not return FALSE on failureChristoph M. Becker2020-10-133-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If unsupported `$search_criteria` are passed to `imap_sort()`, the function returns an empty array, but there is also an error on the libc-client error stack ("Unknown search criterion: UNSUPPORTED (errflg=2)"). If, on the other hand, unsupported `$criteria` or unsupported `$flags` are passed, the function returns `false`. We solve this inconsistency by returning `false` for unsupported `$search_criteria` as well. Closes GH-6332.
* | | Fix incorrect zpp parameter count in mb_substr() / mb_strcut()Nikita Popov2020-10-131-2/+2
| | | | | | | | | | | | These functions only accept 4 params.
* | | Fix default value for some pgsql functionsNikita Popov2020-10-132-9/+9
| | | | | | | | | | | | These set the PGSQL_DML_EXEC flag by default.
* | | Fix null handling in mysqli_begin_transaction()Nikita Popov2020-10-131-2/+2
| | | | | | | | | | | | We don't want an explicit null name hit the !name_len check.
* | | Fix argument nullability in mbstringNikita Popov2020-10-131-20/+20
| | | | | | | | | | | | | | | These arguments were declared nullable in stubs (and should be nullable), but didn't accept null in zpp.
* | | Don't accept null in pg_unescape_bytea()Nikita Popov2020-10-133-6/+5
| | | | | | | | | | | | | | | | | | | | | This is an error that slipped in via 8d37c37bcdbf6fa99cd275413342457eeb2c664e. pg_unescape_bytea() did not accept null in PHP 7.4, and it is not meaningful for it to accept null now -- it will always fail, and now with a misleading OOM message.
* | | Update ext/odbc parameter namesChristoph M. Becker2020-10-132-138/+138
| | | | | | | | | | | | Closes GH-6303.
* | | Use $statement in mysqliNikita Popov2020-10-132-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | As we went with $statement rather than $stmts in other places, let's also use it in mysqli. The discrepancy with mysqli_stmt is a bit unfortunate, but we can't be consistent with *both*. Closes GH-6330.
* | | Merge branch 'PHP-7.4' into PHP-8.0Derick Rethans2020-10-130-0/+0
|\ \ \ | |/ /
| * | Prepare for 7.4.13Derick Rethans2020-10-131-1/+4
| | |
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-131-0/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Ignore memory leaks reported for some libc-client functions
| * | Ignore memory leaks reported for some libc-client functionsChristoph M. Becker2020-10-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | At least on Windows, some static variables are lazily initialized during `mail_open()` and `mail_lsub()`, which are reported as memory leaks. We suppress these false positives. Closes GH-6326.
* | | Give preference to live-ranges with register hints to improve register reuse.Dmitry Stogov2020-10-131-2/+4
| | |
* | | Update ext/pdo_pgsql parameter namesNikita Popov2020-10-132-17/+17
| | | | | | | | | | | | Closes GH-6329.
* | | Update ext/pgsql parameter namesNikita Popov2020-10-136-160/+162
| | | | | | | | | | | | Closes GH-6294.
* | | Fix handling of throwing undef var in verify returnNikita Popov2020-10-134-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have an undefined variable and null is not accepted by the return type, we want to throw just the undef var error. In this case this lead to an infinite loop, because we overwrite the exception opline in SAVE_OPLINE and it does not get reset when chaining into a previous exception. Add an assertiong to catch this case earlier.
* | | Update ext/sodium parameter namesNikita Popov2020-10-134-119/+138
| | | | | | | | | | | | Closes GH-6279.
* | | Avoid useless register allocationDmitry Stogov2020-10-131-0/+1
| | |
* | | Update ext/phar parameter namesNikita Popov2020-10-139-131/+134
| | | | | | | | | | | | Closes GH-6307.
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-130-0/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: 7.3.25 is next
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-130-0/+0
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: 7.3.25 is next
| | * 7.3.25 is nextChristoph M. Becker2020-10-134-6/+9
| | |
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-123-0/+15
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80226: imap_sort() leaks sortpgm memory
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-123-0/+15
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80226: imap_sort() leaks sortpgm memory
| | * Fix #80226: imap_sort() leaks sortpgm memoryChristoph M. Becker2020-10-123-0/+15
| | | | | | | | | | | | | | | | | | We need to free what we have allocated. Closes GH-6327.
* | | Perform trace range propagationDmitry Stogov2020-10-133-1/+43
| | |
* | | Change parameters types from int to boolChristoph M. Becker2020-10-126-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | These are typical boolean parameters, so we shouldn't advertize them as integers. For the `$reverse` parameter that even fixes expectations, because the `reverse` member is a bitfield of 1 bit, so assigning any even integer would not set it. Closes GH-6328.
* | | Eliminate dead storesDmitry Stogov2020-10-121-5/+10
| | |
* | | Improve parameter names in ext/intlMáté Kocsis2020-10-1254-512/+526
| | | | | | | | | | | | Closes GH-6309
* | | Improve parameter names in ext/pdo_sqliteMáté Kocsis2020-10-123-11/+11
| | | | | | | | | | | | Closes GH-6310
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-123-11/+44
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: intl: report more information about message pattern parse errors
| * | intl: report more information about message pattern parse errorsPhilip Hofstetter2020-10-123-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The message patterns can be pretty complex, so reporting a generic U_PARSE_ERROR without any additional information makes it needlessly hard to fix erroneous patterns. This commit makes use of the additional UParseError* parameter to umsg_open to retrieve more details about the parse error to report that to the user via intl_get_error_message() Additional improve error reporting from the IntlMessage constructor. Previously, all possible failures when calling IntlMessage::__construct() would be masked away with a generic "Constructor failed" message. This would include invalid patterns. This commit makes sure that the underlying error that caused the constructor failure is reported as part of the IntlException error message. Closes GH-6325.
* | | Fixed bug #80225Nikita Popov2020-10-123-6/+20
| | | | | | | | | | | | | | | Namespaced and declares have a different interpretation of what "first statement" means.
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-123-9/+37
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80216: imap_mail_compose() does not validate types/encodings
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-123-9/+37
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80216: imap_mail_compose() does not validate types/encodings
| | * Fix #80216: imap_mail_compose() does not validate types/encodingsChristoph M. Becker2020-10-123-9/+37
| | | | | | | | | | | | | | | | | | | | | We need to check whether the given `type`s and `encoding`s are within bounds to avoid segfaults and out-of-bound reads. Closes GH-6323.
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-123-2/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-123-2/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
| | * Fix #80223: imap_mail_compose() leaks envelope on malformed bodiesChristoph M. Becker2020-10-123-2/+21
| | | | | | | | | | | | | | | | | | We have to clean up even on failure. Closes GH-6322.
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-122-1/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80220: imap_mail_compose() may leak memory
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-122-1/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80220: imap_mail_compose() may leak memory
| | * Fix #80220: imap_mail_compose() may leak memoryChristoph M. Becker2020-10-122-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unless `topbod` is of `TYPEMULTIPART`, `mail_free_body()` does not free the `nested.part`; while we could do this ourselves, instead we just ignore additional bodies in this case, i.e. we don't attach them in the first place. Closes GH-6321.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-122-14/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Revert "Add missing X509 purpose constants"
| * | Revert "Add missing X509 purpose constants"Nikita Popov2020-10-122-14/+2
| | | | | | | | | | | | | | | | | | This reverts commit 1e53e14bc31aec98a408e517c7c8493ef4bf80cd. This fails on Travis.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-122-2/+14
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add missing X509 purpose constants