--- PEAR-1.5.4/PEAR.php	2007-05-07 23:10:49.000000000 -0500
+++ PEAR-1.5.4/PEAR.php.new	2007-05-23 16:36:05.699498250 -0500
@@ -278,7 +278,8 @@
      */
     function isError($data, $code = null)
     {
-        if (is_a($data, 'PEAR_Error')) {
+        //if (is_a($data, 'PEAR_Error')) {
+        if ( $data instanceof PEAR_Error ) {
             if (is_null($code)) {
                 return true;
             } elseif (is_string($code)) {
@@ -334,7 +335,8 @@
 
     function setErrorHandling($mode = null, $options = null)
     {
-        if (isset($this) && is_a($this, 'PEAR')) {
+        //if (isset($this) && is_a($this, 'PEAR')) {
+        if ( isset($this) && $this instanceof PEAR ) {
             $setmode     = &$this->_default_error_mode;
             $setoptions  = &$this->_default_error_options;
         } else {
@@ -588,7 +590,8 @@
                          $code = null,
                          $userinfo = null)
     {
-        if (isset($this) && is_a($this, 'PEAR')) {
+        //if (isset($this) && is_a($this, 'PEAR')) {
+        if ( isset($this) && $this instanceof PEAR ) {
             $a = &$this->raiseError($message, $code, null, null, $userinfo);
             return $a;
         } else {
@@ -686,7 +689,8 @@
     function pushErrorHandling($mode, $options = null)
     {
         $stack = &$GLOBALS['_PEAR_error_handler_stack'];
-        if (isset($this) && is_a($this, 'PEAR')) {
+        //if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR ) {
             $def_mode    = &$this->_default_error_mode;
             $def_options = &$this->_default_error_options;
         } else {
@@ -695,7 +699,8 @@
         }
         $stack[] = array($def_mode, $def_options);
 
-        if (isset($this) && is_a($this, 'PEAR')) {
+        //if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR ) {
             $this->setErrorHandling($mode, $options);
         } else {
             PEAR::setErrorHandling($mode, $options);
@@ -720,7 +725,8 @@
         array_pop($stack);
         list($mode, $options) = $stack[sizeof($stack) - 1];
         array_pop($stack);
-        if (isset($this) && is_a($this, 'PEAR')) {
+        //if (isset($this) && is_a($this, 'PEAR')) {
+        if (isset($this) && $this instanceof PEAR ) {
             $this->setErrorHandling($mode, $options);
         } else {
             PEAR::setErrorHandling($mode, $options);
