WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#54301 new defect (bug)

It is not possible to set 0 as post title

Reported by: h71 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:

Description

I want to have a post and its title is 0 but when I set 0 as the post title, after saving, it shows (no title).

Attachments (1)

54301.diff (487 bytes) - added by sayedulsayem 7 weeks ago.
patch added.

Download all attachments as: .zip

Change History (4)

This ticket was mentioned in PR #1772 on WordPress/wordpress-develop by sayedulsayem.


7 weeks ago

  • Keywords has-patch added

I want to have a post and its title is 0 but when I set 0 as the post title, after saving, it shows (no title).

Trac ticket: https://core.trac.wordpress.org/ticket/54301

@sayedulsayem
7 weeks ago

patch added.

#2 @sayedulsayem
7 weeks ago

  • Version set to trunk

the title is coming from this function $title = _draft_or_post_title(); . In this function there is an empty check like if ( empty( $title ) ) . This will return false when $title = 0; . Need to change this condition. I added a patch with it.

Committer: Please ignore my PR. I messed up/ something wrong with PR. Please consider this patch.

Last edited 7 weeks ago by sayedulsayem (previous) (diff)

This ticket was mentioned in PR #1773 on WordPress/wordpress-develop by sayedulsayem.


7 weeks ago

0 as post title

Trac ticket: https://core.trac.wordpress.org/ticket/54301

Note: See TracTickets for help on using tickets.