iliaa           Mon Feb 20 15:28:15 2006 UTC

  Modified files:              
    /php-src/ext/reflection     php_reflection.c 
  Log:
  MFB51: Fixed bug #36434 (Improper resolution of declaring class name of an 
  inherited property).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflection.c?r1=1.207&r2=1.208&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.207 
php-src/ext/reflection/php_reflection.c:1.208
--- php-src/ext/reflection/php_reflection.c:1.207       Mon Feb 20 11:15:02 2006
+++ php-src/ext/reflection/php_reflection.c     Mon Feb 20 15:28:15 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.207 2006/02/20 11:15:02 dmitry Exp $ */
+/* $Id: php_reflection.c,v 1.208 2006/02/20 15:28:15 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -3809,11 +3809,19 @@
 {
        reflection_object *intern;
        property_reference *ref;
+       zend_class_entry *tmp_ce, *ce;
+       zend_property_info *tmp_info;
 
        METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0);
        GET_REFLECTION_OBJECT_PTR(ref);
 
-       zend_reflection_class_factory(ref->ce, return_value TSRMLS_CC);
+       ce = tmp_ce = ref->ce;
+       while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, 
ref->prop->name, ref->prop->name_length + 1, (void **) &tmp_info) == SUCCESS) {
+               ce = tmp_ce;
+                tmp_ce = tmp_ce->parent;
+       }
+
+       zend_reflection_class_factory(ce, return_value TSRMLS_CC);
 }
 
 /* {{{ proto public string ReflectionProperty::getDocComment()
@@ -4338,7 +4346,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Reflection", "enabled");
 
-       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.207 
2006/02/20 11:15:02 dmitry Exp $");
+       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.208 
2006/02/20 15:28:15 iliaa Exp $");
 
        php_info_print_table_end();
 } /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to