[wp-trac] [WordPress Trac] #17111: Remove unnecessary copy-by-reference in do_action()

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 12 00:59:26 UTC 2011


#17111: Remove unnecessary copy-by-reference in do_action()
-------------------------+-----------------------------
 Reporter:  scribu       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 There's this weird check in do_action():

 {{{
         if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) &&
 is_object($arg[0]) ) // array(&$this)
                 $args[] =& $arg[0];
 }}}

 It was introduced in [4177], probably to fix PHP4 nastiness.

 But, since we're on PHP5 now, the copy-by-reference is not needed anymore.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17111>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list