WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#20393 closed defect (bug) (fixed)

Undefined variable in XML-RPC method mt_getRecentPostTitles()

Reported by: duck_ Owned by: duck_
Milestone: 3.4 Priority: normal
Severity: normal Version: 2.3.2
Component: Warnings/Notices Keywords: has-patch
Focuses: Cc:

Description

If there are no editable posts, but some posts do exist then mt_getRecentPostTitles() emits a notice:

Undefined variable: struct on line 4524.

Easily reproducible when running the tests for this method with WP_DEBUG enabled.

Attachments (1)

20393.diff (420 bytes) - added by duck_ 2 years ago.

Download all attachments as: .zip

Change History (2)

duck_2 years ago

comment:1 duck_2 years ago

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

In [20403]:

Prevent notice "Undefined variable: struct" in mt_getRecentPostTitles when posts exist, but none of them are editable. Fixes #20393.

Note: See TracTickets for help on using tickets.