Please do not set this issue to Drupal 8.x to be back-ported later as the function "hook_nodeapi()" does not exist in Drupal 7.x or 8.x.
When using Drupal 6 with PHP 5.3 we get the error below when we pass the $node object by reference to hook_nodeapi().
"warning: Parameter 1 on my_module_nodeapi() expected to be a reference"
In the documentation for hook_nodeapi() we are having $node passed by reference. With Drupal 6 supporting PHP 5.3 we need to remove the & from $node since PHP 5 always passes objects into functions by reference. Which means if we remove this it will not affect our users on PHP 5.2.
Patches will need to be made for contrib modules as they rear their heads with this error. I know I've come across a couple and am going to make patches for them.
Comments
Comment #1
Steven Brown commentedHere's the patch to remove the reference.
Comment #2
Steven Brown commentedForgot to set the status.
Comment #4
tim.plunkettThis patch would need to be against http://drupalcode.org/project/documentation.git/tree/refs/heads/6.x-1.x
Comment #5
Steven Brown commentedThe patch in #1 was made against documentation.git repository version 6.x-1.x. I had unfortunately file this originally under the wrong project. So used to the docs being inside the module files and not stand alone :)
Comment #6
jhodgdonComment #7
jhodgdonWe are not fixing Drupal 6 hook docs any more.