PEAR::throwError() BUG
| From: | webmaster at microchip dot ru | Date: | Fri, 24 Jan 2003 16:07:14 +0000 |
| Subject: | PEAR::throwError() BUG | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-12715@lists.php.net to get a copy of this message | ||
Hi all,
I think I found bug in PEAR::throwError() function
(that's in PEAR.php,v 1.52 2003/01/09 15:14:23 ssb)
when it called statically from a class method.
For the test code listed below I got unexpected behavior:
=== test code: ====
class t {
function t()
{
PEAR::throwError('class error');
}
}
new t;
=== result: ====
Fatal error: Call to undefined function: raiseerror() in PEAR.php on line 529
================
=== suggested solution: PEAR.php, line 529 ===
- if (isset($this)) {
+ if (isset($this) && method_exists($this, 'raiseError')) {
================
--
Best regards,
Vlad Borisoff