Call-time pass-by-reference has been deprecated

agerson - July 2, 2009 - 15:21
Project:Menu Subtree Permissions
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:PHP 5.3
Description

I am getting this at the top of every page with the module enabled:

Warning: Call-time pass-by-reference has been deprecated in /Library/WebServer/Documents/drupaldev/sites/all/modules/menu_stp/menu_stp.module on line 27

Warning: Call-time pass-by-reference has been deprecated in /Library/WebServer/Documents/drupaldev/sites/all/modules/menu_stp/menu_stp.module on line 27

#1

realityloop - July 10, 2009 - 00:26

I am getting this also

#2

Marcel20 - July 10, 2009 - 22:44

I have the same error using menu_stp on drupal-6.12-DE.

#3

Marcel20 - July 12, 2009 - 23:22

Did 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 :-)

#4

not_Dries_Buytaert - August 9, 2009 - 16:05
Status:active» reviewed & tested by the community

@Marcel20: I successfully tested you solution. Thx!
Please, can anyone incorporate this in the next release?

#5

GiorgosK - October 9, 2009 - 19:46
Status:reviewed & tested by the community» needs review

Please review this patch before the maintainer commits it

AttachmentSize
508320.patch 1.73 KB

#6

drasgardian - October 13, 2009 - 05:24

tested and worked ok here.

Should mention that the bug would only be appearing when using php 5.3

#7

GAMe - November 18, 2009 - 13:37

I 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

#8

GAMe - November 18, 2009 - 15:54

After 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

#9

GAMe - November 18, 2009 - 18:42

problem resolved simply changed line 27 :-)

#10

GiorgosK - November 18, 2009 - 23:33

@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

#11

willowdan - November 26, 2009 - 06:16

Thanks a lot. This helped me and my project .. so, this deprecated ways should be noted.
http://dantejarablo.com

 
 

Drupal is a registered trademark of Dries Buytaert.