cvs: pear /MDB MDB.php
| From: | Lukas Smith | Date: | Tue, 16 Sep 2003 11:10:44 +0000 |
| Subject: | cvs: pear /MDB MDB.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-12771@lists.php.net to get a copy of this message | ||
lsmith Tue Sep 16 07:10:44 2003 EDT
Modified files:
/pear/MDB MDB.php
Log:
return error if nonexisting option is passed
Index: pear/MDB/MDB.php
diff -u pear/MDB/MDB.php:1.68 pear/MDB/MDB.php:1.69
--- pear/MDB/MDB.php:1.68 Mon Sep 8 13:45:38 2003
+++ pear/MDB/MDB.php Tue Sep 16 07:10:44 2003
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB.php,v 1.68 2003/09/08 17:45:38 lsmith Exp $
+// $Id: MDB.php,v 1.69 2003/09/16 11:10:44 lsmith Exp $
//
require_once 'PEAR.php';
@@ -207,7 +207,7 @@
* MDB_Manager This class handles the xml schema management.
*
* @package MDB
- * @version $Id: MDB.php,v 1.68 2003/09/08 17:45:38 lsmith Exp $
+ * @version $Id: MDB.php,v 1.69 2003/09/16 11:10:44 lsmith Exp $
* @category Database
* @author Lukas Smith <smith@backendmedia.com>
*/
@@ -329,7 +329,11 @@
@$db =& new $class_name();
$db->setDSN($dsninfo);
- MDB::setOptions($db, $options);
+ $err = MDB::setOptions($db, $options);
+ if (MDB::isError($err)) {
+ $db->disconnect();
+ return $err;
+ }
if (isset($dsninfo['database'])) {
$err = $db->connect();