[wp-trac] [WordPress Trac] #47087: flush_rewrite_rules() should check $wp_rewrite->flush_rules() is callable before calling it

WordPress Trac noreply at wordpress.org
Wed May 1 00:59:55 UTC 2019


#47087: flush_rewrite_rules() should check $wp_rewrite->flush_rules() is callable
before calling it
---------------------------+-----------------------------
 Reporter:  markjaquith    |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Rewrite Rules  |    Version:
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47087>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list