Make WordPress Core

Opened 9 years ago

Closed 9 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's profile rachelbaker Owned by: rachelbaker's profile rachelbaker
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.0
Component: Comments Keywords: needs-patch good-first-bug
Focuses: Cc:

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 9 years ago.
34956-correct-spacing.diff (927 bytes) - added by juanfra 9 years ago.
Correct spacing after asignation
34956.2.diff (1.6 KB) - added by rabmalin 9 years ago.
default value changes and its doc modified accordingly

Download all attachments as: .zip

Change History (6)

#1 @rachelbaker
9 years ago

  • Milestone changed from Awaiting Review to 4.5

#2 @rachelbaker
9 years ago

  • Keywords needs-unit-tests removed

@MikeHansenMe
9 years ago

@juanfra
9 years ago

Correct spacing after asignation

@rabmalin
9 years ago

default value changes and its doc modified accordingly

#3 @rachelbaker
9 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.