When I accept new/changed terms upon login, I get the following error:

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /var/www/__/includes/entity.inc).

Comments

tuwebo’s picture

Seems to me that this issue is related to this one #1300930: Array passed to user_load() causes warning and looks like has been fixed in dev version.

Looks like the module was loading the user in the old D6 fashion way.

Try to change this line of code in the legal.module line 586:

function legal_login_submit($form, &$form_state) {
  global $user;
  $values = $form_state['values'];
  $user = user_load(array('uid' => $values['uid']));

For this one

function legal_login_submit($form, &$form_state) {
  global $user;
  $values = $form_state['values'];
  $user = user_load($values['uid']);

Please report if that did the trick.

itz_andr3’s picture

also got this warning..
is someone tried #1 code??

itz_andr3’s picture

Status: Active » Needs review

OK, it's worked, no more warning.
Data also recorded.

i read on the similar issue mention above, it's allready on dev

Anonymous’s picture

Status: Needs review » Closed (duplicate)

fixed duplicate, see #1