[wp-trac] [WordPress Trac] #21058: Undefined variable in mw.getRecentPosts
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 23 23:36:56 UTC 2012
#21058: Undefined variable in mw.getRecentPosts
--------------------------+-----------------------------
Reporter: maxcutler | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Awaiting Review
Component: XML-RPC | Version: 1.5
Severity: trivial | Keywords: has-patch
--------------------------+-----------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21058>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list