[wp-trac] [WordPress Trac] #30891: Unchecked property overloading is detrimental to OOP.

WordPress Trac noreply at wordpress.org
Sat Jan 10 22:28:35 UTC 2015


#30891: Unchecked property overloading is detrimental to OOP.
--------------------------+------------------
 Reporter:  aercolino     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.2
Component:  General       |     Version:  4.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------

Comment (by jdgrimes):

 Replying to [comment:9 wonderboymusic]:
 > > I think this should be reverted
 >
 > Hook callbacks get called in global scope, '''method''' calls on
 instances, which means those '''methods''' have to be public. The only
 reason there aren't fatal errors now is the magic methods. [emphasis
 added]

 Yes, but these aren't methods. They are properties. Properties don't get
 called. Their values get passed to some other function that calls the
 function represented by that value.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30891#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list