Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#49591 closed enhancement (invalid)

Minor code cleanup

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

Description

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 7 years ago.

Download all attachments as: .zip

Change History (3)

#1 @dontdream
7 years ago

  • Keywords has-patch removed
  • Resolution → invalid
  • Status new → closed

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

#2 @SergeyBiryukov
7 years ago

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