Improve single comment endpoint read permissions checks #45811
php-compatibility.yml
on: pull_request
Check PHP compatibility
/
Run compatibility checks
19s
Slack Notifications
/
Cancelled notifications
Slack Notifications
/
Failure notifications
Slack Notifications
/
Fixed notifications
Slack Notifications
/
Success notifications
Failed workflow tasks
Annotations
2 errors and 1 warning
|
Check PHP compatibility / Run compatibility checks
Process completed with exit code 1.
|
|
Check PHP compatibility / Run compatibility checks
Process completed with exit code 2.
|
|
Check PHP compatibility / Run compatibility checks:
src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php#L150
Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: current_user_can( 'edit_post', $post->ID ) {
return new WP_Error(
'rest_comment_not_supported_post_type',
__( 'Sorry, this post type does not support notes.' ),
array( 'status' => 403 )
);
}
|