Fixed return value to comply with tests

This commit is contained in:
Ilia Alshanetsky 2009-09-02 13:07:44 +00:00
parent da9aee9703
commit 556dde6a34

View File

@ -675,7 +675,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);
}