diff options
Diffstat (limited to 'ext/dom/characterdata.c')
-rw-r--r-- | ext/dom/characterdata.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index 92eb28015..b50bb987e 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2014 The PHP Group | + | Copyright (c) 1997-2015 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -112,14 +112,7 @@ int dom_characterdata_data_write(dom_object *obj, zval *newval TSRMLS_DC) return FAILURE; } - if (newval->type != IS_STRING) { - if(Z_REFCOUNT_P(newval) > 1) { - value_copy = *newval; - zval_copy_ctor(&value_copy); - newval = &value_copy; - } - convert_to_string(newval); - } + convert_to_string_copy(newval, value_copy); xmlNodeSetContentLen(nodep, Z_STRVAL_P(newval), Z_STRLEN_P(newval) + 1); |