cvs: pear /DB_DataObject DataObject.php
| From: | Alan Knowles | Date: | Tue, 29 Jun 2004 09:55:45 +0000 |
| Subject: | cvs: pear /DB_DataObject DataObject.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21242@lists.php.net to get a copy of this message | ||
alan_k Tue Jun 29 05:55:45 2004 EDT
Modified files:
/pear/DB_DataObject DataObject.php
Log:
fix bug #1704 - not null check when using "null" values
http://cvs.php.net/diff.php/pear/DB_DataObject/DataObject.php?r1=1.266&r2=1.267&ty=u
Index: pear/DB_DataObject/DataObject.php
diff -u pear/DB_DataObject/DataObject.php:1.266 pear/DB_DataObject/DataObject.php:1.267
--- pear/DB_DataObject/DataObject.php:1.266 Tue Jun 29 05:42:13 2004
+++ pear/DB_DataObject/DataObject.php Tue Jun 29 05:55:45 2004
@@ -20,7 +20,7 @@
* @package DB_DataObject
* @category DB
*
- * $Id: DataObject.php,v 1.266 2004/06/29 09:42:13 alan_k Exp $
+ * $Id: DataObject.php,v 1.267 2004/06/29 09:55:45 alan_k Exp $
*/
/* ===========================================================================
@@ -911,7 +911,7 @@
}
- if (strtolower($this->$k) === 'null') {
+ if ((strtolower($this->$k) === 'null') && !($v &
DB_DATAOBJECT_NOTNULL)) {
$rightq .= " NULL ";
continue;
}
@@ -1100,7 +1100,7 @@
}
// special values ... at least null is handled...
- if (strtolower($this->$k) === 'null') {
+ if ((strtolower($this->$k) === 'null') && !($v &
DB_DATAOBJECT_NOTNULL)) {
$settings .= "$kSql = NULL ";
continue;
}
@@ -2139,7 +2139,7 @@
continue;
}
- if (strtolower($this->$k) === 'null') {
+ if ((strtolower($this->$k) === 'null') && !($v &
DB_DATAOBJECT_NOTNULL)) {
$this->whereAdd(" $kSql IS NULL");
continue;
}