Drupal 6.4, Sept 7 version of -dev module.

After clicking Email this page and filling out the form, the email does get sent. Looks good, too. But the user sees the following warnings:

    * warning: implode() [function.implode]: Bad arguments. in /var/www/html/sites/all/modules/forward/forward.module on line 625.
    * warning: Wrong parameter count for nl2br() in /var/www/html/sites/all/modules/forward/forward.module on line 625.
CommentFileSizeAuthor
#1 forward.patch1.16 KBadzio

Comments

adzio’s picture

StatusFileSize
new1.16 KB

There is a problem with the number of parameters to filter_xss() and implode() is being used instead of explode(). The attached patch made against the latest development snapshot - 2008-Oct-07 - fixes it. If the patch fails against your Sep 7 version, just edit it directly.

neekb’s picture

Just to be clear (because it took me a few minutes to figure this out....)

If you look at the attached forward.patch file, you will see a - before one line and a + before the other.

You want to edit the file 'forward.module' inside the /modules/forward directory, and go to line 628. Remove that line, and replace it with the line that has the + next to it in that forward.patch file.

---

@adzio Thank you very much for the awesome module!

~Nick

adzio’s picture

Status: Active » Needs review

Hi Nick,

I'm not the developer for the Forward module, just an advanced user who encountered the same problem as the original poster and fixed the module code for myself, then shared the solution with the community. You are right, however, that we owe gratitude to the actual authors (http://drupal.org/project/developers/31638) for this great module.

If you are on a Unix platform, you may want to take advantage of the patch utility that does patching of code for you, so that you can avoid manual changes. The process is described at http://drupal.org/patch/apply What I meant by editing the code directly is that the module changed slightly from the Sep 7 version to the Oct one and the attached patch may not automatically apply to every 6.x-1.x-dev release out there because of line number discrepancies caused by code progression, although the actual code change needed is identical.

-Adam

seanr’s picture

Fixed in CVS, should show on d.o some time tonight. Thanks.

seanr’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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