WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 6 weeks ago

#47087 reviewing defect (bug)

flush_rewrite_rules() should check $wp_rewrite->flush_rules() is callable before calling it

Reported by: markjaquith Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords: good-first-bug has-patch
Focuses: Cc:

Description

I ran into this situation:

Uncaught Error: Call to a member function flush_rules() on null

when some code was running flush_rewrite_rules() on shutdown.

flush_rewrite_rules() should do a sanity check before calling, so it never causes a fatal error.

Attachments (1)

47087.diff (455 bytes) - added by bsetiawan88 6 weeks ago.

Download all attachments as: .zip

Change History (3)

#1 @desrosj
7 weeks ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

@bsetiawan88
6 weeks ago

#2 @SergeyBiryukov
6 weeks ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.