mirror of
git://develop.git.wordpress.org/
synced 2025-03-22 04:49:49 +01:00
Coding Standards: Use strict comparison in wp_check_comment_data()
.
Some checks failed
Cleanup Pull Requests / Clean up pull requests (push) Waiting to run
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Determine Matrix (push) Waiting to run
Performance Tests / ${{ matrix.multisite && 'Multisite' || 'Single Site' }} ${{ matrix.memcached && 'Memcached' || 'Default' }} (push) Blocked by required conditions
Performance Tests / Compare (push) Blocked by required conditions
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP 7.2 (push) Waiting to run
PHPUnit Tests / PHP 7.3 (push) Waiting to run
PHPUnit Tests / PHP 7.4 (push) Waiting to run
PHPUnit Tests / PHP 8.0 (push) Waiting to run
PHPUnit Tests / PHP 8.1 (push) Waiting to run
PHPUnit Tests / PHP 8.2 (push) Waiting to run
PHPUnit Tests / PHP 8.3 (push) Waiting to run
PHPUnit Tests / PHP 8.4 (push) Waiting to run
PHPUnit Tests / html-api-html5lib-tests (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from build (push) Waiting to run
Test Build Processes / Core running from src (push) Waiting to run
Test Build Processes / Gutenberg running from build (push) Waiting to run
Test Build Processes / Gutenberg running from src (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
Upgrade Develop Version Tests / Build (push) Waiting to run
Upgrade Develop Version Tests / Upgrade from 4.9 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.5 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.6 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.7 (push) Blocked by required conditions
Upgrade Develop Version Tests / Slack Notifications (push) Blocked by required conditions
Upgrade Develop Version Tests / Failed workflow tasks (push) Blocked by required conditions
Upgrade Tests / 6.6 to latest (push) Has been cancelled
Upgrade Tests / 6.7 to latest (push) Has been cancelled
Upgrade Tests / 6.0 to latest (push) Has been cancelled
Upgrade Tests / 6.1 to latest (push) Has been cancelled
Upgrade Tests / 6.2 to latest (push) Has been cancelled
Upgrade Tests / 6.3 to latest (push) Has been cancelled
Upgrade Tests / 6.4 to latest (push) Has been cancelled
Upgrade Tests / 6.5 to latest (push) Has been cancelled
Upgrade Tests / 5.0 to latest (push) Has been cancelled
Upgrade Tests / 5.1 to latest (push) Has been cancelled
Upgrade Tests / 5.3 to latest (push) Has been cancelled
Upgrade Tests / 5.4 to latest (push) Has been cancelled
Upgrade Tests / 5.5 to latest (push) Has been cancelled
Upgrade Tests / 5.6 to latest (push) Has been cancelled
Upgrade Tests / 5.9 to latest (push) Has been cancelled
Upgrade Tests / 4.1 to latest (push) Has been cancelled
Upgrade Tests / 4.2 to latest (push) Has been cancelled
Upgrade Tests / 4.3 to latest (push) Has been cancelled
Upgrade Tests / 4.4 to latest (push) Has been cancelled
Upgrade Tests / 4.5 to latest (push) Has been cancelled
Upgrade Tests / 4.6 to latest (push) Has been cancelled
Upgrade Tests / 4.7 to latest (push) Has been cancelled
Lint GitHub Actions workflow files / Lint GitHub Action files (push) Has been cancelled
Upgrade Tests / Slack Notifications (push) Has been cancelled
Upgrade Tests / Failed workflow tasks (push) Has been cancelled
Some checks failed
Cleanup Pull Requests / Clean up pull requests (push) Waiting to run
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Determine Matrix (push) Waiting to run
Performance Tests / ${{ matrix.multisite && 'Multisite' || 'Single Site' }} ${{ matrix.memcached && 'Memcached' || 'Default' }} (push) Blocked by required conditions
Performance Tests / Compare (push) Blocked by required conditions
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP 7.2 (push) Waiting to run
PHPUnit Tests / PHP 7.3 (push) Waiting to run
PHPUnit Tests / PHP 7.4 (push) Waiting to run
PHPUnit Tests / PHP 8.0 (push) Waiting to run
PHPUnit Tests / PHP 8.1 (push) Waiting to run
PHPUnit Tests / PHP 8.2 (push) Waiting to run
PHPUnit Tests / PHP 8.3 (push) Waiting to run
PHPUnit Tests / PHP 8.4 (push) Waiting to run
PHPUnit Tests / html-api-html5lib-tests (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from build (push) Waiting to run
Test Build Processes / Core running from src (push) Waiting to run
Test Build Processes / Gutenberg running from build (push) Waiting to run
Test Build Processes / Gutenberg running from src (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
Upgrade Develop Version Tests / Build (push) Waiting to run
Upgrade Develop Version Tests / Upgrade from 4.9 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.5 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.6 (push) Blocked by required conditions
Upgrade Develop Version Tests / Upgrade from 6.7 (push) Blocked by required conditions
Upgrade Develop Version Tests / Slack Notifications (push) Blocked by required conditions
Upgrade Develop Version Tests / Failed workflow tasks (push) Blocked by required conditions
Upgrade Tests / 6.6 to latest (push) Has been cancelled
Upgrade Tests / 6.7 to latest (push) Has been cancelled
Upgrade Tests / 6.0 to latest (push) Has been cancelled
Upgrade Tests / 6.1 to latest (push) Has been cancelled
Upgrade Tests / 6.2 to latest (push) Has been cancelled
Upgrade Tests / 6.3 to latest (push) Has been cancelled
Upgrade Tests / 6.4 to latest (push) Has been cancelled
Upgrade Tests / 6.5 to latest (push) Has been cancelled
Upgrade Tests / 5.0 to latest (push) Has been cancelled
Upgrade Tests / 5.1 to latest (push) Has been cancelled
Upgrade Tests / 5.3 to latest (push) Has been cancelled
Upgrade Tests / 5.4 to latest (push) Has been cancelled
Upgrade Tests / 5.5 to latest (push) Has been cancelled
Upgrade Tests / 5.6 to latest (push) Has been cancelled
Upgrade Tests / 5.9 to latest (push) Has been cancelled
Upgrade Tests / 4.1 to latest (push) Has been cancelled
Upgrade Tests / 4.2 to latest (push) Has been cancelled
Upgrade Tests / 4.3 to latest (push) Has been cancelled
Upgrade Tests / 4.4 to latest (push) Has been cancelled
Upgrade Tests / 4.5 to latest (push) Has been cancelled
Upgrade Tests / 4.6 to latest (push) Has been cancelled
Upgrade Tests / 4.7 to latest (push) Has been cancelled
Lint GitHub Actions workflow files / Lint GitHub Action files (push) Has been cancelled
Upgrade Tests / Slack Notifications (push) Has been cancelled
Upgrade Tests / Failed workflow tasks (push) Has been cancelled
Follow-up to [2894], [28437], [59319]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59975 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ca9f18d83c
commit
7475126055
@ -1287,7 +1287,7 @@ function wp_check_comment_data( $comment_data ) {
|
||||
|
||||
if ( ! empty( $comment_data['user_id'] ) ) {
|
||||
$user = get_userdata( $comment_data['user_id'] );
|
||||
$post_author = $wpdb->get_var(
|
||||
$post_author = (int) $wpdb->get_var(
|
||||
$wpdb->prepare(
|
||||
"SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1",
|
||||
$comment_data['comment_post_ID']
|
||||
@ -1295,7 +1295,7 @@ function wp_check_comment_data( $comment_data ) {
|
||||
);
|
||||
}
|
||||
|
||||
if ( isset( $user ) && ( $comment_data['user_id'] == $post_author || $user->has_cap( 'moderate_comments' ) ) ) {
|
||||
if ( isset( $user ) && ( $comment_data['user_id'] === $post_author || $user->has_cap( 'moderate_comments' ) ) ) {
|
||||
// The author and the admins get respect.
|
||||
$approved = 1;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user