[buddypress-trac] [BuddyPress] #3218: patch for removing a few call-time pass-by-reference warnings

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun May 15 21:23:08 UTC 2011


#3218: patch for removing a few call-time pass-by-reference warnings
--------------------------------+-----------------------------
 Reporter:  hran                |      Owner:
     Type:  defect              |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Core                |    Version:  1.2.8
 Keywords:  references,cleanup  |
--------------------------------+-----------------------------
 Call-time pass-by-reference is deprecated in PHP 5.3, but actually is
 deprecated in many hosts prior to PHP 5.3, who setting
 allow_call_time_pass_reference to false. The PHP developers recommend that
 all developers move away from this usage pattern (see
 http://php.net/manual/en/ini.core.php, under
 "allow_call_time_pass_reference").

 I've attached a patch for bp-groups-classes.php. There are many other
 parts of BP where this occurs. To fix each occurrence, however, we need to
 first verify that removing the pass-by-reference wouldn't have undesirable
 side effects (i.e. prevent a required modification to a variable). So far,
 however, it looks like many of the pass-by-references don't actually
 modify the passed variables.

 If you're open to it, I can work on this some more.

 As a related issue I would recommend turning on WP_DEBUG and noting the
 other notices. Each notice in PHP incurs a performance cost even if it
 isn't logged.

-- 
Ticket URL: <https://trac.buddypress.org/ticket/3218>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list