[wp-trac] [WordPress Trac] #62286: Trying to access array offset on null

WordPress Trac noreply at wordpress.org
Tue Oct 22 22:59:06 UTC 2024


#62286: Trying to access array offset on null
--------------------------+-----------------------------
 Reporter:  kkmuffme      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  trivial       |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 PHP notice "Trying to access array offset on null" when doing a wp-admin
 request with WP CLI  --context=admin since we are in eval() and the
 variables are therefore not in global context
 inside
 `function sort_menu( $a, $b ) {`

 for `return ( $default_menu_order[ $a ] <= $default_menu_order[ $b ] ) ?
 -1 : 1;`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62286>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list