Ticket #40704: 40704.diff
| File 40704.diff, 829 bytes (added by , 9 years ago) |
|---|
-
src/wp-includes/rest-api/class-wp-rest-server.php
824 824 $path = $request->get_route(); 825 825 826 826 foreach ( $this->get_routes() as $route => $handlers ) { 827 $match = preg_match( '@^' . $route . '$@i', $path, $ args );827 $match = preg_match( '@^' . $route . '$@i', $path, $matches ); 828 828 829 829 if ( ! $match ) { 830 830 continue; 831 831 } 832 832 833 $args = array(); 834 foreach ( $matches as $param => $value ) { 835 if ( is_int( $param ) ) { 836 continue; 837 } 838 839 $args[ $param ] = $value; 840 } 841 833 842 foreach ( $handlers as $handler ) { 834 843 $callback = $handler['callback']; 835 844 $response = null;