[wp-trac] [WordPress Trac] #48599: Warning: count(): Parameter must be an array or an object that implements Countable in ../wp-admin/includes/plugin.php on line 1392

WordPress Trac noreply at wordpress.org
Sun Nov 17 10:16:15 UTC 2019


#48599: Warning: count(): Parameter must be an array or an object that implements
Countable in ../wp-admin/includes/plugin.php on line 1392
-------------------------------------------------+-------------------------
 Reporter:  ispreview                            |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.3.1
Component:  Administration                       |     Version:  5.3
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-patch needs-        |     Focuses:  ui
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by 123host):

 Replying to [comment:16 garrett-eclipse]:

 > Two workarounds;
 > 1. Having the `$parent_slug` and `$menu_slug` for the `add_submenu_page`
 as unique avoids `$submenu[ $parent_slug ]` being undefined.
 > 2. Not providing the `$position` on the `add_submenu_page` call also
 avoids this as it avoids the reordering code where count is called here -
 https://github.com/WordPress/WordPress/blob/master/wp-
 admin/includes/plugin.php#L1393-L1412


 Number 2 seems to solve this for now.  Thanks

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48599#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list