[wp-trac] [WordPress Trac] #16005: When trying to remove an item from the admin bar, a blank spot is added in lieu of it

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 28 19:47:18 UTC 2010


#16005: When trying to remove an item from the admin bar, a blank spot is added in
lieu of it
----------------------------+------------------
 Reporter:  sorich87        |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  3.1
Component:  Administration  |     Version:  3.1
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by nacin):

 The code around the patch looks like it can be improved.

 First, PHP4 issue with the by-reference variable in the foreach. That
 needs to be removed (and appears useless based on the patch fuzz).

 Scrapping the foreach and doing this should be enough.
 {{{
 if ( isset( $menu->$id ) ) {
    unset( $menu->id );
    return true;
 }
 return false;
 }}}

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


More information about the wp-trac mailing list