|
Mantis - Quercus
|
|
Viewing Issue Advanced Details |
|
|
ID:
|
Category:
|
Severity:
|
Reproducibility:
|
Date Submitted:
|
Last Update:
|
|
4313 |
|
minor |
always |
12-01-10 11:18 |
03-15-13 11:09 |
|
|
Reporter:
|
ferg |
Platform:
|
|
|
|
Assigned To:
|
nam |
OS:
|
|
|
|
Priority:
|
normal |
OS Version:
|
|
|
|
Status:
|
closed |
Product Version:
|
|
|
|
Product Build:
|
|
Resolution:
|
unable to reproduce |
|
|
Projection:
|
none |
|
|
|
|
ETA:
|
none |
Fixed in 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...
|
|
Steps To Reproduce:
|
|
|
Additional Information:
|
php/093p |
| Relationships | |
|
Attached Files:
|
|
|
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. |
|