For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > November 2004 > cvs: ZendEngine2 / zend_reflection_api.c









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2 / zend_reflection_api.c
Marcus Boerger

2004-11-24, 8:55 pm

helly Wed Nov 24 14:56:54 2004 EDT

Modified files:
/ZendEngine2 zend_reflection_api.c
Log:
- Fix Bug #30856 (ReflectionClass::getStaticProperties segfaults)

http://cvs.php.net/diff.php/ZendEng...9&r2=1.140&ty=u
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.139 ZendEngine2/zend_reflection_api.c:1.140
--- ZendEngine2/zend_reflection_api.c:1.139 Sun Nov 14 13:01:44 2004
+++ ZendEngine2/zend_reflection_api.c Wed Nov 24 14:56:54 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_reflection_api.c,v 1.139 2004/11/14 18:01:44 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.140 2004/11/24 19:56:54 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
@@ -2295,6 +2295,13 @@

METHOD_NOTSTATIC_NUMPARAMS(0);
GET_REFLECTION_OBJECT_PTR(ce);
+
+ if (!ce->constants_updated) {
+ zend_hash_apply_with_argument(&ce->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+ zend_hash_apply_with_argument(ce->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+ ce->constants_updated = 1;
+ }
+
array_init(return_value);
zend_hash_copy(Z_ARRVAL_P(return_value),
ce->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com