Re: PHP 4.0 Bug #8895 Updated: xslt_process() documentation problem
| From: | Sterling Hughes | Date: | Fri, 06 Apr 2001 02:29:03 +0000 |
| Subject: | Re: PHP 4.0 Bug #8895 Updated: xslt_process() documentation problem | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-50990@lists.php.net to get a copy of this message | ||
On Thu, 5 Apr 2001, Chris Adams wrote:
> On 5 Apr 2001 17:05:34 -0700, sterling@php.net <sterling@php.net> wrote:
> >ID: 8895
> >Updated by: sterling
> >Reported By: php-bugs@improbable.org
> >Old-Status: Open
> >Status: Closed
> >Bug Type: Sablotron XSL
> >Assigned To: sterling
> >Comments:
> >
> >The xslt_process() function *does* return false on failure.
> > However, if the error is serious enough, the php script
> >will exit out, as with any of the sablotron functions.
> >Furthermore, it never sends a fatal error if the
> >transformation fails, it sends an error of type E_ERROR for
> >critical sablotron errors transformations and an error of
> >type E_WARNING for warnings.
>
> This sounds like a question of semantics - I consider anything which will cause
> PHP to halt execution with the message "Fatal Error" as a fatal error, even if
> the sablotron extension is doing a RETURN_FALSE internally. Since there's no
> possible way for a PHP developer to trap such an error, it sounds like the
> documentation should be updated to reflect the way xslt_process() actually
> behaves.
>
In some cases you *can* trap the error, that's why its documented as so.
Other cases its not possible (E_WARNING or no error thrown, such as
inability to allocate memory), its the same way with many other functions
in php.
-Sterling