From 3a9754715a3e4a72ac4b4e57d99871e231e85307 Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Tue, 10 Aug 2004 08:02:00 +0000 Subject: [PATCH] MFH (Fix segfault on error in xslt) --- ext/xsl/xsltprocessor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index e7511c45f5..c5ebf1a879 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -400,7 +400,10 @@ static xmlDocPtr php_xsl_apply_stylesheet(xsl_object *intern, xsltStylesheetPtr char **params = NULL; int clone; - + if (style == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "No stylesheet associated to this object"); + return NULL; + } if (intern->parameter) { params = php_xsl_xslt_make_params(intern->parameter, 0 TSRMLS_CC); } -- 2.50.1