What does "Argument #1 is not an array in _form_set_class()" mean?
For me it happened; when I used 

$form['field']['#attributes'] = array('class' =&gt; 'myclass'); 

While it should be

$form['field']['#attributes'] = array('class' =&gt; array('myclass'));