cvs: php-src /ext/dom node.c
| From: | Wez Furlong | Date: | Tue, 09 Dec 2003 20:19:45 +0000 |
| Subject: | cvs: php-src /ext/dom node.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-25101@lists.php.net to get a copy of this message | ||
wez Tue Dec 9 15:19:45 2003 EDT
Modified files:
/php-src/ext/dom node.c
Log:
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)
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.17 php-src/ext/dom/node.c:1.18
--- php-src/ext/dom/node.c:1.17 Tue Dec 2 10:17:02 2003
+++ php-src/ext/dom/node.c Tue Dec 9 15:19:44 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: node.c,v 1.17 2003/12/02 15:17:02 rrichards Exp $ */
+/* $Id: node.c,v 1.18 2003/12/09 20:19:44 wez Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -202,6 +202,8 @@
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: