It seems that this version of the module does not validate that the entered emails match the pattern of real email addresses. This allows the user to enter non-email addresses, generating the following error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT u.mail AS mail FROM {users} u WHERE (mail IN ()) ; Array ( ) in _invite_filter_registered_emails() (line 1408 of /localhost/druce/docroot/sites/all/modules/invite/invite.module).

Comments

grasmash’s picture

Hm. It looks like this issue is caused by _invite_filter_registered_emails() being called when count($emails) == 0. I'm not sure how that is happening.

However, if you modify _invite_filter_registered_emails() from:

  if (!is_array($emails)) {
    return NULL;
  }

to:

  if (!is_array($emails) || count($emails) < 1) {
    return NULL;
  }

It fixes the issue. I feel that the problem should be fixed at the source. I.e., the function should never be called. But this is a decent fix for now.

ckng’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Cleaning out old issues.