]> granicus.if.org Git - php/commitdiff
MFH (Fix segfault on error in xslt)
authorChristian Stocker <chregu@php.net>
Tue, 10 Aug 2004 08:02:00 +0000 (08:02 +0000)
committerChristian Stocker <chregu@php.net>
Tue, 10 Aug 2004 08:02:00 +0000 (08:02 +0000)
ext/xsl/xsltprocessor.c

index e7511c45f5441ec465f32eff01016ad7644afc16..c5ebf1a8792e72e03ee2a0408221442bd83ad037 100644 (file)
@@ -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);
        }