Re: Object References Problem
From: Manuel VáZquez Acosta (manu_at_chasqui.cu)
Date: 10/31/03
- Next message: Pete M: "Re: [PHP] Session for creating a unique shopping cart for each user"
- Previous message: Tore E. Mackay: "Re: [PHP] Session for creating a unique shopping cart for each user"
- In reply to: Gareth Williams: "Object References Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: php-general@lists.php.net Date: Fri, 31 Oct 2003 10:06:07 -0500
I think, as for PHP4, that the problem is this function:
> function object_2(&$parent_object)
> {
> $this->my_parent = $parent_object;
> }
Although you are passing the object by reference you're assigning a copy of
it.
Try this:
$this->my_parent = &$parent_object;
Manu.
- Next message: Pete M: "Re: [PHP] Session for creating a unique shopping cart for each user"
- Previous message: Tore E. Mackay: "Re: [PHP] Session for creating a unique shopping cart for each user"
- In reply to: Gareth Williams: "Object References Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|