[pLog-svn] r4993 - plog/branches/lifetype-1.2/class/action

Mark Wu markplace at gmail.com
Mon Mar 5 21:18:18 EST 2007


Hi Jon:

I am not so sure, if you can point the problem to me, I can check it.

The user_id field in MySQL is "INT" and allow "NULL", in mysql 5 strict mode
, the NULL means 0 not '', that why we need to serUserId to fix this.

Mark

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Tuesday, March 06, 2007 3:20 AM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] r4993 - 
> plog/branches/lifetype-1.2/class/action
> 
>  	Is this related to the userid problem that people 
> sometimes have with resources?  Maybe there is another place 
> where we need to call setUserId?
> 
> On Mon, 5 Mar 2007, mark at devel.lifetype.net wrote:
> 
> > Author: mark
> > Date: 2007-03-05 10:36:09 -0500 (Mon, 05 Mar 2007) New 
> Revision: 4993
> >
> > Modified:
> >   plog/branches/lifetype-1.2/class/action/addcommentaction.class.php
> > Log:
> > We need to set the user_id to 0 in add_comment to fulfill 
> Mysql 5 strict mode.
> >
> > Modified: 
> > plog/branches/lifetype-1.2/class/action/addcommentaction.class.php
> > ===================================================================
> > --- 
> plog/branches/lifetype-1.2/class/action/addcommentaction.cl
> ass.php	2007-03-05 10:36:01 UTC (rev 4992)
> > +++ 
> plog/branches/lifetype-1.2/class/action/addcommentaction.cl
> ass.php	2007-03-05 15:36:09 UTC (rev 4993)
> > @@ -183,6 +183,8 @@
> > 			if( $this->_userInfo ) {
> > 				// ...and if so, save the user 
> data in the UserComment object
> > 				$comment->setUser( $this->_userInfo );
> > +			} else {
> > +				$comment->setUserId( 0 );
> > 			}
> >
> > 			// fire an event
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
> 
> --
> Jon Daley
> http://jon.limedaley.com/
> 
> If it weren't for the last minute, nothing would get done.
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list