summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Switch bound_param_map to zend_stringNikita Popov2021-01-073-14/+12
| | | |
* | | | Remove freeq memberNikita Popov2021-01-071-12/+2
| | | |
* | | | Refactor PDO placeholder's quoted string to zend_stringGeorge Peter Banyard2021-01-071-46/+23
| | | |
* | | | Refactor PDO's quoter handler to return a zend_stringGeorge Peter Banyard2021-01-079-108/+119
| | | | | | | | | | | | | | | | Closes GH-6547
* | | | Clean up remaining opcodes for foreach([] as $x)Tyson Andre2021-01-073-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, two useless FE_RESET_R and FE_FREE would be left over whether the empty array was from a literal, a variable, or a class constant. This doesn't pick up the RESET_RW case due to a weakness in our "may throw" modeling. (for foreach by reference). Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com> using https://gist.github.com/nikic/58d367ad605e10299f5433d2d83a0b5b Closes GH-4949
* | | | Fold dirname in sccp for non-windows platformsNikita Popov2021-01-071-0/+4
| | | |
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-071-0/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Avoid modifying the return value of readline_completion_function()
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-01-071-0/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Avoid modifying the return value of readline_completion_function()
| | * | Avoid modifying the return value of readline_completion_function()Christoph M. Becker2021-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal function `_readline_command_generator()` modifies the internal array pointer of `readline_completion_function()`'s return value. We therefore separate the array, what also avoids failing assertions regarding the array refcount. Closes GH-6582.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-01-062-4/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make fetch_* OO same as func
| * | | Make fetch_* OO same as funcDharman2021-01-062-4/+4
| | | | | | | | | | | | | | | | Clsoses GH-6580.
* | | | Remove unnecessary INDIRECT checks in JIT helpersNikita Popov2021-01-061-92/+13
| | | |
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-062-5/+37
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80592: all floats are the same in ODBC parameters
| * | | Fix #80592: all floats are the same in ODBC parametersChristoph M. Becker2021-01-062-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | We must not release the strings until we are done with them. Closes GH-6579.
* | | | Remove some INDIRECT handling in standard libraryNikita Popov2021-01-064-128/+63
| | | |
* | | | Restrict allowed usages of $GLOBALSNikita Popov2021-01-0611-32/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restricts allowed usage of $GLOBALS, with the effect that plain PHP arrays can no longer contain INDIRECT elements. RFC: https://wiki.php.net/rfc/restrict_globals_usage Closes GH-6487.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-01-064-91/+61
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix/improve mysqli stubs
| * | | Fix/improve mysqli stubsDharman2021-01-064-91/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mysqli_commit $flags default value is 0, not -1. * A number of functions cannot actually return null. * mysqli_poll parameter names were incorrect, as this function has a different signature from select. * fetch functions apart from fetch_all can return false on failure.
* | | | Voidify PDO's fetch_error handlerGeorge Peter Banyard2021-01-069-34/+26
| | | |
* | | | Boolify PDO's preparer handlerGeorge Peter Banyard2021-01-068-30/+31
| | | |
* | | | Voidify PDO's closer handlerGeorge Peter Banyard2021-01-068-18/+8
| | | |
* | | | Boolify PDO's quoter handlerGeorge Peter Banyard2021-01-067-15/+15
| | | |
* | | | Boolify PDO's set_attribute driver functionGeorge Peter Banyard2021-01-068-64/+65
| | | |
* | | | Boolify PDO's transaction handlersGeorge Peter Banyard2021-01-069-78/+80
| | | | | | | | | | | | | | | | This includes begin(), commit(), rollBack(), and inTransaction()
* | | | Formalize pdo_dbh_check_liveness_func() return type to zend_resultGeorge Peter Banyard2021-01-064-4/+4
| | | |
* | | | Add/expand comments for PDO handlersGeorge Peter Banyard2021-01-062-3/+8
| | | |
* | | | Convert strcmp() usage to zend_string_equals_literal()George Peter Banyard2021-01-061-6/+4
| | | |
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-061-1/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Add missing SKIPIF clause for require_hash.phpt
| * | | Add missing SKIPIF clause for require_hash.phptChristoph M. Becker2021-01-061-1/+4
| | | |
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-055-35/+69
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #77565: Incorrect locator detection in ZIP-based phars
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-01-055-35/+69
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #77565: Incorrect locator detection in ZIP-based phars
| | * | Fix #77565: Incorrect locator detection in ZIP-based pharsChristoph M. Becker2021-01-055-40/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must not assume that the first end of central dir signature in a ZIP archive actually designates the end of central directory record, since the data in the archive may contain arbitrary byte patterns. Thus, we better search from the end of the data, what is also slightly more efficient. There is, however, no way to detect the end of central directory signature by searching from the end of the ZIP archive with absolute certainty, since the signature could be part of the trailing comment. To mitigate, we check that the comment length fits to the found position, but that might still not be the correct position in rare cases. Closes GH-6507.
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-052-9/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Prevent double-free of Phar ZIP stream
| * | | Prevent double-free of Phar ZIP streamChristoph M. Becker2021-01-052-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We must not alias the closed stream to `phar_archive_data.fp`, and use PHAR_ZIP_FAIL() for consistency with the rest of this function. Closes GH-6578.
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-051-7/+11
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix memory leak in Phar::webPhar() on Windows
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-01-051-7/+11
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix memory leak in Phar::webPhar() on Windows
| | * | Fix memory leak in Phar::webPhar() on WindowsChristoph M. Becker2021-01-051-19/+17
| | | | | | | | | | | | | | | | Closes GH-6574.
* | | | Fix use-after-scope in SplObjectStorage::unserialize()Nikita Popov2021-01-052-18/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced by the recent switch to a zend_object. Unserialize the object into a tmp_var to avoid leaving behind a stack reference. Fixes oss-fuzz #29271.
* | | | Implement Explicit octal notation for integers RFCGeorge Peter Banyard2021-01-0411-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/explicit_octal_notation Add an extensive test suits for other variants of integer literals Closes GH-6360
* | | | Fix curl_getinfo() funcinfoNikita Popov2021-01-041-1/+0
| | | | | | | | | | | | | | | | This can now return any type with any refcount.
* | | | Merge branch 'PHP-8.0'George Peter Banyard2021-01-042-0/+21
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix bug #80584: 0x and 0X are considered valid hex numbers by filter_var()
| * | | Fix bug #80584: 0x and 0X are considered valid hex numbers by filter_var()George Peter Banyard2021-01-042-0/+21
| | | | | | | | | | | | | | | | Closes GH-6573
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-01-0423-0/+100
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #76929: zip-based phar does not respect phar.require_hash
| * | | Fix #76929: zip-based phar does not respect phar.require_hashChristoph M. Becker2021-01-0423-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | Based on the patch provided by david at bamsoftware. Closes GH-6517.
* | | | Manually store CURLOPT_PRIVATE dataNikita Popov2021-01-043-34/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is simpler than going through curl, because we can manage the memory more easily (in particular, this removes the need for to_free->str). Additionally this allows the CURLOPT_PRIVATE data to have any type, instead of being implicitly cast to string.
* | | | Remove method member from php_curl_callbackNikita Popov2021-01-043-78/+62
| | | | | | | | | | | | | | | | | | | | | | | | For these callbacks a non-null callback already indicates that a user callback should be used. We don't need an additional member to tell us the same thing.
* | | | Remove unused still_running memberNikita Popov2021-01-041-1/+0
| | | |
* | | | Reduce memory usage of SplObjectStorageTyson Andre2021-01-043-72/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Track an 8-byte pointer as the key instead of 16-byte zval. (4 byte on 32-bit builds) The memory used for a set of 1 million objects decreased from 114 MiB to 106 MiB. Use the new `Z_PARAM_*` APIs to parse the `zend_object*` pointer directly Closes GH-6566
* | | | Don't allocate php_curl_handlers separatelyNikita Popov2021-01-043-220/+216
| | | | | | | | | | | | | | | | Always allocated together with php_curl... no point in that.
* | | | Don't allocate php_curlm_handlers separatelyNikita Popov2021-01-042-20/+14
| | | | | | | | | | | | | | | | | | | | This is always allocated together with the php_curlm structure, there's no point in making it a separate allocation.