Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#24768 closed defect (bug) (fixed)

get_comment, wp_get_post_revision, get_term all have $null

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

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

Download all attachments as: .zip

Change History (5)

#1 @rmccue
13 years ago

  • Description modified (diff)

#2 @nacin
13 years ago

  • Keywords needs-patch added
  • Milestone Future Release → 3.9

Let's remove them.

#3 @toszcze
13 years ago

  • Keywords has-patch added; needs-patch removed

#4 @wonderboymusic
13 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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.