[wp-trac] [WordPress Trac] #21309: Introduce WP_Post class
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 28 09:24:03 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 scribu):
Back in http://core.trac.wordpress.org/ticket/16574#comment:18, there was
a problem with `__get()` issuing a notice, caused by get_post() using
references.
Since that's no longer the case, I'm thinking it would be good to convert
`function &__get()` back to `function __get()` since it masks errors
related to arrays. For example:
{{{
$post = get_post();
$post->ancestors[] = 111;
}}}
This will fail silently, which is bad.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21309#comment:55>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list