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.2.11RC2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e46f05a0a2b4cf48ef1ba9fce732ab27a8a0796c;p=php Fixed return value to comply with tests --- diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 7d1e603267..1c6dec2cce 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -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); }