From 556dde6a34f64acc5b60d041bc2927e64451c045 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 2 Sep 2009 13:07:44 +0000 Subject: [PATCH] Fixed return value to comply with tests --- ext/xsl/xsltprocessor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index d1108e5122c..6b4e19f5713 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -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); }