Skip to:

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3218 closed defect (bug) (no action required)

patch for removing a few call-time pass-by-reference warnings

Reported by: hran's profile hran Owned by:
Milestone: 1.2.8 Priority: normal
Severity: normal Version:
Component: Core Keywords:


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, 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.

Attachments (1)

bp-groups-classes.php.diff (3.8 KB) - added by hran 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @DJPaul
13 years ago

Thanks for the patch. I see it was built against the branch (1.2.8) version; our current development trunk, I think, has already addressed most of these. I've looked at these specific ones and they look like they've been corrected in trunk already. Likewise, the PHP notices have been cleared.

Are you up for taking a look at trunk ( and seeing if you can spot anything missed? Thanks

Last edited 13 years ago by DJPaul (previous) (diff)

#2 @DJPaul
13 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Please re-open the ticket if you find any. Closing it to keep the milestones tidy.

#3 @johnjamesjacoby
13 years ago

  • Keywords references cleanup removed
  • Milestone changed from Awaiting Review to 1.2.8
  • Severity set to normal
  • Version 1.2.8 deleted

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.