Call-time pass-by-reference has been deprecated error
| Project: | Nodereferrer Create |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Jump to:
After enabling the module I get the following error twice:
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of nodereferrer_widget(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. ... .com/sites/all/modules/nodereferrer_create/nodereferrer_create.module on line 141
This is the referenced section of code:
/**
* Implementation of hook_widget().
*/
function nodereferrer_create_widget($op, &$node, $field, &$node_field) {
return nodereferrer_widget($op, &$node, $field, &$node_field);
}
By modifying the code to this, the errors go away:
/**
* Implementation of hook_widget().
*/
function nodereferrer_create_widget($op, $node, $field, $node_field) {
return nodereferrer_widget($op, $node, $field, $node_field);
}
I then get the tab, except the tab only loads a new page with no content in the node section at all. Do I have something not setup correctly or am I missing something else?
I really do like what this module is supposed to do.

#1
http://drupal.org/node/208256 marked as duplicate.
The reported of that issue was using PHP 5.2.0. Did that version introduce the change in call-time-pass-by-ref behavior?
I need to verify that all functionality still works with current versions of nodereferrer and cck. If anyone wants to test and propose a soln please do.
#2
The person maintaining and updating the e-journal module seems to be running into these issues rather regularly, but also seems to fix them rather quickly. So if you ask, he or she might give you a workaround for the call-time-pass-by-ref error. I received the same error using PHP 5 with nodereferer.
#3
How can I help you? I'm working on a project where I would really like to use this module, but I'm getting the same error with PHP 5.2.2. I have some programming experience, but none of it in PHP. I found this: http://www.thescripts.com/forum/thread759990.html . But I'm not sure how to begin making the necessary modifications.
#4
subscribung
#5
i can confirm this bug.
the modification posted by the original poster street makes the module work here.
thanks beakergeek724 for the link!!
in my version of nodereferrer nothing has to be changed there.
someone else might test and confirm or deny this.
modify line 141 of nodereferrer_create.module:
/**
* Implementation of hook_widget().
*/
function nodereferrer_create_widget($op, &$node, $field, &$node_field) {
-: return nodereferrer_widget($op, &$node, $field, &$node_field);
+: return nodereferrer_widget($op, $node, $field, $node_field);
}
Versions:
nodereferrer_create.module,v 1.2 2007/08/22 23:09:39
nodereferrer.module,v 1.12 2008/01/31 04:13:00
#6
(this was too fast...)
#7
The "call-time" error disappears with this patch, but I'm not sure how to get this module working (another issue, perhaps).
#8
Well, this has been open forever, so I doubt that it's going to get fixed. However, the patch in #5 is correct and does work properly.