Hi,

I think I've found a bug, but please correct me if I'm misunderstanding the code.

I'm using the following function to set $headers['Subject']:

function phptemplate_webform_mail_headers_2($form_values, $node, $sid, $cid)

It gets called and returns as expected. It gets assigned to $headers[$cid] at line 1376. But at 1386 and 1397, $headers['Subject'] is checked directly, without $headers[$cid]['Subject']. So, it can't find the key, and uses the default value. Same thing with To, From, etc.

Finally, in a bunch of places there is $email_subject instead of $subjects[$cid]. I've attached a patch against -2.0 since that's what I'm using, but it looks like it will apply cleanly against -dev as well.

Thanks!
--Andrew

CommentFileSizeAuthor
subject_theme.patch2.54 KBdeviantintegral

Comments

deviantintegral’s picture

Status: Active » Needs review
quicksketch’s picture

Nice, thanks! I'll give it a review shortly.

quicksketch’s picture

Status: Needs review » Fixed

Sweet. Works great, not many users testing that feature quite yet, so thanks for the preemptive fix! I'm trying to get a 2.1 version out shortly so it'll be included in that.

In the future, if you could roll against the 2.x-dev version instead of the latest stable that'd be great. This one applied fine with a little fuzz though. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.