Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3141 | major | always | 12-10-08 01:57 | 01-09-09 21:10 | |
|
|||||
Reporter: | mattsecrett | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.2.1 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.0 | ||
|
|||||
Summary: | 0003141: __get() not firing on $object->objects["name"]->value | ||||
Description: |
Hi, Not sure if this is me doing something wrong, but if I have an object that has an array of objects, and I try to access a member variable of one of the child objects, using the format $object->objects["name"]->value, it returns nothing. If, however, I use $object->objects["name"]->__get("value"), it correctly returns the value. See test code below for example. Thanks, Matt ------------------------------- class Test { private $_values; public function __construct() { $this->_values = array(); } public function __get($field) { return $this->_values[$field]; } public function __set($field, $value) { $this->_values[$field] = $value; return true; } public function display($value) { echo "Here it is: $value "; } } function testResin() { $test1 = new Test(); $test1->fields = array(); $test1->fields["field1"] = new Test(); $test1->fields["field1"]->value = "I am field 1"; $test2 = new Test(); $test2->display($test1->fields["field1"]->value); // this fails $test2->display($test1->fields["field1"]->__get("value")); //this works } |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: | quercus_ArgGetValue.zip [^] (3,427 bytes) 01-09-09 07:59 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|