summaryrefslogtreecommitdiff
path: root/main
Commit message (Collapse)AuthorAgeFilesLines
* Make sure php_get_internal_encoding() returns non-emptyNikita Popov2020-03-311-6/+6
| | | | | | | 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.
* Remove rand_r implementationNikita Popov2020-03-262-63/+0
| | | | | We already use our own mt13397 implementation nowadays, so we no longer need this shim.
* Merge branch 'PHP-7.4'Christoph M. Becker2020-03-112-2/+10
|\ | | | | | | | | * PHP-7.4: Fix #78210: Invalid pointer address
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-112-2/+10
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #78210: Invalid pointer address
| | * Fix #78210: Invalid pointer addressChristoph M. Becker2020-03-112-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is actually about three distinct issues: * If an empty string is passed as $address to `stream_socket_sendto()`, the `sa` is not initialized, so we must not pass it as `addr` to `php_stream_xport_sendto()`. * On POSIX, `recvfrom()` truncates messages which are too long to fit into the specified buffer (unless `MSG_PEEK` is given), discards the excessive bytes, and returns the buffer length. On Windows, the same happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code `WSAEMSGSIZE`. We have to catch this for best POSIX compatibility. * In `php_network_parse_network_address_with_port()`, we have to zero `in6` (not only its alias `sa`) to properly support IPv6. Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
| | * Next is 7.3.17Christoph M. Becker2020-03-031-3/+3
| | |
| * | PHP-7.4 is now 7.4.5-devChristoph M. Becker2020-03-061-3/+3
| | |
* | | Remove unnecessary uses of CHECK_SILENTNikita Popov2020-03-061-1/+1
| | | | | | | | | | | | If no error is passed, it is always silent.
* | | Remove mergesort implementationNikita Popov2020-02-272-348/+0
| | | | | | | | | | | | | | | | | | php_mergesort() isn't being used for anything, and hasn't been for a long time. Even if we wanted to use a stable sort, this isn't the implementation we'd use...
* | | Improve comment on RFC 1867 filename handlingBishop Bettini2020-02-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was pointed out on the internals ML[1] that the basename comment around RFC 1867 file handling was confusing. The comment seemed to say that the basename handling was only necessary because of some esoteric bug in Windows IE. In fact that comment applied to earlier versions of the code and was, therefore, misleading. The comment needs to clear that basename is required per RFC 7578[2]. [1]:https://externals.io/message/108624 [2]:https://tools.ietf.org/html/rfc7578
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-111-25/+38
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79254: getenv() w/o arguments not showing changes
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-111-24/+43
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79254: getenv() w/o arguments not showing changes
| | * Fix #79254: getenv() w/o arguments not showing changesChristoph M. Becker2020-02-111-24/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be able to see changes done only with `SetEnvironmentVariable()`, we have to use `GetEnvironmentStrings()` instead of `environ`, because the latter sees only changes done with `putenv()`. For best backward compatibility we're using `GetEnvironmentStringsA()`; switching to the wide string version likely makes sense for master, though.
| | * Next is 7.3.16Christoph M. Becker2020-02-041-3/+3
| | |
* | | Promote invalid mode/unknow option from Warning to ValueError for plain streams.George Peter Banyard2020-02-041-2/+2
| | | | | | | | | | | | Closes GH-5076
* | | Merge branch 'PHP-7.4'Nikita Popov2020-02-031-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Apply tidy formatting
| * | Apply tidy formattingNikita Popov2020-02-031-1/+1
| | | | | | | | | | | | Mostly reindent PHP scripts to spaces.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-272-1/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #78323: Code 0 is returned on invalid options
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-272-1/+5
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix bug #78323: Code 0 is returned on invalid options
| | * Fix bug #78323: Code 0 is returned on invalid optionsIvan Mikheykin2020-01-272-1/+5
| | | | | | | | | | | | | | | Set CLI exit code to 1 when invalid parameters are passed, and print error to stderr.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-231-2/+9
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Fixed bug #78902 Add unit test for bug #78902
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-231-2/+9
| |\ \ | | |/ | | | | | | | | | | | | * PHP-7.3: Fixed bug #78902 Add unit test for bug #78902
| | * Fixed bug #78902liudaixiao2020-01-231-2/+9
| | |
| | * Fixed bug #71876Nikita Popov2020-01-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of fcdc0a6db0ae63fbed9e3828137b899b844623ce to the PHP-7.3 branch. We need to make sure that OnUpdateString is also called for a NULL value, otherwise the reset of the encoding at the end of the request will not work. I believe I already tried to land this before once, but it didn't actually end up on the PHP-7.3 branch due to a push conflict that I only noticed just now.
| | * Bump versionChristoph M. Becker2020-01-071-3/+3
| | |
| | * Next is 7.3.14Christoph M. Becker2019-12-031-3/+3
| | |
| | * 7.3.13 is nextChristoph M. Becker2019-11-051-3/+3
| | |
| * | Bump versionChristoph M. Becker2020-01-081-3/+3
| | |
* | | Apply custom format/length modifier removal to spprintfGeorge Peter Banyard2020-01-231-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | This mimicks the changes made to the custom snprintf implementation by removing the custom 'v' format and custom 'I' length modifier from the spprintf implementation. Closes GH-5108
* | | Drop the custom 'v' format from snprintf custom implementation.George Peter Banyard2020-01-211-1/+0
| | | | | | | | | | | | | | | | | | Extensions should instead use the standard 's' format. Closes GH-5100
* | | Drop the custom I length modifier from snprintf custom implementation.George Peter Banyard2020-01-201-19/+0
| | | | | | | | | | | | | | | | | | | | | Extensions should rather use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in php-src/Zend/zend_long.h Closes GH-5089
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-179-34/+34
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-163-3/+3
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-301-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Also propagate include exceptions in opcache Make url_stats in resolve_path quiet
| * | Make url_stats in resolve_path quietNikita Popov2019-12-301-2/+2
| | | | | | | | | | | | | | | | | | These stats are used to check whether the file exists -- they should not generate errors. Having the flag set is particularly important for custom stream wrappers.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-302-0/+9
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Properly propagate url_stat exceptions during include
| * | Properly propagate url_stat exceptions during includeNikita Popov2019-12-302-0/+9
| | | | | | | | | | | | | | | Make sure we abort operations early, and that we don't emit additional warnings or errors if an exception has been thrown.
* | | Use RETURN_THROWS() during ZPP in main, sapi, win32, and ZendMáté Kocsis2019-12-304-20/+20
| | |
* | | Clarify usage of max_fd in php_poll2() on WindowsChristoph M. Becker2019-12-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually, `max_fd` is not used on Windows, since `PHP_SAFE_MAX_FD` and `select` ignore it; so it makes no sense to calculate it in the loop. Even worse, since `php_socket_t` is unsigned on Windows, it will never be modified during the loop, because `SOCK_ERR` is already the largest representable value of that type. Therefore we skip the loop on Windows, and add a clarifying comment.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-201-17/+23
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fixed bug #79000
| * | Fixed bug #79000Nikita Popov2019-12-201-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | Don't report EAGAIN/EWOULDBLOCK as errors for fwrite on non-blocking socket streams. This matches behavior for fread, as well as behavior for plain file streams. Closes GH-5026.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-171-3/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Free buffer in php_verror even if it is empty
| * | Free buffer in php_verror even if it is emptyNikita Popov2019-12-171-3/+1
| | | | | | | | | | | | vspprintf allocates a buffer even if the resulting string is empty.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-171-16/+16
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix resetting of internal_encoding and friends
| * | Fix resetting of internal_encoding and friendsNikita Popov2019-12-171-16/+16
| | | | | | | | | | | | | | | | | | We need to update the value even if new_value is NULL. In particular, it should be reset back to NULL after each request if the setting was not specified on startup. Otherwise we leave dangling pointers.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-121-18/+17
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #78929: plus signs in cookie values are converted to spaces
| * | Fix #78929: plus signs in cookie values are converted to spacesKachalin Alexey2019-12-121-18/+17
| | | | | | | | | | | | | | | | | | | | | We switch the cookie value parsing function from `php_url_decode()` to `php_raw_url_decode()`, so that cookie values are now parsed according to RFC 6265, section 4.1.1. We also refactor to remove duplicate code without changing the execution flow.
| * | PHP-7.4 is now 7.4.2-devDerick Rethans2019-12-101-3/+3
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-021-14/+20
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #78883: fgets(STDIN) fails on Windows
| * | Fix #78883: fgets(STDIN) fails on WindowsChristoph M. Becker2019-12-021-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | We add the `is_seekable` member to `php_stdio_stream_data`, and prefer that over `is_pipe`, since the latter is simply a misnomer. We keep `is_pipe` for now for Windows only, though, because we need special support for pipes there. We also fix the misaligned bitfield which formerly took 33 bit.