On Monday 26 October 2009 17:51:16 Martin Vidner wrote:
>
> KNOWN BUGS:
> - See this query for a complete bug list:

Registration raises an error (did not use the latest code).
You can workaround this by applying the attached patch.


Ciao,
   Daniel

-- 
J. Daniel Schmidt <[email protected]>         SUSE Linux Products GmbH 
Research & Development                   Maxfeldstr. 5
GF: Markus Rex, HRB 16746 (AG Nürnberg)  D-90409 Nürnberg
diff --git a/plugins/registration/app/models/register.rb b/plugins/registration/app/models/register.rb
index 94ebf1f..448a8f8 100644
--- a/plugins/registration/app/models/register.rb
+++ b/plugins/registration/app/models/register.rb
@@ -80,8 +80,8 @@ class Register
     ctx = Hash.new
     args = Hash.new
     begin
-      self.context.each   { |k, v|  ctx[k.to_s] = [ 's', v.to_s ] }
-      self.arguments.each { |k, v| args[k.to_s] = [ 's', v.to_s ] }
+      self.context.each   { |k, v|  ctx[k.to_s] = [ 's', v.to_s ] } if self.context.class == Hash
+      self.arguments.each { |k, v| args[k.to_s] = [ 's', v.to_s ] } if self.arguments.class == Hash
     rescue
       Rails.logger.error "When registration was called, the context or the arguments data was invalid."
       raise InvalidParameters.new :registrationdata => "Invalid"

Reply via email to