Drupal 7 – Legal module error – array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load()

If you meet the following error of the Legal module.
Notice: Undefined variable: options in views_handler_field_locale_language->render()…

The following patch on might help.

Index: legal/legal.module
--- legal/legal.module	(revision 122)
+++ legal/legal.module	(working copy)
@@ -582,7 +582,7 @@
 function legal_login_submit($form, &$form_state) {
   global $user;
   $values = $form_state['values'];
-  $user = user_load(array('uid' => $values['uid']));
+  $user = user_load($values['uid']);
   $redirect = 'user/'. $user->uid;


Seems there are so many problems on the Legal module. We should consider to use the dev release instead of the stable release.

Done =)

Reference: Array passed to user_load() causes warning


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s