[wp-trac] [WordPress Trac] #27117: Fatal error in url_to_postid() when $wp_rewrite is null

WordPress Trac noreply at wordpress.org
Wed Feb 12 22:41:40 UTC 2014


#27117: Fatal error in  url_to_postid() when $wp_rewrite is null
---------------------------+------------------------------
 Reporter:  chrishoward    |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Rewrite Rules  |     Version:  3.8.1
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by nacin):

 Hi chrishoward, thanks for the report.

 url_to_postid() requires WP_Rewrite, which means it can't be called before
 the 'init' hook.

 Since this error has always been there, we prefer to keep errors in this
 case. It tells developers that they are doing something wrong. If we
 attempt to suppress this, it will be much harder to debug and doesn't do
 anyone good.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27117#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list