| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #78226: Don't call __set() on uninitialized typed properties
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are still triggered if
the property is explicitly unset().
This gives us both the behavior people generally expect, and still
allows ORMs to do lazy initialization by unsetting properties.
For PHP 8, we should fine a way to forbid unsetting of declared
properties entirely, and provide a different way to achieve lazy
initialization.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Split out the simple equality check into an inline function --
this is one of the common cases.
Replace instanceof_function_ex with zend_class_implements_interface.
There are a few more places where it may be used.
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously if the "non well formed" notice was converted into an
exception we'd still end up executing the function.
Also drop the now unnecessary EG(exception) checks in the engine.
Additionally remote a bogus exception in zend_is_callable: It
should only be writing to error, but not directly throwing.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`get_closure` handlers are called to check whether an object is
callable, and to actually get the closure, respectively. The behavior
of the handler might differ for these two cases, particularly the
handler may throw in the latter case, but should not in the former.
Therefore we add a `check_only` parameter, to be able to distinguish
the desired purpose.
|
| | |
| | |
| | |
| | |
| | | |
Instead of a simple if or 0 comparison. This would no longer work
if zend_type is a struct.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78543: is_callable() on FFI\CData throws Exception
|
| | |
| | |
| | |
| | |
| | | |
If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the
exeception pass to userland, if called through `is_callable()`.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also remove the hack where scope is set to NULL in order to make
free_internal_arg_info work. Instead explicitly call it for class
methods.
This fixes the asan build for Zend/tests/bug77494.phpt.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Initialize static_members_table
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Delay EG(exception) check on slow path
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
Arginfo is allocated if types are used, we need to free it.
|
| | |
| | |
| | |
| | | |
Closes GH-4247.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Keep track of delayed variance obligations and check them after
linking a class is otherwise finished. Obligations may either be
unresolved method compatibility (because the necessecary classes
aren't available yet) or open parent/interface dependencies. The
latter occur because we allow the use of not fully linked classes
as parents/interfaces now.
An important aspect of the implementation is we do not require
classes involved in variance checks to be fully linked in order for
the class to be fully linked. Because the involved types do have to
exist in the class table (as partially linked classes) and we do
check these for correct variance, we have the guarantee that either
those classes will successfully link lateron or generate an error,
but there is no way to actually use them until that point and as
such no possibility of violating the variance contract. This is
important because it ensures that a class declaration always either
errors or will produce an immediately usable class afterwards --
there are no cases where the finalization of the class declaration
has to be delayed until a later time, as earlier variants of this
patch did.
Because variance checks deal with classes in various stages of
linking, we need to use a special instanceof implementation that
supports this, and also introduce finer-grained flags that tell us
which parts have been linked already and which haven't.
Class autoloading for variance checks is delayed into a separate
stage after the class is otherwise linked and before delayed
variance obligations are processed. This separation is needed to
handle cases like A extends B extends C, where B is the autoload
root, but C is required to check variance. This could end up
loading C while the class structure of B is in an inconsistent
state.
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Revert "Fix bug #62397 - disable_functions does not work with eval."
|
| | |
| | |
| | |
| | | |
This reverts commit 050d299364ded5cb7b878bc515aa763c9c623c4b.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
We don't use this internally anymore, and external usages should
be encouraged to move towards 'l'.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Better hot/cold code splitting
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.
Closes GH-4202.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Mark "cold" functions
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-7.4:
disabled functions must not have return type
Restore the execute bit for run-tests.php
|
| |\ \
| | |/
| | |
| | |
| | |
| | | |
* PHP-7.3:
disabled functions must not have return type
Restore the execute bit for run-tests.php
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.2:
disabled functions must not have return type
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Instead of a single boolean, so we have space for extension here.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | | |
* PHP-7.4:
Update changelogs
Fix bug #62397 - disable_functions does not work with eval.
|
| | | | |
|
|\ \ \ \
| |/ / / |
|
| |\ \ \ |
|
| | |/ / |
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
FOREACH_END_DEL() does not call the destructor by itself, we need to
explicitly call it. Due to the missing dtor call the functions were
not unregistered early, which resulted in later shutdown segfaults.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
Fixed dl() function. It failed in DEBUG build without opcache because of assert during string interning.
|
| |\ \ \
| | |/ /
| | | |
| | | |
| | | | |
* PHP-7.3:
Fixed dl() function. It failed in DEBUG build without opcache because of assert during string interning.
|