[buddypress-trac] [BuddyPress] #4470: BuddyPress Singleton

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Aug 28 00:10:36 UTC 2012


#4470: BuddyPress Singleton
------------------------------+------------------------------
 Reporter:  johnjamesjacoby   |       Owner:  johnjamesjacoby
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  1.7
Component:  Core              |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------------------

Comment (by foxly):

 From the patch...

 {{{
 To prevent unauthorized access, these variables are stored in a private
 array that is magically updated using PHP 5.2+ methods. This is to prevent
 third party plugins from tampering with essential information indirectly,
 which would cause issues later.
 }}}

 Seriously??

 If my team wants to "tamper" with Buddypress, we can, and if necessary we
 will, hook into the WP plugin load process, read your class files in with
 fread(), modify them with preg_replace() and then load them back into
 memory with eval().

 By making it difficult to inspect and modify BP's core variables, the only
 thing you're doing is wasting *everyone's* time (it makes it VERY hard to
 do unit testing) and annoying other plugin developers.

 Yes, make it a singleton, but do NOT start setting methods and variables
 to private ...Buddypress is nowhere near mature enough for that yet.


 -F

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4470#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list