diff options
| author | Dmitry Stogov <dmitry@php.net> | 2005-08-17 11:57:10 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2005-08-17 11:57:10 +0000 |
| commit | f4ea6b06563b4c298aa404d3b876356303d1f36d (patch) | |
| tree | 54e947b8e54151de0b2b720371f2f23e9b9e9f95 | |
| parent | 3509630024ff5a6e534850072e5c6b974ebce17c (diff) | |
| download | php-git-f4ea6b06563b4c298aa404d3b876356303d1f36d.tar.gz | |
Fixed bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault)
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | Zend/zend_reflection_api.c | 1 | ||||
| -rw-r--r-- | ext/reflection/php_reflection.c | 1 | ||||
| -rwxr-xr-x | ext/reflection/tests/bug32981.phpt | 4 |
4 files changed, 6 insertions, 2 deletions
@@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 6.0 - Fixed bug #34148 (+,- and . not supported as parts of scheme). (Ilia) +- Fixed bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54 + seg fault). (Dmitry) - cURL improvements (Ilia) . Added curl_setopt_array() which allows setting of multiple cURL options. . Added CURLINFO_HEADER_OUT to facilitate request retrieval. diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c index ebc5e6accc..d310f77819 100644 --- a/Zend/zend_reflection_api.c +++ b/Zend/zend_reflection_api.c @@ -1399,6 +1399,7 @@ ZEND_METHOD(reflection_function, getStaticVariables) /* Return an empty array in case no static variables exist */ array_init(return_value); if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { + zend_hash_apply_with_argument(fptr->op_array.static_variables, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC); 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 *)); } } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index ebc5e6accc..d310f77819 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1399,6 +1399,7 @@ ZEND_METHOD(reflection_function, getStaticVariables) /* Return an empty array in case no static variables exist */ array_init(return_value); if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { + zend_hash_apply_with_argument(fptr->op_array.static_variables, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC); 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 *)); } } diff --git a/ext/reflection/tests/bug32981.phpt b/ext/reflection/tests/bug32981.phpt index 39d8bba12b..30a3e89d0a 100755 --- a/ext/reflection/tests/bug32981.phpt +++ b/ext/reflection/tests/bug32981.phpt @@ -28,7 +28,7 @@ array(1) { [0]=> array(1) { ["enabled"]=> - UNKNOWN:0 /* FIXME */ + bool(true) } } ===DONE=== @@ -38,7 +38,7 @@ array(1) { [0]=> array(1) { [u"enabled"]=> - UNKNOWN:0 /* FIXME */ + bool(true) } } ===DONE=== |
