Home » Web Services » SOAP » Bug #8177
@ error supression not being handled correctly
Details
| Submitted | 2006-07-11 06:09 UTC |
|---|---|
| From | me at calebbrown dot id dot au |
| Assigned | yunosh |
| Status | Bogus |
| Package | SOAP |
| PHP Version | 4.3.11 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-07-11 06:09 UTC] me at calebbrown dot id dot au
Description:
------------
We are using the PEAR::Log library with our own custom
subclasses. Inside the log::factor() method it has an error
suppressed call to include_once().
When we try and instantiate our subclass (already included)
the usual warning PHP issues should be ignored and our class
instantiated.
However, SOAP_Server::_errorHandler() receives the error with
$errno == 2 (E_WARNING) and aborts. When it should detect that
the '@' was used and not report the warning.
A check on the ini setting of 'error_reporting' may solve this
issue (it equals 0 when the '@' operator is used).
[2006-07-11 06:11 UTC] me at calebbrown dot id dot au
BTW, we are trying to instantiate the logging class within a
SOAP server if that wasn't clear.
[2006-07-11 23:59 UTC] me at calebbrown dot id dot au
Just to clarify, the include_once() call is in the factory()
method of the PEAR Logger base class (v1.8.7) and the
failing error handler is in the PEAR SOAP Server base class
(v0.9.4). The problem appears to me to be in the Server base
classes error handler, and not unrelated to how we are using
it.
From what I read on php.net error_reporting() returns 0 when
the @ operator is used - there is no mention of an error
code being 0 that I can see, and in our instance the error
code is set to 2 even when the @ operator is used.