summaryrefslogtreecommitdiff
path: root/ext/xsl
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-06-05 18:54:19 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-06-05 18:54:19 +0000
commit3ebf297261b3033689e7956eb0edfc5a9fe99e15 (patch)
tree20c6e14a18df4c917a3e9c61cc65113dc37029b9 /ext/xsl
parent15aab08e9d0a7f7f1656f8aeba4260f605178eb6 (diff)
downloadphp-git-3ebf297261b3033689e7956eb0edfc5a9fe99e15.tar.gz
Avoid unnecesary zval separation
Diffstat (limited to 'ext/xsl')
-rw-r--r--ext/xsl/xsltprocessor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index 7b3f4a560a..cd59756a3b 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -95,8 +95,10 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params TSRMLS
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_xsl_xslt_string_to_xpathexpr(Z_STRVAL_PP(value) TSRMLS_CC);