[wp-trac] [WordPress Trac] #21865: Audit call time pass by reference usage

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 4 21:07:43 UTC 2012


#21865: Audit call time pass by reference usage
-----------------------------------+---------------------
 Reporter:  wonderboymusic         |       Owner:  ryan
     Type:  enhancement            |      Status:  closed
 Priority:  normal                 |   Milestone:  3.5
Component:  General                |     Version:
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  has-patch do-not-punt  |
-----------------------------------+---------------------

Comment (by TobiasBg):

 So does this mean that it is now pretty much safe to replace all {{{array(
 &$this, '...' )}}} in an {{{add_filter}}} or {{{add_action}}} call in a
 plugin (that uses a class) with {{{array( $this, '...' )}}}?
 Are there reasons not to do this?

 I'm asking, because when doing a quick grep through code, I still saw
 quite a few {{{array( &$this, '...' )}}} in {{{add_filter}}} or
 {{{add_action}}} calls not being changed. And as this ticket was closed,
 they likely won't be.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21865#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list