Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3038 | minor | always | 11-03-08 10:10 | 06-23-12 00:37 | |
|
|||||
Reporter: | ferg | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 4.0.10 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
Summary: | 0003038: Zend framework and static instances | ||||
Description: |
(rep by Daniel Lopez) I think I found something related to the issue, as Quercus seems to have some problems with PHP static members. I created the following test: *************************************** <? class Test { protected static $_instance = null; protected $_variable = null; /** * Singleton instance */ public static function getInstance() { $reflection = new ReflectionClass('Test'); foreach ($reflection->getProperties() as $property) { $name = $property->getName(); echo "Member: ".$name." " } if (null === self::$_instance) { self::$_instance = new self(); } return self::$_instance; } } $testInstance = Test::getInstance(); ?> *************************************** If I execute the test under regular PHP, the result is: --- Member: _instance Member: _variable --- If I execute it under Quercus, I just get --- Member: _variable --- The strange thing is that accessing the $_instance static memeber in this little test works, but a very similar code is inside Zend_Controller_Front class in the Zend framework and there it complains that $_instance has not been declared, even though you can see the declaration a couple of lines above. So, even though is seems it is not the full issue, it seems to be strongly related. In any case, one would say that reflection in Quercus is broken, right? Tested using Resin 3.1.7a and resin 3.2.1. Trying to use Zend in 3.2.1 I don't get the error I was showing above, but a blank page and no error message anywhere. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: | reflection.qa [^] (721 bytes) 09-29-10 08:20 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|