diff options
-rw-r--r-- | ext/simplexml/simplexml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index c4dc230ee9..08b88462be 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -164,7 +164,7 @@ change_node_zval(xmlNodePtr node, zval *value) case IS_NULL: convert_to_string(value); case IS_STRING: - node->xmlChildrenNode->content = xmlStrndup(Z_STRVAL_P(value), Z_STRLEN_P(value)); + xmlNodeSetContentLen(node->xmlChildrenNode, Z_STRVAL_P(value), Z_STRLEN_P(value)); break; default: php_error(E_WARNING, "It is not yet possible to assign complex types to attributes"); |