[wp-trac] [WordPress Trac] #50717: rest_no_routes with PHP 7.3

WordPress Trac noreply at wordpress.org
Tue Jul 21 14:29:14 UTC 2020


#50717: rest_no_routes with PHP 7.3
--------------------------+----------------------
 Reporter:  yozana        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by yozana):

 Replying to [comment:2 swissspidy]:
 > The group structure in your regex for the route is invalid.
 >
 > Try `(?P<id>[0-9]+)` instead of `(?P<>[0-9]+)`. Or even  simpler:
 `(?P<id>[\d]+)`
 >
 > Check how `WP_REST_Posts_Controller` registers the routes, and verify
 your regex using something like https://regex101.com/

 Thank you!
 this has indeed solved the problem.

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


More information about the wp-trac mailing list