@@ -1767,17 +1767,9 @@ ZEND_METHOD(ReflectionFunctionAbstract, getAttributes)
17671767 reflection_object * intern ;
17681768 zend_function * fptr ;
17691769
1770- HashTable * attributes = NULL ;
1771- zend_class_entry * scope = NULL ;
1772-
17731770 GET_REFLECTION_OBJECT_PTR (fptr );
17741771
1775- if (fptr -> type == ZEND_USER_FUNCTION && fptr -> op_array .attributes ) {
1776- attributes = fptr -> op_array .attributes ;
1777- scope = fptr -> common .scope ;
1778- }
1779-
1780- reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , attributes , 0 , scope );
1772+ reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , fptr -> common .attributes , 0 , fptr -> common .scope );
17811773}
17821774/* }}} */
17831775
@@ -2714,15 +2706,10 @@ ZEND_METHOD(ReflectionParameter, getAttributes)
27142706 reflection_object * intern ;
27152707 parameter_reference * param ;
27162708
2717- HashTable * attributes = NULL ;
2718- zend_class_entry * scope = NULL ;
2719-
27202709 GET_REFLECTION_OBJECT_PTR (param );
27212710
2722- if (param -> fptr -> type == ZEND_USER_FUNCTION && param -> fptr -> op_array .attributes ) {
2723- attributes = param -> fptr -> op_array .attributes ;
2724- scope = param -> fptr -> common .scope ;
2725- }
2711+ HashTable * attributes = param -> fptr -> common .attributes ;
2712+ zend_class_entry * scope = param -> fptr -> common .scope ;
27262713
27272714 reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , attributes , param -> offset + 1 , scope );
27282715}
@@ -3790,17 +3777,9 @@ ZEND_METHOD(ReflectionClassConstant, getAttributes)
37903777 reflection_object * intern ;
37913778 zend_class_constant * ref ;
37923779
3793- HashTable * attributes = NULL ;
3794- zend_class_entry * scope = NULL ;
3795-
37963780 GET_REFLECTION_OBJECT_PTR (ref );
37973781
3798- if (ref -> attributes ) {
3799- attributes = ref -> attributes ;
3800- scope = ref -> ce ;
3801- }
3802-
3803- reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , attributes , 0 , scope );
3782+ reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , ref -> attributes , 0 , ref -> ce );
38043783}
38053784/* }}} */
38063785
@@ -5691,17 +5670,9 @@ ZEND_METHOD(ReflectionProperty, getAttributes)
56915670 reflection_object * intern ;
56925671 property_reference * ref ;
56935672
5694- HashTable * attributes = NULL ;
5695- zend_class_entry * scope = NULL ;
5696-
56975673 GET_REFLECTION_OBJECT_PTR (ref );
56985674
5699- if (ref -> prop -> attributes ) {
5700- attributes = ref -> prop -> attributes ;
5701- scope = ref -> prop -> ce ;
5702- }
5703-
5704- reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , attributes , 0 , scope );
5675+ reflect_attributes (INTERNAL_FUNCTION_PARAM_PASSTHRU , ref -> prop -> attributes , 0 , ref -> prop -> ce );
57055676}
57065677/* }}} */
57075678
0 commit comments