original_string: function isError($data, $code = null)
      {
          if (!is_a($data, 'PEAR_Error')) {
              return false;
          }
  
          if (is_null($code)) {
              return true;
          } elseif (is_string($code)) {
              return $data->getMessage() == $code;
          }
  
          return $data->getCode() == $code;
      }
code: function isError($data, $code = null)
      {
          if (!is_a($data, 'PEAR_Error')) {
              return false;
          }
  
          if (is_null($code)) {
              return true;
          } elseif (is_string($code)) {
              return $data->getMessage() == $code;
          }
  
          return $data->getCode() == $code;
      }
code_tokens: function isError ( $ data , $ code = null ) { if ( ! is_a ( $ data , 'PEAR_Error' ) ) { return false ; } if ( is_null ( $ code ) ) { return true ; } elseif ( is_string ( $ code ) ) { return $ data -> getMessage ( ) == $ code ; } return $ data -> getCode ( ) == $ code ; }
docstring: Tell whether a value is a PEAR error.
  
  @param   mixed $data   the value to test
  @param   int   $code   if $data is an error object, return true
  only if $code is a string and
  $obj->getMessage() == $code or
  $code is an integer and $obj->getCode() == $code
  @access  public
  @return  bool    true if parameter is an error
docstring_tokens: Tell whether a value is a PEAR error .