From: Stefan <son...@ba...> - 2005-11-03 12:45:51
|
Problem after Upgrade to php 4.4.1 lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by reference before there are no errors. How to fix? Regards Stefan |
From: Reini U. <ru...@x-...> - 2005-11-03 13:14:41
|
2005/11/3, Stefan <son...@ba...>: > Problem after Upgrade to php 4.4.1 > lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by > reference > > before there are no errors. How to fix? Remove the reference from the function. |
From: Stefan <son...@ba...> - 2005-11-03 13:30:49
|
thx for the answer can you tell me where to do this? what's the reference? Stefan Reini Urban schrieb: >2005/11/3, Stefan <son...@ba...>: > > >>Problem after Upgrade to php 4.4.1 >>lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by >>reference >> >>before there are no errors. How to fix? >> >> > >Remove the reference from the function. > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. Download >it for free - -and be entered to win a 42" plasma tv or your very own >Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >Phpwiki-talk mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > > > > |
From: Joel U. <uck...@el...> - 2005-11-03 14:18:03
|
Thus spake Stefan: > thx for the answer > > can you tell me where to do this? what's the reference? > > Stefan Line 97 looks like this: $dbh = &$this->_connect(); The reference is created by the ampersand. For the moment, it's unclear to me what purpose the reference here is serving. Hence my question for Reini: Reini: I noticed that in the DbSession code that the db handles are acquired from _connect() using a mix of references and straight assignment (SQL.php and ADODB.php use references only, dba.php uses assignment only, and PDO.php uses a mix of the two). Is there a reason why these aren't uniform? I.e., do any of them actually need to be references? (I don't think so, but I could be wrong.) -- J. |
From: Stefan <son...@ba...> - 2005-11-03 15:00:26
|
thank you, thats the solution for me Stefan Joel Uckelman schrieb: >Thus spake Stefan: > > >>thx for the answer >> >>can you tell me where to do this? what's the reference? >> >>Stefan >> >> > >Line 97 looks like this: > > $dbh = &$this->_connect(); > >The reference is created by the ampersand. For the moment, it's unclear to >me what purpose the reference here is serving. Hence my question for Reini: > > >Reini: I noticed that in the DbSession code that the db handles are acquired >from _connect() using a mix of references and straight assignment (SQL.php >and ADODB.php use references only, dba.php uses assignment only, and PDO.php >uses a mix of the two). Is there a reason why these aren't uniform? I.e., >do any of them actually need to be references? (I don't think so, but I >could be wrong.) > > > |
From: Reini U. <ru...@x-...> - 2005-11-03 18:51:44
|
$dbh =3D &$this->_connect(); will be a problem on newer php's. If it should be a reference, it should be declared in the function definiti= on, beforehand, and not later in the call. Why it's there and why somewhere else I forgot? I'll think of it. dbh should be a ref and not a copy, esp. for ADODB which is quite heavy. 2005/11/3, Stefan <son...@ba...>: > >Line 97 looks like this: > > > > $dbh =3D &$this->_connect(); > > > >The reference is created by the ampersand. For the moment, it's unclear = to > >me what purpose the reference here is serving. Hence my question for Rei= ni: > > > > > >Reini: I noticed that in the DbSession code that the db handles are acqu= ired > >from _connect() using a mix of references and straight assignment (SQL.p= hp > >and ADODB.php use references only, dba.php uses assignment only, and PDO= .php > >uses a mix of the two). Is there a reason why these aren't uniform? I.e.= , > >do any of them actually need to be references? (I don't think so, but I > >could be wrong.) |
From: Joel U. <uck...@el...> - 2005-11-10 13:02:40
|
Thus spake Reini Urban: > $dbh =3D &$this->_connect(); > will be a problem on newer php's. > > If it should be a reference, it should be declared in the function definiti= > on, > beforehand, and not later in the call. > > Why it's there and why somewhere else I forgot? I'll think of it. > dbh should be a ref and not a copy, esp. for ADODB which is quite heavy. That's a good point. If the handle is some awful monstrosity, then we don't want to copy it. Maybe it's the ones which *aren't* references which are the bugs? It's never going to be slower to return a reference than make a copy. In that case, we should have _connect() returning a reference for all of the DbSession backends, yes? If that accords with your intuition of how this should be, I'll do it later today (really only a 30-second job). -- J. |