Re: Re: cvs: pear /DB_DataObject DataObject.php

From: Date: Sat, 12 Mar 2005 11:29:25 +0000
Subject: Re: Re: cvs: pear /DB_DataObject DataObject.php
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36665@lists.php.net to get a copy of this message
agh, not quite awake there.. On Fri, 2005-03-11 at 22:13 -0800, Justin Patrin wrote: > On Sat, 12 Mar 2005 03:45:32 -0000, Alan Knowles <alan_k@php.net> wrote: > > alan_k Fri Mar 11 22:45:32 2005 EDT > > > > Modified files: > > /pear/DB_DataObject DataObject.php > > Log: > > fix bug #3764 PostgreSQL Boolean Doesnt Work (lets see how much code that breaks!) > > > > > > http://cvs.php.net/diff.php/pear/DB_DataObject/DataObject.php?r1=1.335&r2=1.336&ty=u > > Index: pear/DB_DataObject/DataObject.php > > diff -u pear/DB_DataObject/DataObject.php:1.335 pear/DB_DataObject/DataObject.php:1.336 > > --- pear/DB_DataObject/DataObject.php:1.335 Fri Mar 11 22:28:20 2005 > > +++ pear/DB_DataObject/DataObject.php Fri Mar 11 22:45:31 2005 > > @@ -20,7 +20,7 @@ > > * @package DB_DataObject > > * @category DB > > * > > - * $Id: DataObject.php,v 1.335 2005/03/12 03:28:20 alan_k Exp $ > > + * $Id: DataObject.php,v 1.336 2005/03/12 03:45:31 alan_k Exp $ > > */ > > > > /* =========================================================================== > > @@ -519,7 +519,7 @@ > > foreach($array as $k=>$v) { > > $kk = str_replace(".", "_", $k); > > $kk = str_replace(" ", "_", $kk); > > - if (!empty($_DB_DATAOBJECT['CONFIG']['debug'])) { > > + if (!empty($_DB_DATAOBJECT['CONFIG']['debug'])) { > > $this->debug("$kk = ". $array[$k], "fetchrow > > LINE", 3); > > } > > $this->$kk = $array[$k]; > > @@ -3483,8 +3483,16 @@ > > $x = new Date($this->$col); > > > > return $x->format($format); > > + > > + case ($cols[$col] & DB_DATAOBJECT_BOOLEAN): > > + > > + if ($cols[$col] && DB_DATAOBJECT_STR) { > > You sure you mean && here? Seems to me that's always going to be true. > > > + // it's a 't'/'f' ! > > + return ($cols[$col] = 't'); > > Perhaps ==, not = ? > > > + } > > + return (bool) $cols[$col]; > > > > - > > + > > default: > > return sprintf($format,$this->col); > > } > > > > Get some sleep Alan; tired programming is the cause of many bugs. ;-) > > -- > Justin Patrin > -- Alan Knowles <alan@akbkhome.com>

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