[support] “Parameter expected to be reference, value given” error in menu page callback

Steve Edwards killshot91 at gmail.com
Thu Mar 1 22:14:42 UTC 2012


I have a custom module that adds a couple action links via menu items:
function monographs_menu() {
  $items['node/%node/clone_comment'] = array(
    'access callback' => 'clone_access_cloning',
    'access arguments' => array(1),
    'page callback' => 'monographs_node_check',
    'page arguments' => array(1, 2),
    'title' => 'Create For Comment version',
    'type' => MENU_LOCAL_ACTION,
  );

  $items['node/%node/clone_authorized'] = array(
    'access callback' => 'clone_access_cloning',
    'access arguments' => array(1),
    'page callback' => 'monographs_node_check',
    'page arguments' => array(1, 2),
    'title' => 'Create Final Authorized version',
    'type' => MENU_LOCAL_ACTION,
  );

  return $items; 
}
and the function signature for the page callback is

  function monographs_node_check(&$node, $type)

On my local machine and my dev server, this all works just peachy. However, on the client's server, with a clone of my db and the repo, whenever this link is clicked on, they get a WSOD and this error in watchdog:

Warning: Parameter 1 to monographs_node_check() expected to be a reference, value given in menu_execute_active_handler() (line 517 of ...\public_html\includes\menu.inc).

Since it's on a remote server that I don't have access to, I can't debug it, but the fact that it works without error on my own local machine and dev server makes it even weirder.

What could be different in the other environment that would cause this error?  I've found some info that it could be related to PHP 5.2 vs 5.3 (in my case, it's working on 5.2, and the client server is on 5.3.8), but I have a feeling there would be a lot more sites having problems if that was the case.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120301/9a7bb2af/attachment-0001.html 


More information about the support mailing list