Re: Re: [ANNOUNCEMENT] DB-1.7.13 (stable) Released.

From: Date: Mon, 24 Sep 2007 07:14:30 +0000
Subject: Re: Re: [ANNOUNCEMENT] DB-1.7.13 (stable) Released.
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48151@lists.php.net to get a copy of this message
I was the one who originally proposed the change. My reasons are explained in the bug report <http://pear.php.net/bugs/bug.php?id=11581>. See also the message "[PEAR-DEV] Making old PEAR packages (more) E_STRICT compatible" from 22 September 2007 on this mailinglist. My intention was to suggest a small BC fix. Justin Patrin wrote:
Various PEAR classes *will* break if code is changed to use = rather than =&. You are right - you cannot replace =& with = in general. In many cases, though, it doesn't make a difference whether you use = og =&, and in those cases I suggest using the former in order to be "PHP5 friendly".
The relevant changes are these (did I miss some?): http://cvs.php.net/viewvc.cgi/pear/DB/DB/common.php?r1=1.141&r2=1.142 http://cvs.php.net/viewvc.cgi/pear/DB/DB.php?r1=1.87&r2=1.88 I must admit that I missed the one in line 1202 of DB.php. In general, you cannot be sure that the class specified by $db->fetchmode_object_class does not rely on using references. So it looks as if that may in fact cause problems - sorry :-/. The other occurrences deal with instances of DB_Result and DB_common subclasses, where it doesn't make a difference whether you use =& or = AFAICT. Or did I miss something? If PHP5 friendliness is considered important, the fetchmode_object_class issue can be handled in other ways. Christian

« previous php.pear.dev (#48151) next »