warning: preg_match() expects parameter 2 to be string, array given in /var/www/html/drupal/includes/bootstrap.inc on line 777.
sending invite with two email addresses separated by ','
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | invite-628690.patch | 1.08 KB | christianchristensen |
Comments
Comment #1
christianchristensen commentedThis is a problem where the message is set from the text box on the form, but the $message variable is overwritten by the drupa_mail function in the message to multiple emails loop.
Quickfix - save off the message into another variable before the loop then reset the $message variable on the start of the loop...
(see patch)
Comment #2
altparty commentedtesting
Comment #3
mattyoung commentedwith the path, I get these warnings:
without the patch, I don't get these warnings.
Comment #4
christianchristensen commentedI have just tested this again with a clean install of drupal and the DRUPAL-6--2 of the invite module with token and devel enabled as well. I sent to several emails to [random emails]@example.com and checked the send log of which all had the message (none had 'Array' for the multiple). I also checked my PHP log and saw no warnings.
Could you describe how to replicate the warnings?
Comment #5
mattyoung commentedI tried again and don't get the error anymore.
Comment #6
Kristina-2 commentedHi.
I know it's been "reviewed and tested" but I wanted to make sure you had a report, with what I did that caused the error just in case.
I was sending an invitation to multiple users, and wrote in a personal message. I submitted the invite form and got:
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
url: http://qwodev.kristinahall.ca/user/25/invites/pending
Drupal 6.15
Invite 6.x-2.0-alpha1
I will install dev and see if I experience this when I invite another user later. :)
Comment #7
srobert72 commentedError still exists with Drupal 6.16
warning: preg_match() expects parameter 2 to be string, array given in /home/drupal/includes/bootstrap.inc on line 777.
It appears only on translated pages. It doesn't on pages in default language.
I use Invite 6.x-2.x-dev (2010-Jan-26)
Comment #8
Kristina-2 commentedGot the error in drupal 6.16.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777.
warning: preg_match() expects parameter 2 to be string, array given in /home/kristina/qwodev/includes/bootstrap.inc on line 777
Comment #9
cerup commentedError still exists!
I tried sending two messages seperated by a comment and recieved the error.
If I only send one message the error does not occur; anything more than 1 and it has multiple errors.
The patch from #1 fixes this.
Comment #10
ifuyivara commentedPatch from #1 fixed the problem. thanks!.
Comment #11
preper commentedI have the same problem. I am using 6.x 2.x dev version. I didn't try the patch but when I send multiple invitations I got this error:
warning: preg_match() expects parameter 2 to be string, array given in /includes/bootstrap.inc on line 777 invitationCan it be fixed in new dev version?
Comment #12
j0k3z commentedI am also getting this error using 6x2.xdev
Comment #13
srobert72 commentedPatch#1 changes nothing for me.
Problem still exists, Invite 6.x-2.x-dev and Drupal 6.17
This issue appears in many posts. I'm not sure it is really due to Invite module.
Comment #14
srobert72 commentedHi all, here is a solution:
for Drupal 6.16
http://drupal.org/node/525036#comment-2144000
for Drupal 6.17
http://drupal.org/node/525036#comment-3046610
Comment #15
smk-ka commentedMarking as duplicate of #324945: Warning returned after successfully sending invitations.