From 6b5aa0c99760322985af894b4c5267fffdc8abd6 Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 11 Jan 2007 23:13:02 +0000 Subject: [PATCH] --- lib/Doctrine/Db.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Db.php b/lib/Doctrine/Db.php index 20a515fc5..b69462981 100644 --- a/lib/Doctrine/Db.php +++ b/lib/Doctrine/Db.php @@ -100,7 +100,8 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte */ public function __construct($dsn, $user = null, $pass = null) { - if ( ! isset($user)) { + // check the dsn is PEAR-like or not + if ( ! isset($user) && strpos($dsn, '://')) { $a = self::parseDSN($dsn); extract($a); @@ -442,7 +443,7 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte public function commit() { $this->connect(); - + $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::COMMIT); $this->listener->onPreCommit($event);