Anonymous | Login | Signup for a new account | 12-17-2024 08:55 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 | ||||
0003141 | [Quercus] | major | always | 12-10-08 01:57 | 01-09-09 21:10 | ||||
Reporter | mattsecrett | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.2.1 | ||||||
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 } |
||||||||
Additional Information | |||||||||
Attached Files | quercus_ArgGetValue.zip [^] (3,427 bytes) 01-09-09 07:59 | ||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed. 28 unique queries executed. |