Get the following error when I attach a file:

warning: Parameter 2 to wysiwyg_form_alter() expected to be a reference, value given in /home/yancoko/public_html/example.com/includes/common.inc on line 2839.

The file is being uploaded through file attachments option.

Comments

Daniel Norton’s picture

Version: 6.x-2.1 » 6.x-2.x-dev
Component: User interface » Code
Priority: Normal » Minor
Status: Active » Needs review
Issue tags: +php5.3 deprecated
StatusFileSize
new437 bytes

*** OBSOLETE PATCH ***

Daniel Norton’s picture

StatusFileSize
new432 bytes

The attached patch to the dev build removes the warning. There was no underlying error besides the warning, and that warning mechanism shouldn't be enabled on production sites, so I dropped this priority to "minor".

Daniel Norton’s picture

twod’s picture

Status: Needs review » Closed (won't fix)

This is not a bug in Wysiwyg. Instead, fix the module calling drupal_alter() incorrectly (things passed by reference need special treatment, see comment in that function).

A similar issue caused by CCK mentioned in #613480-24: PHP 5.3 Support, which can be fixed using the patch in #705512-1: drupal_alter('form'... called from content_add_more_js needs to pass $form_state as a reference.

memcinto’s picture

According to a backtrace, the module calling drupal_alter() is includes/form.inc, and it is not calling it incorrectly.