summaryrefslogtreecommitdiff
path: root/ext/xsl
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2004-08-10 08:00:06 +0000
committerChristian Stocker <chregu@php.net>2004-08-10 08:00:06 +0000
commit32613f510c1a86317d9267b8f4f2e0445936713a (patch)
treeb0edffd9364e13d57e20d0837dc7f5b6e39a3473 /ext/xsl
parent51505045e6357873c943b099a7828d072e13014a (diff)
downloadphp-git-32613f510c1a86317d9267b8f4f2e0445936713a.tar.gz
Fix segfault on error in xslt
Diffstat (limited to 'ext/xsl')
-rw-r--r--ext/xsl/xsltprocessor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index 58ce3c3240..1ed075a370 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);
}