I get a warning message when calling a view created with 'Draggable Table'-style:

Warning: Call-time pass-by-reference has been deprecated in PATH_TO_MODULE_DIRECTORY\draggableviews\implementations\draggableviews_handler_native.inc on line 14

Also I get an error message in the views administration area when trying to get a preview.

And the best is...
... I found the reason and the solution for this issue.

The reason for the warning message is located in PHP(.ini) configuration:

allow_call_time_pass_reference = Off --> see warning message

allow_call_time_pass_reference = On --> no warning message

(To check your setting call path /admin/reports/status/php)

The solution is to search in your files for &$view (or only &$)
and change it to $view if the variable is used in a function call (and is already a reference!).

E.g. in the above warning message I had to change:

  function init($field_name, &$view) {
    parent::init($field_name, <strong>&$view</strong>);

into

  function init($field_name, &$view) {
    parent::init($field_name, <strong>$view</strong>);

and the warning message has been gone :)

But there are some more places to fix in the implementations for CCK and taxonomy and so on.

I hope that my explanation is clear enough. Otherwise please feel free to ask.

Comments

m_z’s picture

I have to remove the strong tags inside the code snippets:

  function init($field_name, &$view) {
    parent::init($field_name, &$view);

into

  function init($field_name, &$view) {
    parent::init($field_name, $view);

It should underline that only the second occurrence of &$view must be replaced by $view.

drupalina’s picture

changing these lines in draggableviews_handler_native.inc to the ones mentioned in comment#1 got rid of this warning for me.
Is this going to be incorporated in the next .dev and future releases?

sevi’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of #604682: Handler includes use deprecated call-time pass-by-reference.

Is this going to be incorporated in the next .dev and future releases?

I just committed the changes to the 6--3 branch: http://drupal.org/cvs?commit=275424
The next release: ..don't know O_o, soon :)

Greetings,
sevi