tellafriend shows error message after I send a message

intertik - December 30, 2008 - 03:44
Project:tellafriend
Version:6.x-2.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

After I use the tellafriend form located at http://sitename/tellafriend
the message gets sent, however, I get the following error message:

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/intetub8/public_html/modules/tellafriend/tellafriend.module on line 453.

#1

Militopedia - December 30, 2008 - 20:33

Hi there,

I got the same error message. I am not a programmer but when I changed line 453 of the tellafriend.module from

$message['headers'] = array_merge($message['headers'], $params['headers']);

to

$message['headers'] = array_merge($message['headers']);

there was no error message anymore and everything worked properly. I received the e-mail and the content was ok.

Perhaps the creator of the module has a neater way to solve this problem. By the way, thanks a lot for developing this!

Cheers,
Roger

#2

ryan_courtnage - December 31, 2008 - 15:47
Status:active» needs review

it's better to check if $params['header'] is set, and use it if available. Patch attached

AttachmentSize
tellafriend_arraymerge.module.patch 852 bytes

#3

intertik - January 1, 2009 - 05:35

I applied the answer from Militopedia and worked out fine... thanks!

Plus I have no clue how to install a patch (I tried before without success) but thank you anyways for sending it.
(by the way if you can tell me how to install a patch it'll be great).

------------------------------------------------------------
www.InterTik.com - Online Shopping Directory
Visit Us Before Buying Anything Online!
------------------------------------------------------------

#4

thierry_gd - January 4, 2009 - 16:47
Status:needs review» fixed

Fixed in 6.2.8 version

#5

System Message - January 18, 2009 - 16:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.