[wp-trac] [WordPress Trac] #42960: get_page_permastruct call causes 500 error.

WordPress Trac noreply at wordpress.org
Thu Dec 21 23:27:25 UTC 2017


#42960: get_page_permastruct call causes 500 error.
-------------------------------------+------------------------------
 Reporter:  wcwilson1950             |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Rewrite Rules            |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+------------------------------
Changes (by dd32):

 * keywords:   => reporter-feedback close


Comment:

 Before we consider changing this, we'd need to know what/where is calling
 the function.

 You may wish to add logging into the function on your site to detect it:
 {{{
 if ( empty($wp_rewrite) ) {
     trigger_error( __FUNCTION__ . " Called too early by " .
 wp_debug_backtrace_summary(), E_USER_ERROR );
 }
 }}}

 However, In general, we wouldn't change this as in this case, a PHP fatal
 error is the correct result. Fix the plugin/theme/other code which is
 calling the function too early instead.
 Unless the error is being generated by a use-case which is significantly
 common, we're not going to change it.

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


More information about the wp-trac mailing list