ID: 37212 User updated by: andreasblixt at msn dot com Reported By: andreasblixt at msn dot com Status: Open Bug Type: Class/Object related Operating System: Irrelevant PHP Version: 5.1.2 New Comment:
In addition to the above description I would like to add that the sub-classes CAN access each other's protected variables, if the accessing is done in a shared parent class. Previous Comments: ------------------------------------------------------------------------ [2006-04-26 18:10:02] andreasblixt at msn dot com Description: ------------ In class structures where the sub-classes are extended non-linearly (i.e. multiple classes on the same tier), the sub-classes in different lines cannot access variables defined as protected in a shared parent class in eachother. Reproduce code: --------------- http://pastebin.com/683438 Expected result: ---------------- Tier3A accessing Tier3C... OK! ('Value from Tier3C') Tier3B accessing Tier3C... OK! ('Value from Tier3C') Actual result: -------------- Tier3A accessing Tier3C... OK! ('Value from Tier3C') Tier3B accessing Tier3C... Fatal error: Cannot access protected property Tier3C::$value in protected.php5 on line 31 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37212&edit=1
