Re: Bug #14381: xlst_error causes error with valid XSLT processor instance
| From: | Rasmus Lerdorf | Date: | Fri, 07 Dec 2001 17:33:10 +0000 |
| Subject: | Re: Bug #14381: xlst_error causes error with valid XSLT processor instance | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72874@lists.php.net to get a copy of this message | ||
> At 09:10 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > > the following code causes Apache processes to segfault:
> > >
> > > $xsl_handle = xslt_create();
> > > echo $xsl_handle; // returns a valid xslt processor handle
> > > // $xslData and $xmlData contain valid information
> > > xslt_process($xslData, $xmlData, $result);
> > > echo xslt_error($xsl_handle);
> > > xslt_free($xsl_handle);
> > >
> > > This piece of code also returns a "Warning: Supplied argument is not a
> > > valid XSLT Processor resource in *** on line 27", where line 27 is
> > > "xslt_process($xslData, $xmlData, $result);
> > > "
> >
> >It obviously shouldn't crash, but the first argument to xslt_process()
> >needs to be $xsl_handle in your case. The warning you are seeing is
> >correct.
> >
> >-Rasmus
>
>
> AFAIK (and according to the manual) the first argument to xslt_process()
> should be a string containing the XSL data ($xslData) and not the XSLT
> processor handle. Please advise.
Then the manual is wrong. The code is clearly expecting arguments in this
order:
resource processor,
string xml,
string xsl
-Rasmus