Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004313 [Quercus] minor always 12-01-10 11:18 03-15-13 11:09
Reporter ferg View Status public  
Assigned To nam
Priority normal Resolution unable to reproduce  
Status closed   Product Version
Summary 0004313: php constructor issue
Description (rep by Jonathan Langevin)

  I'm debugging an application, wherein a PHP class extends from a
    parent class.
    The parent class modifies a class property (variable), that the
    child class then accesses, yet finds the property empty.

    If I dump the value of the property in the parent class, it's
    properly filled.
    If I dump the value in the child class, it's an empty string.

    This appears to be an environment-related issue (or config), as
    this works properly on the developer's server (running 32bit java,
    with Resin a couple of point releases older).
    I've also duplicated what is functionally occurring, in a test PHP
    script (child class extending parent, parent setting property,
    child accessing property), under the same webapp, with no issues...
Additional Information php/093p
Attached Files

- Relationships

- Notes
(0004862)
jlangevin
12-01-10 20:04

Just a note, this issue occurred as of 4.0.13, worked fine in 4.0.12
 
(0004887)
jlangevin
01-04-11 17:40

I assume this issue has not been corrected yet?
 
(0004892)
domdorn
01-06-11 13:48

Test case:
abstract class Test {
    protected $var;

    public function __construct() {
        $this->var = 'test';
    }
}

class Test2 extends Test {
    public function __construct() {
        parent::__construct();
        $this->var = 'test2';
        var_dump($this->var);
    }
}

$test = new Test2;

works as expected in current trunk. Is this the behavior you described?

 
(0004893)
jlangevin
01-06-11 14:04

Actually, while that test case basically reflects what appears to be going on, it doesn't actually reproduce the issue.
I ran a similar test case when I reported this issue, and the test functioned fine, so there's an element missing.

The app in question is built on CodeIgniter, and so is likely related to CI somehow...

The app worked fine in Resin 4.0.10-4.0.12, didn't break until 4.0.13, at which point I reverted the server back down to .12.


If there's something further I can do to help reproduce this bug, let me know.
 
(0004894)
domdorn
01-06-11 14:17

we've worked on issues with ZendFramework in 4.0.12 -> 4.0.13 involving accessors of classes.

If you could track down the issue to a certain code fragment in code igniter (lets say with inserting echo/print statements) so we can create a testcase out of that, that would help a lot!
 
(0006107)
nam
12-08-12 02:58

Quercus should work with CodeIgniter now. I was able to run a tutorial app and a public app (http://sourceforge.net/projects/hewarforum/) [^] and things look good.

And with respect to the constructor issue, can you send me the code for the classes in question? Thanks.
 
(0006223)
nam
03-15-13 11:09

Unable to reproduce in 4.0.35.
 

- Issue History
Date Modified Username Field Change
12-01-10 11:18 ferg New Issue
12-01-10 20:03 jlangevin Issue Monitored: jlangevin
12-01-10 20:04 jlangevin Note Added: 0004862
12-02-10 01:48 kdecherf Issue Monitored: kdecherf
01-04-11 17:40 jlangevin Note Added: 0004887
01-06-11 13:48 domdorn Note Added: 0004892
01-06-11 13:48 domdorn Status new => feedback
01-06-11 14:04 jlangevin Note Added: 0004893
01-06-11 14:17 domdorn Note Added: 0004894
12-08-12 02:58 nam Note Added: 0006107
03-15-13 11:08 nam Status feedback => assigned
03-15-13 11:08 nam Assigned To  => nam
03-15-13 11:09 nam Status assigned => closed
03-15-13 11:09 nam Note Added: 0006223
03-15-13 11:09 nam Resolution open => unable to reproduce


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