| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes oss-fuzz #27755.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Similar to what is done for ReflectionType itself, copy the
type name stored inside ReflectionProperty. Also make sure the
type field is always initialized for dynamic properties.
This is a non-issue in PHP 8, because we store a pointer to the
property_info there, rather than a copy.
|
|
|
|
|
|
|
|
|
|
|
|
| |
`ReflectionClass` allows reading of the values of private and protected
constants, and also to get private and protected static methods.
Therefore getting the values of private and protected static properties
is also permissible, especially since `::getStaticProperties()` already
allows to do so.
We also allow ::setStaticPropertyValue() to modify private and
protected properties, because otherwise this method is useless, as
modifying public properties can be done directly.
|
|
|
|
|
| |
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
|
|
|
|
| |
This reverts commit a895bb6885fbceea3e8375816969d5510d8d082e.
|
|
|
|
|
| |
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
|
|
|
|
| |
Mostly reindent PHP scripts to spaces.
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fixed bug #79115
|
| | |
|
| |
| |
| |
| | |
static. IS_IMPLICIT_ABSTRACT is not longer used)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The string held by the zend_type may be released if the property
type gets resolved to a CE. I initially wanted to fix this by
storing a zend_type* instead (so the property type resolution
propagates to the ReflectionType), but decided against this in
light of upcoming union types support, where we also need to
represent parts of the union, and will not have a single zend_type*
we can reference.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix bug #78697: inaccurate error message
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.2:
Fix bug #78697: inaccurate error message
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
despite what the docs say...
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
New fix for bug #78263. This is special-cased elsewhere in the engine,
so we need to mirror it here.
|
| | |
| | |
| | |
| | | |
This reverts commit 428cfdd1810b17f0064b7691276f0eb92dc963b6.
|
| | |
| | |
| | |
| | | |
And remove the Reflector::export() interface method.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
export() methods were implemented in a roundabout way, where they
would call Reflection::export(), which would then call __toString().
Cut out the middleman by directly calling __toString().
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And don't return null for rc=1 references. Leave it to the user
to decide whether or not they want to consider these as references
or not.
Fixes bug #78263.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We weren't able to do this in 7.1 because the deprecation notice
may be converted to an exception and __toString() can't throw,
which means that it ultimately become a fatal error. This issue
is resolved now, so we can mark the method as deprecated.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | | |
The usual wrappers around ZVAL_EMPTY_ARRAY()...
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Treat singleton references as non-references in ReflectionReference
and return null for them.
|
| | |
| | |
| | |
| | |
| | | |
At this point zpp overhead makes up a significant part of this
function.
|
| | |
| | |
| | |
| | |
| | | |
Instead of going through write_property, directly assign to the
respective property slot.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Returning inside _DO_THROW() is kind of pointless if we are going
to comment most uses with "this is gonna return".
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Contrary to the comments, these only hide constructors (old or new
style) if they a) are inherited b) come from a trait and c) are
aliased -- which doesn't make any sense at all.
|
| | |
| | |
| | |
| | | |
ZEND_ACC_DTOR flags removal)
|
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/reference_reflection
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
|
| | | |
|