]> granicus.if.org Git - php/commitdiff
fix bug #46029 (Segfault in DOMText when using with Reflection)
authorRob Richards <rrichards@php.net>
Wed, 10 Sep 2008 15:39:43 +0000 (15:39 +0000)
committerRob Richards <rrichards@php.net>
Wed, 10 Sep 2008 15:39:43 +0000 (15:39 +0000)
ext/dom/cdatasection.c
ext/dom/comment.c
ext/dom/documentfragment.c
ext/dom/processinginstruction.c
ext/dom/text.c

index 29a58894a90c133b548e2b840323565850b4aff5..4e6d2ba0f8053f66abe1d3f69a523b41ee8cf388 100644 (file)
@@ -72,7 +72,7 @@ PHP_METHOD(domcdatasection, __construct)
 
        intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
        if (intern != NULL) {
-               oldnode = (xmlNodePtr)intern->ptr;
+               oldnode = dom_object_get_node(intern);
                if (oldnode != NULL) {
                        php_libxml_node_free_resource(oldnode  TSRMLS_CC);
                }
index 09b550a60e6f4b43682ea00f3e02b5fa14fac42c..76b37f4002d2e855dd81fa9364249e738b8fde31 100644 (file)
@@ -72,7 +72,7 @@ PHP_METHOD(domcomment, __construct)
 
        intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
        if (intern != NULL) {
-               oldnode = (xmlNodePtr)intern->ptr;
+               oldnode = dom_object_get_node(intern);
                if (oldnode != NULL) {
                        php_libxml_node_free_resource(oldnode  TSRMLS_CC);
                }
index 11737563f6cdb0f541b5fbff2dce1a2007cbc1af..0748655cc5d5f235a8b8c47410d12afbc9485183 100644 (file)
@@ -75,7 +75,7 @@ PHP_METHOD(domdocumentfragment, __construct)
 
        intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
        if (intern != NULL) {
-               oldnode = (xmlNodePtr)intern->ptr;
+               oldnode = dom_object_get_node(intern);
                if (oldnode != NULL) {
                        php_libxml_node_free_resource(oldnode  TSRMLS_CC);
                }
index 2c427bc01436de07a7ba84dd618ca43b7d584e92..02027afcd6a3671259d87dd2e285593a5d87281e 100644 (file)
@@ -79,7 +79,7 @@ PHP_METHOD(domprocessinginstruction, __construct)
 
        intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
        if (intern != NULL) {
-               oldnode = (xmlNodePtr)intern->ptr;
+               oldnode = dom_object_get_node(intern);
                if (oldnode != NULL) {
                        php_libxml_node_free_resource(oldnode  TSRMLS_CC);
                }
index 214553abd694734a07b6ccaea1e0736a93261ca3..06b54a614280acaf8a5552031ba2b8a3eedba4d9 100644 (file)
@@ -91,7 +91,7 @@ PHP_METHOD(domtext, __construct)
 
        intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
        if (intern != NULL) {
-               oldnode = (xmlNodePtr)intern->ptr;
+               oldnode = dom_object_get_node(intern);
                if (oldnode != NULL) {
                        php_libxml_node_free_resource(oldnode  TSRMLS_CC);
                }