cvs: pear /DB_DataObject DataObject.php
| From: | Marco Kaiser | Date: | Tue, 24 Jan 2006 10:20:18 +0000 |
| Subject: | cvs: pear /DB_DataObject DataObject.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-37733@lists.php.net to get a copy of this message | ||
bate Tue Jan 24 10:20:18 2006 UTC
Modified files:
/pear/DB_DataObject DataObject.php
Log:
fixed undefined constant notice with mdb2 driver
http://cvs.php.net/viewcvs.cgi/pear/DB_DataObject/DataObject.php?r1=1.402&r2=1.403&diff_format=u
Index: pear/DB_DataObject/DataObject.php
diff -u pear/DB_DataObject/DataObject.php:1.402 pear/DB_DataObject/DataObject.php:1.403
--- pear/DB_DataObject/DataObject.php:1.402 Mon Jan 23 04:47:33 2006
+++ pear/DB_DataObject/DataObject.php Tue Jan 24 10:20:17 2006
@@ -15,7 +15,7 @@
* @author Alan Knowles <alan@akbkhome.com>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: DataObject.php,v 1.402 2006/01/23 04:47:33 alan_k Exp $
+ * @version CVS: $Id: DataObject.php,v 1.403 2006/01/24 10:20:17 bate Exp $
* @link http://pear.php.net/package/DB_DataObject
*/
@@ -2372,7 +2372,11 @@
$this->debug(serialize($result), 'RESULT',5);
}
if (method_exists($result, 'numrows')) {
- $DB->expectError(DB_ERROR_UNSUPPORTED);
+ if ($_DB_driver == 'DB') {
+ $DB->expectError(DB_ERROR_UNSUPPORTED);
+ } else {
+ $DB->expectError(MDB2_ERROR_UNSUPPORTED);
+ }
$this->N = $result->numrows();
if (is_a($this->N,'PEAR_Error')) {
$this->N = true;