[wp-trac] [WordPress Trac] #48249: Check for int instead of null in new submenu priority implementation
WordPress Trac
noreply at wordpress.org
Wed Oct 9 09:11:10 UTC 2019
#48249: Check for int instead of null in new submenu priority implementation
--------------------------+-----------------------------
Reporter: david.binda | Owner: audrasjb
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Menus | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------------
Comment (by david.binda):
> I notice at
https://developer.wordpress.org/reference/functions/add_submenu_page/ that
the 6th parameter is an optional callable function. Am I right in assuming
that since I had $petitions['icon_url'] that is what would have thrown the
warning.
I'm referring to the calls which actually pass 7 arguments to the
`add_submenu_page` calls. Eg.:
https://plugins.trac.wordpress.org/browser/speakout/trunk/includes/admin.php#L19
. The 7th param in 5.3 beta is `int $position`, while the code in question
is passing in a string ( `$petitions['icon_url']` ).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48249#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list