@@ -5289,16 +5289,15 @@ ZEND_METHOD(reflection_class_constant, export)
5289
5289
ZEND_METHOD (reflection_property , __construct )
5290
5290
{
5291
5291
zval propname , cname , * classname ;
5292
- char * name_str ;
5293
- size_t name_len ;
5292
+ zend_string * name ;
5294
5293
int dynam_prop = 0 ;
5295
5294
zval * object ;
5296
5295
reflection_object * intern ;
5297
5296
zend_class_entry * ce ;
5298
5297
zend_property_info * property_info = NULL ;
5299
5298
property_reference * reference ;
5300
5299
5301
- if (zend_parse_parameters_throw (ZEND_NUM_ARGS (), "zs " , & classname , & name_str , & name_len ) == FAILURE ) {
5300
+ if (zend_parse_parameters_throw (ZEND_NUM_ARGS (), "zS " , & classname , & name ) == FAILURE ) {
5302
5301
return ;
5303
5302
}
5304
5303
@@ -5324,15 +5323,15 @@ ZEND_METHOD(reflection_property, __construct)
5324
5323
/* returns out of this function */
5325
5324
}
5326
5325
5327
- if ((property_info = zend_hash_str_find_ptr (& ce -> properties_info , name_str , name_len )) == NULL || (property_info -> flags & ZEND_ACC_SHADOW )) {
5326
+ if ((property_info = zend_hash_find_ptr (& ce -> properties_info , name )) == NULL || (property_info -> flags & ZEND_ACC_SHADOW )) {
5328
5327
/* Check for dynamic properties */
5329
5328
if (property_info == NULL && Z_TYPE_P (classname ) == IS_OBJECT && Z_OBJ_HT_P (classname )-> get_properties ) {
5330
- if (zend_hash_str_exists (Z_OBJ_HT_P (classname )-> get_properties (classname ), name_str , name_len )) {
5329
+ if (zend_hash_exists (Z_OBJ_HT_P (classname )-> get_properties (classname ), name )) {
5331
5330
dynam_prop = 1 ;
5332
5331
}
5333
5332
}
5334
5333
if (dynam_prop == 0 ) {
5335
- zend_throw_exception_ex (reflection_exception_ptr , 0 , "Property %s::$%s does not exist" , ZSTR_VAL (ce -> name ), name_str );
5334
+ zend_throw_exception_ex (reflection_exception_ptr , 0 , "Property %s::$%s does not exist" , ZSTR_VAL (ce -> name ), ZSTR_VAL ( name ) );
5336
5335
return ;
5337
5336
}
5338
5337
}
@@ -5342,24 +5341,21 @@ ZEND_METHOD(reflection_property, __construct)
5342
5341
zend_class_entry * tmp_ce = ce ;
5343
5342
zend_property_info * tmp_info ;
5344
5343
5345
- while (tmp_ce && (tmp_info = zend_hash_str_find_ptr (& tmp_ce -> properties_info , name_str , name_len )) == NULL ) {
5344
+ while (tmp_ce && (tmp_info = zend_hash_find_ptr (& tmp_ce -> properties_info , name )) == NULL ) {
5346
5345
ce = tmp_ce ;
5347
5346
property_info = tmp_info ;
5348
5347
tmp_ce = tmp_ce -> parent ;
5349
5348
}
5350
5349
}
5351
5350
5352
5351
if (dynam_prop == 0 ) {
5353
- const char * class_name , * prop_name ;
5354
- size_t prop_name_len ;
5355
- zend_unmangle_property_name_ex (property_info -> name , & class_name , & prop_name , & prop_name_len );
5356
5352
ZVAL_STR_COPY (& cname , property_info -> ce -> name );
5357
- ZVAL_STRINGL (& propname , prop_name , prop_name_len );
5358
5353
} else {
5359
5354
ZVAL_STR_COPY (& cname , ce -> name );
5360
- ZVAL_STRINGL (& propname , name_str , name_len );
5361
5355
}
5362
5356
reflection_update_property_class (object , & cname );
5357
+
5358
+ ZVAL_STR_COPY (& propname , name );
5363
5359
reflection_update_property_name (object , & propname );
5364
5360
5365
5361
reference = (property_reference * ) emalloc (sizeof (property_reference ));
0 commit comments