Anonymous | Login | Signup for a new account | 11-25-2024 01:28 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0003038 | [Quercus] | minor | always | 11-03-08 10:10 | 06-23-12 00:37 | ||||
Reporter | ferg | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 4.0.10 | ||||||
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. |
||||||||
Additional Information | |||||||||
Attached Files | reflection.qa [^] (721 bytes) 09-29-10 08:20 | ||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
40 total queries executed. 32 unique queries executed. |