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

WordPress Trac noreply at wordpress.org
Sat Jan 10 22:18:34 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 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.

 I am the one who added all of those access modifiers in 4.0. Previously,
 most of them classes used PHP4 syntax which defaulted every method and
 property to `public`.

 I made a mistake in the way I went about some of these in 4.0.

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


More information about the wp-trac mailing list