Hi,

I have the following warning when I try to attach a file to a node, in the edit form:

warning: Parameter 2 to rules_forms_form_alter() expected to be a reference, value given in /var/www/energytic/www/includes/common.inc on line 2839.

So, I modified the rules_forms_form_alter function:

function rules_forms_form_alter(&$form, &$form_state, $form_id) {

to that:

function rules_forms_form_alter(&$form, $form_state, $form_id) {

Is that issue solved in the last estable release?

I am using:
Drupal 6.16
MySQL 5.1.49
PHP 5.3.3-7
Apache/2.2.16 (Debian)

Thanks.

Comments

jordojuice’s picture

Version: 6.x-1.4 » 6.x-1.2
Status: Closed (cannot reproduce) » Active

In general, this should not be done. It doesn't look like an issue with Rules Forms itself. This is a simple hook_form_alter() implementation, so it is a problem elsewhere. Removing the reference in a function definition could potentially cause some actions to fail, though I don't think there are any actions that manipulate $form_state anyways.

EDIT: scratch that, there are actions that set values in $form_state so removing the reference will surely prevent them from working.

fago’s picture

Component: Rules Core » Rules Engine
Status: Active » Closed (cannot reproduce)

That's probably a deprecated bug report, please re-open if this still appears with recent versions.

Methos76’s picture

Version: 6.x-1.2 » 6.x-1.4

Hello,

if the 6.x-1.4 version of rules is considered to be a recent version, than this topic has to be reopened.
I just had the same error message with this version of the module, and it seems to be a special problem with drupal 6.x running on PHP 5.3. ( running Drupal 6.22)

jordojuice’s picture

Version: 6.x-1.2 » 6.x-1.4

Better reopen this then. Still, I don't see how it can be a Rules forms support issue as it's just a hook_form_alter() implementation. Seems like the hook is being called with call_user_func() or something.

tr’s picture

Component: Rules Engine » Rules Core
Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Not sure how this got reopened again - it was closed in #2. Regardless, Drupal 6 is not supported anymore.