mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
- Fix bug #29447: Reflection API issues
This commit is contained in:
parent
60fc9c050a
commit
041d23d7b6
@ -2358,6 +2358,7 @@ ZEND_METHOD(reflection_class, getConstants)
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
array_init(return_value);
|
||||
zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), &ce->constants_table, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
}
|
||||
/* }}} */
|
||||
@ -2378,6 +2379,7 @@ ZEND_METHOD(reflection_class, getConstant)
|
||||
}
|
||||
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
|
||||
if (zend_hash_find(&ce->constants_table, name, name_len + 1, (void **) &value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -2358,6 +2358,7 @@ ZEND_METHOD(reflection_class, getConstants)
|
||||
METHOD_NOTSTATIC_NUMPARAMS(0);
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
array_init(return_value);
|
||||
zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), &ce->constants_table, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
}
|
||||
/* }}} */
|
||||
@ -2378,6 +2379,7 @@ ZEND_METHOD(reflection_class, getConstant)
|
||||
}
|
||||
|
||||
GET_REFLECTION_OBJECT_PTR(ce);
|
||||
zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
|
||||
if (zend_hash_find(&ce->constants_table, name, name_len + 1, (void **) &value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user