Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15094 closed defect (bug) (fixed)

Redundant function_exists() check in wp_nav_menu()

Reported by: scribu Owned by:
Milestone: 3.1 Priority: normal
Severity: minor Version:
Component: Menus Keywords:
Focuses: Cc:


When the 'fallback_cb' arg is checked, it calls function_exists() right before is_callable(), which not only is redundant, but also prevents passing a class method as a callback.

Attachments (1)

15094.diff (787 bytes) - added by scribu 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 @scribu5 years ago

  • Severity changed from normal to minor

Ok, it doesn't prevent passing a class method, since it's ORed, but it's still redundant.

@scribu5 years ago

comment:2 @scribu5 years ago

Related: [15772]

comment:3 @scribu5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15774]) Remove redundant call to function_exists() in wp_nav_menu(). Fixes #15094

comment:4 @hakre5 years ago

Related: [15772]

Note: See TracTickets for help on using tickets.