]> 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 a16359430903f3aa2985eb3a7ffefe13eeb28014..6cf1bd745f0d46663cdbea486a86d872f130b83a 100644 (file)
@@ -687,7 +687,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);
                }