mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Delay #[Attribute] arg validation until runtime
This commit is contained in:
commit
480d08a70a
10 changed files with 106 additions and 28 deletions
|
@ -6772,16 +6772,9 @@ ZEND_METHOD(ReflectionAttribute, newInstance)
|
|||
}
|
||||
|
||||
if (ce->type == ZEND_USER_CLASS) {
|
||||
uint32_t flags = ZEND_ATTRIBUTE_TARGET_ALL;
|
||||
|
||||
if (marker->argc > 0) {
|
||||
zval tmp;
|
||||
|
||||
if (FAILURE == zend_get_attribute_value(&tmp, marker, 0, ce)) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
flags = (uint32_t) Z_LVAL(tmp);
|
||||
uint32_t flags = zend_attribute_attribute_get_flags(marker, ce);
|
||||
if (EG(exception)) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (!(attr->target & flags)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue