Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#21058 closed defect (bug) (fixed)

Undefined variable in mw.getRecentPosts

Reported by: maxcutler's profile maxcutler Owned by: nacin's profile nacin
Milestone: 3.5 Priority: low
Severity: trivial Version: 1.5
Component: XML-RPC Keywords: has-patch commit
Focuses: Cc:

Description

The $struct variable is not defined before being used in mw_getRecentPosts method.

The first reference is within a for loop, and then it is referenced again outside of the for loop, where it is technically undefined. While PHP figures out the intended behavior, this is invalid code and generates notices.

Attachments (1)

21058.patch (436 bytes) - added by maxcutler 14 years ago.

Download all attachments as: .zip

Change History (3)

@maxcutler
14 years ago

#1 @nacin
14 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.5

#2 @nacin
14 years ago

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

In [21158]:

Initialize a variable. props maxcutler. fixes #21058.

Note: See TracTickets for help on using tickets.