Mantis - Quercus
Viewing Issue Advanced Details
5788 major always 08-19-14 21:45 01-20-16 01:53
raxis  
 
normal  
new 4.0.36  
open  
none    
none  
0005788: When inheriting protected instance variables the parent class auto created variable
when you create a protected variable in an abstract class and then extend that class. The parent variable assigns value to the protected instance variable in the constructor.

The parent class will auto create the variable and ignore the protected variable of the subclass.

I am using the 4.0.39 version

Output of Quercus:
[brettdutton:.../quercus-4.0.39/WEB-INF/lib]$ java -cp quercus.jar:javamail-141.jar com.caucho.quercus.CliQuercus /Users/brettdutton/Sites/voodoo/QuercusIssue.php
Outside ClassNULL
Paginator::valueOfResparray(4) {
  [0]=>
  string(4) "This"
  [1]=>
  string(2) "is"
  [2]=>
  string(1) "a"
  [3]=>
  string(4) "test"
}
%
Appache and PHP output of the same test case

Outside Classarray(4) {
  [0] =>
  string(4) "This"
  [1] =>
  string(2) "is"
  [2] =>
  string(1) "a"
  [3] =>
  string(4) "test"
}
Paginator::valueOfResparray(4) {
  [0] =>
  string(4) "This"
  [1] =>
  string(2) "is"
  [2] =>
  string(1) "a"
  [3] =>
  string(4) "test"
}
 QuercusIssue.php [^] (556 bytes) 08-19-14 21:45

Notes
(0006471)
raxis   
08-19-14 21:45   
Apologies if this is not Major
(0006472)
raxis   
08-19-14 21:52   
might be a duplicate of bug 0005765
(0006473)
raxis   
08-20-14 00:59   
Just checked the previous version.
This bug was introduced in 4.0.39


[brettdutton:...uercus-4.0-1.38/WEB-INF/lib]$ java -cp cdi-16.jar:javaee-16.jar:javamail-141.jar:resin.jar com.caucho.quercus.CliQuercus /Users/brettdutton/Sites/voodoo/QuercusIssue.php
Outside Classarray(4) {
  [0]=>
  string(4) "This"
  [1]=>
  string(2) "is"
  [2]=>
  string(1) "a"
  [3]=>
  string(4) "test"
}
Paginator::valueOfResparray(4) {
  [0]=>
  string(4) "This"
  [1]=>
  string(2) "is"
  [2]=>
  string(1) "a"
  [3]=>
  string(4) "test"
}
% [brettdutton:...uercus-4.0-1.38/WEB-INF/lib]$
(0006474)
raxis   
08-20-14 01:17   
Tried the latest build quercus-4.0.s140820

and this bug exists here as well

brettdutton:...cus-4.0.s140820/WEB-INF/lib]$ java -cp javamail-141.jar:quercus.jar com.caucho.quercus.CliQuercus /Users/brettdutton/Sites/voodoo/QuercusIssue.php
Outside ClassNULL
Paginator::valueOfResparray(4) {
  [0]=>
  string(4) "This"
  [1]=>
  string(2) "is"
  [2]=>
  string(1) "a"
  [3]=>
  string(4) "test"
}
% [brettdutton:...cus-4.0.s140820/WEB-INF/lib]$ pwd
/Users/brettdutton/Downloads/quercus-4.0.s140820/WEB-INF/lib
(0006672)
raxis   
01-20-16 01:53   
This can be closed.

I have tested with 4.0.47 and it is working