Ticket #42828: 42828.patch
File 42828.patch, 740 bytes (added by , 7 years ago) |
---|
-
src/wp-includes/rest-api/class-wp-rest-server.php
915 915 if ( is_wp_error( $permission ) ) { 916 916 $response = $permission; 917 917 } elseif ( false === $permission || null === $permission ) { 918 $response = new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to do that.' ), array( 'status' => 403) );918 $response = new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to do that.' ), array( 'status' => rest_authorization_required_code() ) ); 919 919 } 920 920 } 921 921 }