Uploaded module, installed and created a simple webform, two fields, email and name. Upon submit, get a fatal error:

Cannot use string offset as an array in webform_confirm_email.module on line 157

Using D6.16, mysql 5.0.90, php 5.2.13.

Comments

timgilmour’s picture

Title: white screen / Cannot use string offset as an array in webform_confirm_email.module on line 157 » fatal error / Cannot use string offset as an array in webform_confirm_email.module on line 157
Robin Millette’s picture

Assigned: Unassigned » Robin Millette

Thanks for the report. I'll look into it.

Robin Millette’s picture

Status: Active » Postponed (maintainer needs more info)

Next time -dev gets rolled out, it should have the fix for this bug. See http://drupal.org/project/cvs/754532

Please confirm that it's fixed so I can close this bug.

kev52’s picture

I have this problem still with the current -dev version?

Robin Millette’s picture

@kev52 Please describe how you use the module and the version of webform you're using.

blueprint’s picture

Same Problem Here.

I belive it may have to be with the assumption that more than one value is passed (an array) ... I'm using an email field with a fixed value.

I have a field, Email, for the user email and the conditional send is a fixed field called 'Target' which is not editable (nor visible for that matter) ....

If I change line 157 to change from first element of array to value of field, I don't get this error. But neither does the mail get hijacked. In effect this is an opt-in for a mail to only one address without a choice where it might go ...

I'm using webform version = "6.x-2.9", drupal 6.17 ...

let me know if this is enough info ... and thanks for the hijaking:)

blueprint’s picture

Hmmm. Now (applying your patch from dev, not my array to value) I also get the following

user warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO webform_confirm_email (hmac, message, submitted) VALUES ('f64db3517220b9d2b64b9adcd666dc86', 'a:8:{s:2:\"id\";s:18:\"webform_submission\";s:2:\"to\";s:18:\"mwa@newthinking.de\";s:4:\"from\";s:34:\"\"Frau\" <info@100prozentzukunft.de>\";s:8:\"language\";O:8:\"stdClass\":11:{s:8:\"language\";s:2:\"en\";s:4:\"name\";s:7:\"English\";s:6:\"native\";s:7:\"English\";s:9:\"direction\";s:1:\"0\";s:7:\"enabled\";s:1:\"1\";s:7:\"plurals\";s:1:\"0\";s:7:\"formula\";s:0:\"\";s:6:\"domain\";s:0:\"\";s:6:\"prefix\";s:2:\"en\";s:6:\"weight\";s:1:\"0\";s:10:\"javascript\";s:0:\"\";}s:6:\"params\";a:3:{s:7:\"message\";s:754:\"Verfasst am 07/12/2010 - 17:00\nVerfasst von Benutzer: mwasheim [85.183.32.145]\n\nDiese Werte wurden eingegeben:\n\n Anrede: Frau\n Nachname: Washeim\n Vorname: Mark\n PLZ: 10179\n Ort: Berlin\n E-Mail: blueprint@poetaster.de\n ALT-E-Mail:\n Telefon:\n Mein Status: Ich vertrete ein Unternehmen und möchte gerne für die Energiezukunft aktiv werden\n So kann ich als Multiplikator aktiv werden: test\n Ich schlage folgende/s Organisation/Unternehmen als Partner vor:\n Ihr Projekt, Anregungen oder Feedback:\n Bitte senden Sie mir weitere Informationen über die Arbeit von Germanwatch per Newsletter: Ja\n ziel: info@100prozentzukunft.de\n\nDie Ergebnisse dieser Eingabe können eingesehen werden unter:\nhttp://www.100prozentzukunft.de/node/10/submission/38\";s:7:\"subject\";s:128:\"Formulareingabe von: Energiezukunft und Klimaschutz gehen uns alle an. Werden Sie Teil der Kampagne und gestalten Sie Zukunft! \";s:7:\"headers\";a:1:{s:8:\"X-Mailer\";s:27:\"Drupal Webform (PHP/5.2.11)\";}}s:7:\"subject\";s:128:\"Formulareingabe von: Energiezukunft und Klimaschutz gehen uns alle an. Werden Sie Teil der Kampagne und gestalten Sie Zukunft! \";s:4:\"body\";a:1:{i:0;s:754:\"Verfasst am 07/12/2010 - 17:00\nVerfasst von Benutzer: mwasheim [85.183.32.145]\n\nDiese Werte wurden eingegeben:\n\n Anrede: Frau\n Nachname: Washeim\n Vorname: Mark\n PLZ: 10179\n Ort: Berlin\n E-Mail: blueprint@poetaster.de\n ALT-E-Mail:\n Telefon:\n Mein Status: Ich vertrete ein Unternehmen und möchte gerne für die Energiezukunft aktiv werden\n So kann ich als Multiplikator aktiv werden: test\n Ich schlage folgende/s Organisation/Unternehmen als Partner vor:\n Ihr Projekt, Anregungen oder Feedback:\n Bitte senden Sie mir weitere Informationen über die Arbeit von Germanwatch per Newsletter: Ja\n ziel: info@100prozentzukunft.de\n\nDie Ergebnisse dieser Eingabe können eingesehen werden unter:\nhttp://www.100prozentzukunft.de/node/10/submission/38\";}s:7:\"headers\";a:8:{s:12:\"MIME-Version\";s:3:\"1.0\";s:12:\"Content-Type\";s:51:\"text/plain; charset=UTF-8; format=flowed; delsp=yes\";s:25:\"Content-Transfer-Encoding\";s:4:\"8Bit\";s:8:\"X-Mailer\";s:27:\"Drupal Webform (PHP/5.2.11)\";s:9:\"Errors-To\";s:25:\"info@100prozentzukunft.de\";s:11:\"Return-Path\";s:25:\"info@100prozentzukunft.de\";s:6:\"Sender\";s:25:\"info@100prozentzukunft.de\";s:4:\"From\";s:34:\"\"Frau\" <info@100prozentzukunft.de>\";}}', '1970-01-01 00:00:00') in /kunden/287791_53113/webseiten/includes/common.inc on line 3477.
blueprint’s picture

Me, again:

The form:

Name	Typ	Wert	Erforderlich	E-Mail-Adresse
 
Anrede	Auswählen	-	
	
 
Nachname	textfield	-	
	
 
Vorname	textfield	-	
	
 
PLZ	textfield	-	
	
 
Ort	textfield	-	
	
 
E-Mail	email	-	
	
 
ALT-E-Mail	textfield	-	
	
 
Telefon	textfield	-	
	
 
Mein Status	Auswählen	-	
	
 
So kann ich als Multiplikator aktiv werden	textarea	-	
	
 
Ich schlage folgende/s Organisation/Unternehmen als Partner vor	textarea	-	
	
 
Ihr Projekt, Anregungen oder Feedback	textarea	-	
	
 
Bitte senden Sie mir weitere Informationen über die Arbeit von Germanwatch per Newsletter	Auswählen	-	
	
 
ziel	email	info@100prozentzukunft.de	
	

The E-mail field is the one using your opt-in flag. The conditional recepient is 'ziel' ....

Perhaps I'm missing something in the setup of the conditional recipients?

blueprint’s picture

Ok, I noticed that I had not in every case had both the E-mail of the Sender and the Target email enabled at the same time in the Webform Conditional settings. The error message above is the consequence of setting the value for how many submissions are allowed. Any other value than unlimited seems to lead to this...

I also moved to dev ... and had replaced the field (Target mail to) with a select which simply only has one line (email|name)

Thanks for the great hijaking!

Robin Millette’s picture

Thanks for the report, blueprint. I will take a look this week, asap.

[UPDATE] Ok, well, this week.

jusyjim’s picture

Status: Postponed (maintainer needs more info) » Active

subscribing

brunodbo’s picture

Priority: Normal » Critical

Same problem here, using Drupal 6.19, Webform 6.x-3.2 and the latest dev version of Webform Confirm Email Address.

Marking this as critical, since the module doesn't work together anymore with (the latest) Webform.

Robin Millette’s picture

Status: Active » Closed (won't fix)

The 2.x version was replaced with 3.x to work with new Webform. I am closing this bug. Until I release the new version, you can find it here:
http://drupal.org/node/889226#comment-3636084