Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#21058 closed defect (bug) (fixed)

Undefined variable in mw.getRecentPosts

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


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

Download all attachments as: .zip

Change History (3)

9 years ago

#1 @nacin
9 years ago

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

#2 @nacin
9 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.