| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Port the main php_cli_server.inc to use ephemeral ports, thus
allowing CLI server tests to be parallelized.
A complication here is that we also need to give each test a
separate doc root, to avoid index.php files writing over each
other.
Closes GH-6375.
|
|
|
|
|
|
| |
Remove the transfer_encoding stream filter immediately when we
destroy the old stream, to make sure it doesn't get attached to
the new stream.
|
|
|
|
|
|
|
|
|
| |
As noted on https://bugs.php.net/bug.php?id=80073, I don't think
having this limitation makes sense. The similar_text() function
has much worse asymptotic complexity than levenshtein() and does
not enforce such a limitation. levenshtein() does have fairly high
memory requirements, but they are a fixed factor of the string
length (and subject to memory limit).
|
|
|
|
|
|
|
| |
Also change $max_length to $length in a number of filesystem APIs,
where our usage was inconsistent.
Closes GH-6276.
|
|
|
|
| |
Closes GH-6275.
|
|
|
|
| |
Closes GH-6194.
|
|
|
|
| |
Closes GH-6259
|
|
|
|
| |
Closes GH-6214.
|
|
|
|
|
|
| |
This is an artifact of the shared implementation with readdir() etc.
The method versions should not accept an explicit dir handle, as
they work on the dir handle from the object.
|
|\
| |
| |
| |
| |
| | |
* PHP-7.4:
Fix bug #80137
Fix bug #80138
|
| |\
| | |
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix bug #80137
Fix bug #80138
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Skip getprotobyname() and getprotobynumber() tests on *nix if there
is no /etc/protocols file.
Closes GH-6193.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Skip getservbyname() and getservbyport() tests on *nix if there is
no /etc/services file.
Closes GH-6191.
|
| | |
| | |
| | |
| | | |
Closes GH-6207.
|
| | |
| | |
| | |
| | |
| | |
| | | |
To make things a bit less weird, split off the function name into
a zval stored separately from the arguments. This allows us to
use normal zpp and get standard behavior.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The 32-bit tests work on both 32-bit and 64-bit. I dropped the
64-bit variants as they only test one additional case that I don't
think adds particular value.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make the behavior of substr(), mb_substr(), iconv_substr() and
grapheme_substr() consistent when it comes to the handling of
out of bounds offsets. substr() will now always clamp out of
bounds offsets to the string boundary. Cases that previously
returned false will now return an empty string. This means that
substr() itself *always* returns a string now (like mb_substr()
already did before.)
Closes GH-6182.
|
| | |
| | |
| | |
| | |
| | | |
This test case is not supposed to run on case-insensitive file system;
just checking for macOS/Windows doesn't cut it.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #76735: Incorrect message in fopen on invalid mode
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #76735: Incorrect message in fopen on invalid mode
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have to log errors in `stream_opener` callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated `errno` or a
most generic message.
Closes GH-6187.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Normalize the behavior between the file functions and those on
SplFileObject.
Be consistent about throwing regardless of whether the delimiter etc
is empty or has too many characters. I don't think it's worthwhile
to distinguish these cases.
Back when we looked into this originally, there was some hope that
we might want to add support for multiple-character delimiter etc,
but after a cursory look, I really don't think this is going to
happen (for fputcsv maybe, but for fgetcsv this just makes an already
broken function much more complicated.)
Closes GH-6188.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #76943: Inconsistent stream_wrapper_restore() errors
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #76943: Inconsistent stream_wrapper_restore() errors
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If restoring of any not registered built-in wrapper is requested, the
function is supposed to fail with a warning, so we have to check this
condition first.
Furthermore, to be able to detect whether a built-in wrapper has been
changed, it is not sufficient to check whether *any* userland wrapper
has been registered, but rather whether the specific wrapper has been
modified.
Closes GH-6183.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Errors related to invalid format strings (unlike data mismatch
errors) should throw ValueError.
Closes GH-6185.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Cross checking implementations from other languages, empty strings
are always allowed. PHP's output is peculiar due to it's insistence
to encode a trailing \0, but otherwise sensible and does round-trip
as expected.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Return "0000" instead of false to have a consistent return type.
"0000" is already a possible return value if the string doesn't
contain any letters, such as with soundex(" "). We can treat the
case of soundex("") exactly the same.
|
| | | |
|
| | |
| | |
| | |
| | | |
And thus avoid the false return value.
|
| | |
| | |
| | |
| | |
| | | |
strspn/strcspn are string search functions, and as such should throw
ValueError on out-of-bounds offsets, just like strpos etc do.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The implementation here was pretty confused. In reality the only
error condition it has right now is that for a string input,
from & length cannot be arrays.
The fact that the array lengths are the same was probably supposed
to be checked for the case of array input, as it wouldn't matter
otherwise.
|
| | |
| | |
| | |
| | | |
Closes GH-6180
|
| | |
| | |
| | |
| | |
| | |
| | | |
We previously couldn't increase the error level here because it
was coupled to comparison handling. This is no longer the case
in PHP 8.
|
| | |
| | |
| | |
| | | |
Closes GH-6173
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #80114: parse_url does not accept URLs with port 0
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #80114: parse_url does not accept URLs with port 0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
URIs with a 0 port are generally valid, so `parse_url()` should
recognize such URIs, but still report the port as missing.
Co-authored-by: twosee <twose@qq.com>
Closes GH-6152.
|
| | |
| | |
| | |
| | |
| | | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-6110
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* The array "subject" of a function gets called $array.
* Further parameters should be self-descriptive if used
as a named parameter, and a full word, not an abbreviation.
* If there is a "bunch more arrays" variadic, it gets
called $arrays (because that's what was already there).
* A few functions have a variadic "a bunch more arrays,
and then a callable", and were already called $rest.
I left those as is and died a little inside.
* Any callable provided to an array function that acts
on the array is called $callback. (Nearly all were already,
I just fixed the one or two outliers.)
* array_multisort() is beyond help so I ran screaming.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is a follow-up on commit 4a438b44694d4caf86d8e57266ed2fc2f4ae6213
Add some tests to hopefully not forget it next time
|
| | |
| | |
| | |
| | |
| | | |
I've adjusted mb_send_mail() already, but of course the handling
in mail() should be the same.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #80067: Omitting the port in bindto setting errors
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #80067: Omitting the port in bindto setting errors
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A recent commit[1] which fixed a memory leak introduced a regression
regarding the formerly liberal handling of IP addresses to bind to. We
fix this by reverting that commit, and fix the memory leak where it
actually occurs. In other words, this fix is less intrusive than the
former fix.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=0b8c83f5936581942715d14883cdebddc18bad30>
Closes GH-6104.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
|