@@ -157,7 +157,6 @@ typedef struct _attribute_reference {
157
157
zend_class_entry * scope ;
158
158
zend_string * filename ;
159
159
uint32_t target ;
160
- bool on_property_hook ;
161
160
} attribute_reference ;
162
161
163
162
typedef enum {
@@ -1255,7 +1254,7 @@ static void _extension_string(smart_str *str, const zend_module_entry *module, c
1255
1254
1256
1255
/* {{{ reflection_attribute_factory */
1257
1256
static void reflection_attribute_factory (zval * object , HashTable * attributes , zend_attribute * data ,
1258
- zend_class_entry * scope , uint32_t target , zend_string * filename , bool on_property_hook )
1257
+ zend_class_entry * scope , uint32_t target , zend_string * filename )
1259
1258
{
1260
1259
reflection_object * intern ;
1261
1260
attribute_reference * reference ;
@@ -1268,16 +1267,14 @@ static void reflection_attribute_factory(zval *object, HashTable *attributes, ze
1268
1267
reference -> scope = scope ;
1269
1268
reference -> filename = filename ? zend_string_copy (filename ) : NULL ;
1270
1269
reference -> target = target ;
1271
- reference -> on_property_hook = on_property_hook ;
1272
1270
intern -> ptr = reference ;
1273
1271
intern -> ref_type = REF_TYPE_ATTRIBUTE ;
1274
1272
ZVAL_STR_COPY (reflection_prop_name (object ), data -> name );
1275
1273
}
1276
1274
/* }}} */
1277
1275
1278
1276
static int read_attributes (zval * ret , HashTable * attributes , zend_class_entry * scope ,
1279
- uint32_t offset , uint32_t target , zend_string * name , zend_class_entry * base , zend_string * filename ,
1280
- bool on_property_hook ) /* {{{ */
1277
+ uint32_t offset , uint32_t target , zend_string * name , zend_class_entry * base , zend_string * filename ) /* {{{ */
1281
1278
{
1282
1279
ZEND_ASSERT (attributes != NULL );
1283
1280
@@ -1290,7 +1287,7 @@ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *s
1290
1287
1291
1288
ZEND_HASH_PACKED_FOREACH_PTR (attributes , attr ) {
1292
1289
if (attr -> offset == offset && zend_string_equals (attr -> lcname , filter )) {
1293
- reflection_attribute_factory (& tmp , attributes , attr , scope , target , filename , on_property_hook );
1290
+ reflection_attribute_factory (& tmp , attributes , attr , scope , target , filename );
1294
1291
add_next_index_zval (ret , & tmp );
1295
1292
}
1296
1293
} ZEND_HASH_FOREACH_END ();
@@ -1322,7 +1319,7 @@ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *s
1322
1319
}
1323
1320
}
1324
1321
1325
- reflection_attribute_factory (& tmp , attributes , attr , scope , target , filename , on_property_hook );
1322
+ reflection_attribute_factory (& tmp , attributes , attr , scope , target , filename );
1326
1323
add_next_index_zval (ret , & tmp );
1327
1324
} ZEND_HASH_FOREACH_END ();
1328
1325
@@ -1331,7 +1328,7 @@ static int read_attributes(zval *ret, HashTable *attributes, zend_class_entry *s
1331
1328
/* }}} */
1332
1329
1333
1330
static void reflect_attributes (INTERNAL_FUNCTION_PARAMETERS , HashTable * attributes ,
1334
- uint32_t offset , zend_class_entry * scope , uint32_t target , zend_string * filename , bool on_property_hook ) /* {{{ */
1331
+ uint32_t offset , zend_class_entry * scope , uint32_t target , zend_string * filename ) /* {{{ */
1335
1332
{
1336
1333
zend_string * name = NULL ;
1337
1334
zend_long flags = 0 ;
@@ -1364,7 +1361,7 @@ static void reflect_attributes(INTERNAL_FUNCTION_PARAMETERS, HashTable *attribut
1364
1361
1365
1362
array_init (return_value );
1366
1363
1367
- if (FAILURE == read_attributes (return_value , attributes , scope , offset , target , name , base , filename , on_property_hook )) {
1364
+ if (FAILURE == read_attributes (return_value , attributes , scope , offset , target , name , base , filename )) {
1368
1365
RETURN_THROWS ();
1369
1366
}
1370
1367
}
@@ -2069,21 +2066,15 @@ ZEND_METHOD(ReflectionFunctionAbstract, getAttributes)
2069
2066
2070
2067
GET_REFLECTION_OBJECT_PTR (fptr );
2071
2068
2072
- bool on_property_hook = false;
2073
-
2074
2069
if (fptr -> common .scope && (fptr -> common .fn_flags & (ZEND_ACC_CLOSURE |ZEND_ACC_FAKE_CLOSURE )) != ZEND_ACC_CLOSURE ) {
2075
2070
target = ZEND_ATTRIBUTE_TARGET_METHOD ;
2076
- if (fptr -> common .prop_info != NULL ) {
2077
- on_property_hook = true;
2078
- }
2079
2071
} else {
2080
2072
target = ZEND_ATTRIBUTE_TARGET_FUNCTION ;
2081
2073
}
2082
2074
2083
2075
reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
2084
2076
fptr -> common .attributes , 0 , fptr -> common .scope , target ,
2085
- fptr -> type == ZEND_USER_FUNCTION ? fptr -> op_array .filename : NULL ,
2086
- on_property_hook );
2077
+ fptr -> type == ZEND_USER_FUNCTION ? fptr -> op_array .filename : NULL );
2087
2078
}
2088
2079
/* }}} */
2089
2080
@@ -2925,8 +2916,7 @@ ZEND_METHOD(ReflectionParameter, getAttributes)
2925
2916
2926
2917
reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
2927
2918
attributes , param -> offset + 1 , scope , ZEND_ATTRIBUTE_TARGET_PARAMETER ,
2928
- param -> fptr -> type == ZEND_USER_FUNCTION ? param -> fptr -> op_array .filename : NULL ,
2929
- false);
2919
+ param -> fptr -> type == ZEND_USER_FUNCTION ? param -> fptr -> op_array .filename : NULL );
2930
2920
}
2931
2921
2932
2922
/* {{{ Returns the index of the parameter, starting from 0 */
@@ -4048,8 +4038,7 @@ ZEND_METHOD(ReflectionClassConstant, getAttributes)
4048
4038
4049
4039
reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
4050
4040
ref -> attributes , 0 , ref -> ce , ZEND_ATTRIBUTE_TARGET_CLASS_CONST ,
4051
- ref -> ce -> type == ZEND_USER_CLASS ? ref -> ce -> info .user .filename : NULL ,
4052
- false);
4041
+ ref -> ce -> type == ZEND_USER_CLASS ? ref -> ce -> info .user .filename : NULL );
4053
4042
}
4054
4043
/* }}} */
4055
4044
@@ -4454,8 +4443,7 @@ ZEND_METHOD(ReflectionClass, getAttributes)
4454
4443
4455
4444
reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
4456
4445
ce -> attributes , 0 , ce , ZEND_ATTRIBUTE_TARGET_CLASS ,
4457
- ce -> type == ZEND_USER_CLASS ? ce -> info .user .filename : NULL ,
4458
- false);
4446
+ ce -> type == ZEND_USER_CLASS ? ce -> info .user .filename : NULL );
4459
4447
}
4460
4448
/* }}} */
4461
4449
@@ -6402,8 +6390,7 @@ ZEND_METHOD(ReflectionProperty, getAttributes)
6402
6390
6403
6391
reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
6404
6392
ref -> prop -> attributes , 0 , ref -> prop -> ce , ZEND_ATTRIBUTE_TARGET_PROPERTY ,
6405
- ref -> prop -> ce -> type == ZEND_USER_CLASS ? ref -> prop -> ce -> info .user .filename : NULL ,
6406
- false);
6393
+ ref -> prop -> ce -> type == ZEND_USER_CLASS ? ref -> prop -> ce -> info .user .filename : NULL );
6407
6394
}
6408
6395
/* }}} */
6409
6396
@@ -7911,7 +7898,7 @@ ZEND_METHOD(ReflectionConstant, getAttributes)
7911
7898
7912
7899
reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU ,
7913
7900
const_ -> attributes , 0 , NULL , ZEND_ATTRIBUTE_TARGET_CONST ,
7914
- const_ -> filename , false );
7901
+ const_ -> filename );
7915
7902
}
7916
7903
7917
7904
ZEND_METHOD (ReflectionConstant , __toString )
0 commit comments