WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #16574, comment 23


Ignore:
Timestamp:
03/05/12 01:34:38 (2 years ago)
Author:
johnjamesjacoby
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16574, comment 23

    initial v1  
    11Replying to [comment:20 scribu]: 
    22> 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. 
    3 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. 
     3Plugins 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; given !WordPress's pluggable nature, it's fitting that it prevent notices where it can.