| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
Closes GH-6170
|
| |
| |
| |
| |
| | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| | |
|
| |
| |
| |
| | |
Settling on using quoted string
|
| |
| |
| |
| |
| |
| | |
In preparation for generating method signatures for the manual.
This change gets rid of bogus false|null return types, a few unnecessary trailing backslashes, and settles on using ? when possible for nullable types.
|
| | |
|
| | |
|
| |
| |
| |
| | |
reference'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| | |
Closes GH-5999
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.
This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.
Closes GH-6094.
|
| |
| |
| |
| | |
Closes GH-6075
|
| |
| |
| |
| | |
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
|
| |
| |
| |
| |
| |
| | |
As SPL is currently a copie of the code in file.c
Closes GH-6069
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call
trampoline release it immediately and force zend_call_function
to refetch it. This may require additional callability checks
if __call is used, but avoids the need to carefully free fcc
values in all internal functions -- in some cases this is not
simple, as a type error might be triggered by a later argument
in the same zpp call.
This fixes oss-fuzz #25390.
Closes GH-6073.
|
| |
| |
| |
| |
| |
| |
| | |
Warning to Error promotion and a Notice to Warning promotion to align
with the behaviour specified in the Reclassify Engine Warnings RFC.
Closes GH-6072
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a way it was possible to trigger an Internel Error
by disabling function (via the INI setting) when SPL was acting
as a proxy to the function call.
Fix flock_compat layer as it needs to used in SPL now.
Use macro to check if object is initialized
Closes GH-6014
|
| |
| |
| |
| | |
Closes GH-6005
|
| | |
|
| |
| |
| |
| | |
Avoid fptoi UB and use the standard PHP conversion behavior.
|
| |
| |
| |
| | |
zend_restore_error_handling())
|
| |
| |
| |
| |
| |
| |
| | |
Instead of false. This is consistent with how other methods like
SplFileInfo::getPath() behave. It's also a requirement before
SplFileInfo::__toString() calls SplFileInfo::getPathname() and
needs to return a string.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Add missing initialization check to RegexIterator::getRegex()
|
| | |
|
| |
| |
| |
| |
| | |
This method has a different signature from
SplObjectStorage::count(), so don't share implementations.
|
| |
| |
| |
| |
| | |
Using RuntimeException here, because the same error condition
uses that in many other places in this file.
|
| |
| |
| |
| | |
Closes GH-5958
|
| |
| |
| |
| | |
Closes GH-5950
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.
Closes GH-5927.
|
| |
| |
| |
| |
| | |
Make this consistent with the corresponding engine behavior.
Also adjust the messages to match.
|
| |
| |
| |
| | |
Use the same names which are used by zend functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't expose references in debug_backtrace() or exception traces.
This is regardless of whether the argument is by-reference or not.
As a side-effect of this change, exception traces may now acquire
the interior value of a reference, which may be unexpected for
some internal functions. This is what necessitated the change in
the spl_array sort implementation.
|
| | |
|
| |
| |
| |
| |
| |
| | |
RFC: https://wiki.php.net/rfc/string_to_number_comparison
Closes GH-3886.
|
| |
| |
| |
| |
| | |
Avoid accessing intern->u.cbfilter null pointer, though it's
harmless here.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Let normal zpp throw ArgumentCountErrors.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, unexpected tokens in the parser are shown as the text
found, plus the internal token name, including the notorious
"unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)".
This commit replaces that with a more user-friendly format, with
two main types of token:
* Tokens which always represent the same text are shown like
'unexpected token "::"' and 'expected "::"'
* Tokens which have variable text are given a user-friendly
name, and show like 'unexpected identifier "foo"', and
'expected identifer'.
A few tokens have special cases:
* unexpected token """ -> unexpected double-quote mark
* unexpected quoted string "'foo'" -> unexpected single-quoted
string "foo"
* unexpected quoted string ""foo"" -> unexpected double-quoted
string "foo"
* unexpected illegal character "_" -> unexpected character 0xNN
(where _ is almost certainly a control character, and NN is the
hexadecimal value of the byte)
The \ token has a special case in the implementation just to stop
bison making a mess of escaping it and it coming out as \\
|
| |
| |
| |
| | |
Closes GH-5590
|
| | |
|
| |
| |
| |
| |
| | |
As the name might suggest, this is a *filter* iterator. If you want
to have a *map* iterator, write one, or use a generator.
|
| |
| |
| |
| | |
Closes GH-5758
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Extract test helper function for SeCreateSymbolicLinkPrivilege check
|
| | |
|
| |
| |
| |
| | |
Optional handler with the same semantics as the object handler.
|
| | |
|
| | |
|