From: Ilia Alshanetsky Date: Wed, 2 Sep 2009 13:07:44 +0000 (+0000) Subject: Fixed return value to comply with tests X-Git-Tag: php-5.4.0alpha1~191^2~2706 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=180c7ad8a9ad8679c0adae069896136c1b6c5b9d;p=php Fixed return value to comply with tests --- diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index a163594309..6cf1bd745f 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -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); }