WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #48249, comment 21


Ignore:
Timestamp:
11/17/2019 08:18:16 AM (6 months ago)
Author:
123host
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #48249, comment 21

    initial v1  
    11I have an interesting thing happening.  I have a plugin and in it I create a menu with submenus.
    22
    3 Since 5.3 _some_ users have had an issue with the plugin and the way it calls add_submenu_page.  But only some.
     3Since 5.3 ''some'' users have had an issue with the plugin and the way it calls add_submenu_page.  But only some.
    44
    55I couldn't reproduce this on my sites but have now worked with someone else where it was happening.
     
    3636Note that I assign ''position'' a value not wrapped in quotes.  This is fine on my sites but not on one I looked at.
    3737
    38 It took ages to troubleshoot and discover that on this site it had to be {{{ 'position' => '1'}}} so I changed the code and on my test site it now throw the same error they were having without the quotes. {{{Warning: count(): Parameter must be an array or an object that implements Countable in /home/user/example.com/wp-admin/includes/plugin.php on line 1392}}}    I do love that if you have a look at plugin.php there are actually only 900 or so lines :P
     38It took ages to troubleshoot and discover that on this site instead it had to be {{{ 'position' => '1'}}} - wrapped in quotes - so I changed the code and on my test site it now throw the same error they were having without the quotes. {{{Warning: count(): Parameter must be an array or an object that implements Countable in /home/user/example.com/wp-admin/includes/plugin.php on line 1392}}}    I do love that if you have a look at plugin.php there are actually only 900 or so lines :P
    3939
    4040Is this a problem with my plugin or something going on in the core?