Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#5212 closed defect (bug) (fixed)

Unused var/global on xmlrpc

Reported by: g30rg3x's profile g30rg3x Owned by: westi's profile westi
Milestone: 2.5 Priority: low
Severity: trivial Version: 2.3
Component: Optimization Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

Inside the function pingback_ping in the xmlrpc.php file there is a declared global var called "wp_version", but this var is never used inside the function, i think it should be kill like the one in the recently changeset 6250.

Attachments (1)

xmlrpc_unused_var.patch (341 bytes) - added by g30rg3x 18 years ago.

Download all attachments as: .zip

Change History (6)

#1 @josephscott
18 years ago

  • Cc josephscott added

#2 @westi
18 years ago

  • Milestone changed from 2.3.1 to 2.4
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Not a candidate for 2.3.1

#3 follow-up: @anonymized_218323
18 years ago

The global $wp_version exists, but it might not be used in that function. It was probably the intention to use it eventually, but was forgotten over time. So either the variable should be returned by the call or removed.

Did you do any research as to whether it could be used inside the function or should have been?

#4 in reply to: ↑ 3 @g30rg3x
18 years ago

Replying to santosj:
Yes, i know that the $wp_version exists on a top level (created by the inclusion of the file version.php inside wp-settings.php) but my guesses is (as you say) it was intended to be used for a porpoise.

Yes indeed one of my theory's is that it was added because they want to used inside a User-Agent string (like other functions do) when the XMLRPC response either a success or a failure Pingback, but eventually it was forgotten and left behind.

#5 @westi
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [6364] as part of #5418

Note: See TracTickets for help on using tickets.