| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We already use our own mt13397 implementation nowadays, so we no
longer need this shim.
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix #78210: Invalid pointer address
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #78210: Invalid pointer address
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
If no error is passed, it is always silent.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79254: getenv() w/o arguments not showing changes
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79254: getenv() w/o arguments not showing changes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5076
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Apply tidy formatting
|
| | |
| | |
| | |
| | | |
Mostly reindent PHP scripts to spaces.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #78323: Code 0 is returned on invalid options
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix bug #78323: Code 0 is returned on invalid options
|
| | |
| | |
| | |
| | |
| | | |
Set CLI exit code to 1 when invalid parameters are passed,
and print error to stderr.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #78902
Add unit test for bug #78902
|
| |\ \
| | |/
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #78902
Add unit test for bug #78902
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | | |
Extensions should instead use the standard 's' format.
Closes GH-5100
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-7.4:
Also propagate include exceptions in opcache
Make url_stats in resolve_path quiet
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Properly propagate url_stat exceptions during include
|
| | |
| | |
| | |
| | |
| | | |
Make sure we abort operations early, and that we don't emit
additional warnings or errors if an exception has been thrown.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #79000
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Free buffer in php_verror even if it is empty
|
| | |
| | |
| | |
| | | |
vspprintf allocates a buffer even if the resulting string is empty.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix resetting of internal_encoding and friends
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78929: plus signs in cookie values are converted to spaces
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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:
Fix #78883: fgets(STDIN) fails on Windows
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|