[wp-trac] [WordPress Trac] #21309: Introduce WP_Post class
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 21 03:30:38 UTC 2012
#21309: Introduce WP_Post class
----------------------------+------------------
Reporter: scribu | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.5
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+------------------
Comment (by nacin):
> get_post() does not handle the case when no arguments are passed and
$GLOBALS['post'] is not a WP_Post. I guarantee code exists that manually
sets the global.
Yeah, I'm looking at that same thing. I was playing with
[attachment:21309.8.diff]. I do think we should definitely modify the
global.
Perhaps it is time to break the reference in get_post( &$post ). There's
also no good reason to have it return by reference anymore either —
objects are byref in PHP5. Doing both of those things should
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21309#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list