rrichards Sat Dec 4 06:41:12 2004 EDT Added files: (Branch: PHP_5_0) /php-src/ext/dom/tests bug28817.phpt
Modified files: /php-src/ext/dom php_dom.c Log: MFH: Fixed bug #28817 (Var problem when extending domDocument). (Georg) add test http://cvs.php.net/diff.php/php-src/ext/dom/php_dom.c?r1=1.60.2.2&r2=1.60.2.3&ty=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.60.2.2 php-src/ext/dom/php_dom.c:1.60.2.3 --- php-src/ext/dom/php_dom.c:1.60.2.2 Mon Aug 30 11:09:07 2004 +++ php-src/ext/dom/php_dom.c Sat Dec 4 06:41:12 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.60.2.2 2004/08/30 15:09:07 rrichards Exp $ */ +/* $Id: php_dom.c,v 1.60.2.3 2004/12/04 11:41:12 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -234,6 +234,7 @@ } else { std_hnd = zend_get_std_object_handlers(); retval = std_hnd->read_property(object, member, type TSRMLS_CC); + retval->refcount = 1; } if (member == &tmp_member) { http://cvs.php.net/co.php/php-src/ext/dom/tests/bug28817.phpt?r=1.1&p=1 Index: php-src/ext/dom/tests/bug28817.phpt +++ php-src/ext/dom/tests/bug28817.phpt --TEST-- Bug # 28817: (properties in extended class) --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php class z extends domDocument{ /** variable can have name */ public $p_array; public $p_variable; function __construct(){ $this->p_array[] = 'bonus'; $this->p_array[] = 'vir'; $this->p_array[] = 'semper'; $this->p_array[] = 'tiro'; $this->p_variable = 'Cessante causa cessat effectus'; } } $z=new z(); var_dump($z->p_array); var_dump($z->p_variable); ?> --EXPECTF-- array(4) { [0]=> string(5) "bonus" [1]=> string(3) "vir" [2]=> string(6) "semper" [3]=> string(4) "tiro" } string(30) "Cessante causa cessat effectus" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php