WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#34956 closed defect (bug) (fixed)

The default for the `comment_post_ID` in `wp_insert_comment` should be `0` not an empty string

Reported by: rachelbaker Owned by: rachelbaker
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.0
Component: Comments Keywords: needs-patch good-first-bug
Focuses: Cc:
PR Number:

Description

The comment_post_ID column in the database is BIGINT and has a default value of 0. Introduced in r28457.

Attachments (3)

34956.diff (927 bytes) - added by MikeHansenMe 4 years ago.
34956-correct-spacing.diff (927 bytes) - added by juanfra 4 years ago.
Correct spacing after asignation
34956.2.diff (1.6 KB) - added by rabmalin 4 years ago.
default value changes and its doc modified accordingly

Download all attachments as: .zip

Change History (6)

#1 @rachelbaker
4 years ago

  • Milestone changed from Awaiting Review to 4.5

#2 @rachelbaker
4 years ago

  • Keywords needs-unit-tests removed

@MikeHansenMe
4 years ago

@juanfra
4 years ago

Correct spacing after asignation

@rabmalin
4 years ago

default value changes and its doc modified accordingly

#3 @rachelbaker
4 years ago

  • Owner set to rachelbaker
  • Resolution set to fixed
  • Status changed from new to closed

In 35948:

Comments: Use an integer as the default value for comment_post_ID in wp_insert_comment to match database column.

Props MikeHansenMe, juanfra, rabmalin.
Fixes #34956

Note: See TracTickets for help on using tickets.