Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#61479 new defect (bug)

Warnings when use remove_menu_page() with a non exist page.

Reported by: jose-lazo's profile Jose Lazo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5.4
Component: Administration Keywords: has-screenshots has-patch
Focuses: administration Cc:


We use Sentry to track bugs in our project and when we use the doc function remove_menu_page() we receive numerous warnings for incorrect use of the foreach loop in the function.

It is necessary to check that each element of the global $menu contains a valid array.

Change History (2)

This ticket was mentioned in PR #6872 on WordPress/wordpress-develop by @narenin.

5 weeks ago

  • Keywords has-patch added

#2 @narenin
5 weeks ago

Hi @jose-lazo

I also able to replicate the same.

Thanks for the detailed information regarding this. I have added the patch for this.

Note: See TracTickets for help on using tickets.