[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
Thu Nov 14 22:13:41 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:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  5.3.1
Component:  Administration  |     Version:  5.3
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  ui
----------------------------+---------------------

Comment (by NextScripts):

 If it helps.
 I switched to PHP 5.6.40. Warning was replaced with


 {{{
 <b>Notice</b>:  Undefined index: testPlg in <b>/home/mapcom/public_html
 /wp-admin/includes/plugin.php</b> on line <b>1392</b><br />
 }}}

 Regardles..

 If for the first subMenu I replace testPlg in 5th parameter to testPlg-
 page2 -

 {{{#!php
 <?php
  add_submenu_page(
       'testPlg','SubMenu 1',
       'SubMenu 1', 'manage_options',
       'testPlg','testPlg_shoPage1',
       1
     );
 }}}

 no warnings/notices, but I get duplicate menu item.

 Test|Plugin
 --Test|Plugin
 --Submenu 1
 --Submenu 2

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


More information about the wp-trac mailing list