]> granicus.if.org Git - php/commitdiff
Fixed return value to comply with tests
authorIlia Alshanetsky <iliaa@php.net>
Wed, 2 Sep 2009 13:07:44 +0000 (13:07 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 2 Sep 2009 13:07:44 +0000 (13:07 +0000)
ext/xsl/xsltprocessor.c

index 7d1e603267d213c48f0eaf38762e0a4fed4680e6..1c6dec2ccedb6253e3f4769c4b5243f6fe27b002 100644 (file)
@@ -666,7 +666,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml)
        ret = -1;
        if (newdocp) {
                ret = xsltSaveResultToString(&doc_txt_ptr, &doc_txt_len, newdocp, sheetp);
-               if (doc_txt_ptr) {
+               if (doc_txt_ptr && doc_txt_len) {
                        RETVAL_STRINGL(doc_txt_ptr, doc_txt_len, 1);
                        xmlFree(doc_txt_ptr);
                }