diff options
author | Christian Stocker <chregu@php.net> | 2004-08-10 08:00:06 +0000 |
---|---|---|
committer | Christian Stocker <chregu@php.net> | 2004-08-10 08:00:06 +0000 |
commit | 32613f510c1a86317d9267b8f4f2e0445936713a (patch) | |
tree | b0edffd9364e13d57e20d0837dc7f5b6e39a3473 /ext/xsl | |
parent | 51505045e6357873c943b099a7828d072e13014a (diff) | |
download | php-git-32613f510c1a86317d9267b8f4f2e0445936713a.tar.gz |
Fix segfault on error in xslt
Diffstat (limited to 'ext/xsl')
-rw-r--r-- | ext/xsl/xsltprocessor.c | 5 |
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); } |