Mantis Bugtracker
  

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

- Relationships

- Notes
(0003817)
nam
02-09-09 07:01

php/520b

Issue does not exist in 4.0.

Reflection has been cleaned up and fully implemented for 4.0.
 
(0004767)
domdorn
09-29-10 07:03

Issue not fixed in current 4.0.10!

Test still reports just
<code>
Member: _instance
</code>

instead of
<code>
Member: _instance
Member: _variable
</code>
 
(0004768)
domdorn
09-29-10 07:04

reopened issue.
 
(0005940)
nam
06-23-12 00:37

php/520b

Fixed for 4.0.29.
 

- Issue History
Date Modified Username Field Change
11-03-08 10:10 ferg New Issue
02-09-09 07:00 nam Status new => assigned
02-09-09 07:00 nam Assigned To  => nam
02-09-09 07:01 nam Status assigned => closed
02-09-09 07:01 nam Note Added: 0003817
02-09-09 07:01 nam Resolution open => unable to reproduce
02-09-09 07:01 nam Fixed in Version  => 4.0.0
03-10-09 21:52 al Issue Monitored: al
09-29-10 07:03 domdorn Assigned To nam => domdorn
09-29-10 07:03 domdorn Status closed => feedback
09-29-10 07:03 domdorn Resolution unable to reproduce => reopened
09-29-10 07:03 domdorn Note Added: 0004767
09-29-10 07:04 domdorn Note Added: 0004768
09-29-10 07:04 domdorn Status feedback => confirmed
09-29-10 07:04 domdorn Resolution reopened => open
09-29-10 07:04 domdorn version 3.2.1 => 4.0.10
09-29-10 08:20 domdorn File Added: reflection.qa
03-22-12 13:43 domdorn Assigned To domdorn =>
06-23-12 00:37 nam Status confirmed => assigned
06-23-12 00:37 nam Assigned To  => nam
06-23-12 00:37 nam Status assigned => closed
06-23-12 00:37 nam Note Added: 0005940
06-23-12 00:37 nam Resolution open => fixed
06-23-12 00:37 nam Fixed in Version 4.0.0 =>


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
40 total queries executed.
32 unique queries executed.
Powered by Mantis Bugtracker