function isError($value)
	{
		if (!is_object($value)) return false;
		$class = strtolower(get_class($value));
		return $class == 'pear_error' || is_subclass_of($value, 'pear_error') ||
				$class == 'db_error' || is_subclass_of($value, 'db_error');
	}
function isError($value)
	{
		if (!is_object($value)) return false;
		$class = strtolower(get_class($value));
		return $class == 'pear_error' || is_subclass_of($value, 'pear_error') ||
				$class == 'db_error' || is_subclass_of($value, 'db_error');
	}
function isError ( $ value ) { if ( ! is_object ( $ value ) ) return false ; $ class = strtolower ( get_class ( $ value ) ) ; return $ class == 'pear_error' || is_subclass_of ( $ value , 'pear_error' ) || $ class == 'db_error' || is_subclass_of ( $ value , 'db_error' ) ; }
Tell whether a result code from a DB method is an error

@param $value int result code

@return bool whether $value is an error
Tell whether a result code from a DB method is an error