Re: PHP4 packages using PEAR::isError() vs E_STRICT
| From: | till | Date: | Mon, 31 Oct 2011 15:08:11 +0000 |
| Subject: | Re: PHP4 packages using PEAR::isError() vs E_STRICT | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54554@lists.php.net to get a copy of this message | ||
On Mon, Oct 31, 2011 at 2:07 PM, Daniel O'Connor
<daniel.oconnor@gmail.com>wrote:
> Hey all,
> In some cases; we can side step the E_STRICT warnings causes by calling
> PEAR::isError(). The most obvious method is to instantiate a new PEAR
> object and use it non statically; but
> http://pear.php.net/bugs/bug.php?id=18912 points out another
> way as well.
>
> This can remove the dependency on having PEAR included; at least for error
> checking results which might be returned by other code not under our
> control.
>
> Worth a quick look.
>
This is a nice work-around, but I'm not sure if we shouldn't use instanceof
instead?
A lot of code runs on 5.2 still – E_DEPRECATED is still raised there.
See:
http://docs.php.net/is_a
Till