]> granicus.if.org Git - php/commitdiff
Avoid unnecesary zval separation
authorMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 5 Jun 2003 18:54:19 +0000 (18:54 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 5 Jun 2003 18:54:19 +0000 (18:54 +0000)
ext/xsl/xsltprocessor.c

index 7b3f4a560ae4f27d79c358d2497de960e4398348..cd59756a3bd04e3b93ee6e3de16a47d0cdf23332 100644 (file)
@@ -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);