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

 
 

Drupal is a registered trademark of Dries Buytaert.