[wp-trac] [WordPress Trac] #16574: Lazy load ancestors
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 5 01:28:16 UTC 2012
#16574: Lazy load ancestors
-------------------------------------+------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.4
Component: Performance | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------
Comment (by johnjamesjacoby):
Replying to [comment:20 scribu]:
> As for the isset() in `__get()`, I'm not sure if it's a good idea to
silently fail if the key doesn't exist.
Plugins like BuddyPress and bbPress don't always load a real $post and
rely on silent failure. The $post global is sometimes set with dummy (or
semi relevant) information to satisfy the bare minimum of !WordPress's API
that expects it to exist. Silent failure is the way the WP_User magic
methods work; !WordPress's pluggable nature makes it seem fitting it act
as the construct to prevent notices where it can.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16574#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list