ID:               33931
 User updated by:  wkonkel at gmail dot com
 Reported By:      wkonkel at gmail dot com
-Status:           No Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5CVS-2005-08-19
 Assigned To:      dmitry
 New Comment:

This is still a problem.


Previous Comments:
------------------------------------------------------------------------

[2006-07-26 09:39:19] christianl at ossafrica dot com

I have the same problem on Apache 2.0.55, PHP 5.1.4. I'm trying to
access object properties with __set and __get. In my application its
difficult to see whats causing it, but this seems to concur with some
of the behaviour I'm getting. (Array values being set to 0). On
occasion the page is output to download instead of parsed and I get a
segmentation fault in Apache. The reproduce code outputs the above
mentioned actual result.

------------------------------------------------------------------------

[2006-01-10 08:46:28] matt at matttoddphoto dot com

I have had the same problem. This is terrible in the sense 
that I'd love to have this work, yet it doesn't. Shame.

When I have:

class Response {
        private $collection;

        public function __set($name, $value) {
                $this->collection[$name] = $value;
        }
        public function __get($name) {
                return $this->collection[$name];
        }
}

The following does not assign anything but empty array()s 
into the private $collection property.

For instance (which is called from within another class, 
hence the $this reference):

foreach($posts as $post) {
        $this->response->posts[$post['id']] = $post;
}


Now,

print_r($this->response->posts);

will output:

Array();

N.B. -- I had not noticed the bizarre activity with the 
properties reappearing in sequence immediately. In fact, I 
couldn't explain the bizarre behavior for two separate, 
nearly-identical loops like this one resulted in all of the 
data in the final of the two. Now I understand why it was 
combining the two. Bizarre indeed!

------------------------------------------------------------------------

[2005-09-24 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2005-09-17 00:48:23] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

I'm unable to replicate it anymore.

------------------------------------------------------------------------

[2005-08-01 09:51:38] [EMAIL PROTECTED]

Dmitry, could you check it plz ?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/33931

-- 
Edit this bug report at http://bugs.php.net/?id=33931&edit=1

Reply via email to