Make WordPress Core

Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#49591 closed enhancement (invalid)

Minor code cleanup

Reported by: dontdream Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:


In the function get_the_content() after the lines:

	$_post = get_post( $post );

	if ( ! ( $_post instanceof WP_Post ) ) {
		return '';

the additional test:

	if ( null === $post ) {

will always return false, and could be removed for clarity.

Attachments (1)

49591.diff (529 bytes) - added by dontdream 21 months ago.

Download all attachments as: .zip

Change History (3)

21 months ago

#1 @dontdream
21 months ago

  • Keywords has-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

Please ignore - I didn't notice that get_post() could find a post even if $post is null.

#2 @SergeyBiryukov
21 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.