[wp-trac] [WordPress Trac] #39432: index.php/wp-json/ does not work

WordPress Trac noreply at wordpress.org
Thu Jan 12 04:56:50 UTC 2017

#39432: index.php/wp-json/ does not work
 Reporter:  ccprog        |       Owner:  rmccue
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.7.2
Component:  REST API      |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
Changes (by rmccue):

 * keywords:   => has-patch


 The issue was that the `$path` being passed in was empty due to
 `untrailingslashit`, but `PATH_INFO` was ''not'' empty. We can fix this by
 ensuring `$path` is never empty: the only case this can happen is when the
 index is being requested.

 [attachment:39432.diff] ensures `$path` is never empty. Note the `empty`
 check at the start of `rest_api_loaded()` already determines that `$path`
 can't actually be empty.

Ticket URL: <https://core.trac.wordpress.org/ticket/39432#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list