Re: Issues using MDB2 with the DataObject cvs, possible MDB2 problem :)
| From: | Justin Patrin | Date: | Mon, 30 May 2005 16:55:59 +0000 |
| Subject: | Re: Issues using MDB2 with the DataObject cvs, possible MDB2 problem :) | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19418@lists.php.net to get a copy of this message | ||
On 5/29/05, Dan Rossi <pear@electroteque.org> wrote:
>
> On 30/05/2005, at 2:33 PM, Justin Patrin wrote:
> >>
> >
> > This is because the debug methods serialize the result object (and
> > maybe the DB object as well), which calls __sleep. IMHO this really
> > shouldn't be done on live objects for this exact reason. Look for
> > __sleep methods in MDB2 or remove the serialize calls from DO's debug
> > calls.
>
> I just removed the calls to serialize on two of the debug options and
> all seems fine. What should I do about it now , i am trying to make my
> version in sync with cvs , or else when someone updates pear its going
> to break :)
>
> > You need a & above otherwise you're just setting the same variable to
> > two different copies.
>
> Woah that was true for PHP5 too ?
>
That's a simple variable, not an object, so in PHP5 you need the &.
PHP5 only treats Objects as references automatically. Everything else
is the same as PHP4.
--
Justin Patrin