Make WordPress Core

Opened 2 years ago

Closed 22 months ago

#24768 closed defect (bug) (fixed)

get_comment, wp_get_post_revision, get_term all have $null

Reported by: rmccue Owned by: wonderboymusic
Milestone: 3.9 Priority: normal
Severity: minor Version: 3.5
Component: General Keywords: has-patch
Focuses: Cc:

Description (last modified by rmccue)

All of get_comment, wp_get_post_revision and get_term, have $null variables that are set to null and never changed, plus only used once.

These are artifacts from returning by reference, which was removed back in r21792.

Attachments (1)

24768.diff (2.2 KB) - added by toszcze 22 months ago.

Download all attachments as: .zip

Change History (5)

#1 @rmccue
2 years ago

  • Description modified (diff)

#2 @nacin
23 months ago

  • Keywords needs-patch added
  • Milestone changed from Future Release to 3.9

Let's remove them.

22 months ago

#3 @toszcze
22 months ago

  • Keywords has-patch added; needs-patch removed

#4 @wonderboymusic
22 months ago

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

In 27057:

get_comment(), wp_get_post_revision(), and get_term() all used to return by reference. Because of this, $null was set to null so the return value would be a variable where applicable. This has not been necessary since [21792], so the $nulls have been removed.

Props toszcze.
Fixes #24768.

Note: See TracTickets for help on using tickets.