Reviewed & tested by the community
Project:
Menu Subtree Permissions
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2009 at 15:21 UTC
Updated:
21 Feb 2011 at 23:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
realityloop commentedI am getting this also
Comment #2
Marcel20 commentedI have the same error using menu_stp on drupal-6.12-DE.
Comment #3
Marcel20 commentedDid some investigations and as far as I understood this warning is caused by an old (php 4) style of method call using a reference. Found a similar problem somewhere else related to drupal which had been solved by replacing method call
method ( &$var )
by
method ( $var )
So I changed line 27 in menu_stp.module from
_menu_stp_form_alter_menu_edit_item(&$form, &$form_state, $form_id);
to
_menu_stp_form_alter_menu_edit_item($form, $form_state, $form_id);
And luckily it fixed that warning and menu_stp does still work correctly :-)
Comment #4
not_Dries_Buytaert commented@Marcel20: I successfully tested your solution. Thx!
Please, can anyone incorporate this in the next release?
Comment #5
giorgoskPlease review this patch before the maintainer commits it
Comment #6
drasgardian commentedtested and worked ok here.
Should mention that the bug would only be appearing when using php 5.3
Comment #7
game commentedI too am getting this error and am hosting the development site on a Windows Server 2008 R2 IIS7 box which logs the error and displays an error 500 when you try to browse the site. I will try the patch also so thanks for that but would love the maintainer to resolve this issue in the next release :-)
Thanks all
Comment #8
game commentedAfter applying the patch I can now browse the site again and the module is enabled however i cant see any options for setting this, I have followed the documentation but still am not seeing from within the menu items edit page a selection for me to add roles :-/ any ideas on this? Im using the latest ver of Drupal 6, I should also say im running the latest version of PHP5.2.
Any help would be great
Thanks
Comment #9
game commentedproblem resolved simply changed line 27 :-)
Comment #10
giorgosk@GAMe
please explain what is wrong with the patch ?
what did you change ?
what system are you using ?
maybe it will be helpful to others
Comment #11
willowdan commentedThanks a lot. This helped me and my project .. so, this deprecated ways should be noted.
http://dantejarablo.com
Comment #12
greg.harvey+1, patch works.
Comment #13
game commentedHi
I simply followed comment #3 :-)
Comment #14
berdirThe patch removes the & from the function definition. I haven't tried it, but that looks wrong to me, since that makes it impossible for the hook_form_alter() to change $form/$form_state. And after all, that's the sole purpose of that function :)
Instead, you should only remove the & when the function is called, that should be enough. In short, the change on line 27.
Comment #15
greg.harveyBy golly, you're right! Good spot.
All the *other* references need stripping, but not the hook_form_alter one!
Comment #16
berdirAll function definitions need their &, since they are called from within hook_form_alter since they have to modify $form and $form_state too :)
Comment #17
markchitty commentedAny news on this patch ? The latest release and the dev release are identical. cheers.
Comment #18
grendzy commentedcorrected patch
Comment #19
graduns-1 commentedI tested this, and I'm extremely surprised this version of the component made it this long without being patched on something as major as this.
Comment #20
simeTested #18. All good. Also running 5.2, this is a pretty straight-forward fix.
Comment #21
psych0hans commentedHi, my error is "Warning: Call-time pass-by-reference has been deprecated in /home/content/76/6427676/html/erp/sites/default/modules/erp/erp_stock/erp_stock.module on line 743"
you can find the php code in the link below. Can I apply the above solution to this?
http://ideone.com/8ZjIU
Comment #22
lucascaro commentedpatch from #18 is correct. should we mar it as reviewed so it gets in the next release?
Comment #23
sime#21 @psych0hans - your problem has the same error, but it is a problem in the ERP module. You should create an issue in the ERP issue queue to get this fixed.
#22 @lucascaro - yes, it is already marked "reviewed and tested", now we just wait for the maintainer to look at this and hopefully commit the fix. :)
Comment #24
ling19 commentedHi,
#3 works for me. Thanks! :)