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

WordPress Trac noreply at wordpress.org
Thu Dec 21 20:44:37 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         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 This was discussed in #7589. I can't seem to find the plugin that is
 causing this problem. Obviously somebody is making the call to
 get_page_permastruct before $wp_rewrite is being initialized; in my case
 it's on logout and trying to redirect to the logout page.

 It would be a help to wrap the call to $wp_rewrite->get_page_permastruct()
 on line 356, with an if statement that tests for null $wp_rewrite. The
 rest of the code functions if that approach is taken.

 if (!empty($wp_rewrite)) {
            $link = $wp_rewrite->get_page_permastruct();
 }

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


More information about the wp-trac mailing list