From: Wez Furlong Date: Tue, 9 Dec 2003 20:19:44 +0000 (+0000) Subject: allow assignment to $node->nodeValue to work for more X-Git-Tag: php-5.0.0b3RC1~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a35a82ddcd0b5b56aaee75d549011b13bfba3527;p=php allow assignment to $node->nodeValue to work for more objects and in situations where the rvalue is not a string. (Fixes a segfault in that case) --- diff --git a/ext/dom/node.c b/ext/dom/node.c index 40ba5b3ab4..ee769fed8a 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -202,6 +202,8 @@ int dom_node_node_value_write(dom_object *obj, zval *newval TSRMLS_DC) case XML_COMMENT_NODE: case XML_CDATA_SECTION_NODE: case XML_PI_NODE: + case XML_ELEMENT_NODE: + convert_to_string(newval); xmlNodeSetContentLen(nodep, Z_STRVAL_P(newval), Z_STRLEN_P(newval) + 1); break; default: