diff options
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r-- | ext/domxml/php_domxml.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 681d4b2fcb..dd5bc562d2 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -1090,8 +1090,10 @@ static char **php_xmlparser_make_params(zval *idvars TSRMLS_DC) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid argument or parameter array"); return NULL; } else { - SEPARATE_ZVAL(value); - convert_to_string_ex(value); + if (Z_TYPE_PP(value) != IS_STRING) { + SEPARATE_ZVAL(value); + convert_to_string(*value); + } expr = Z_STRVAL_PP(value); if (expr) { @@ -5481,8 +5483,10 @@ static char **php_domxslt_make_params(zval *idvars, int xpath_params TSRMLS_DC) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid argument or parameter array"); return NULL; } else { - SEPARATE_ZVAL(value); - convert_to_string_ex(value); + if (Z_TYPE_PP(value) != IS_STRING) { + SEPARATE_ZVAL(value); + convert_to_string(*value); + } if (!xpath_params) { xpath_expr = php_domxslt_string_to_xpathexpr(Z_STRVAL_PP(value) TSRMLS_CC); |