mirror of
https://github.com/php/php-src.git
synced 2026-03-27 01:32:22 +01:00
- Bugix #30783: Apache crash when using ReflectionFunction::getStaticVariables()
This commit is contained in:
@@ -1331,7 +1331,7 @@ ZEND_METHOD(reflection_function, getStaticVariables)
|
||||
|
||||
/* Return an empty array in case no static variables exist */
|
||||
array_init(return_value);
|
||||
if (fptr->op_array.static_variables != NULL) {
|
||||
if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) {
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1331,7 +1331,7 @@ ZEND_METHOD(reflection_function, getStaticVariables)
|
||||
|
||||
/* Return an empty array in case no static variables exist */
|
||||
array_init(return_value);
|
||||
if (fptr->op_array.static_variables != NULL) {
|
||||
if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) {
|
||||
zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user