From 3c0192dbfe88dcc147081f7f7fe4dab201225345 Mon Sep 17 00:00:00 2001
From: zYne <zYne@625475ce-881a-0410-a577-b389adb331d8>
Date: Tue, 16 Jan 2007 17:59:35 +0000
Subject: [PATCH]

---
 draft/Tree.php      | 20 ++++++++++----------
 lib/Doctrine/Db.php |  4 ++++
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/draft/Tree.php b/draft/Tree.php
index 690f5b569..9738d7900 100644
--- a/draft/Tree.php
+++ b/draft/Tree.php
@@ -17,7 +17,7 @@
  * This software consists of voluntary contributions made by many individuals
  * and is licensed under the LGPL. For more information, see
  * <http://www.phpdoctrine.com>.
- */
+ */                   
 /**
  * Doctrine_Tree
  *
@@ -89,20 +89,20 @@ class Doctrine_Tree
         return new $class($table, $options);
     }
 
-	/**
-	 * gets tree attribute value
-	 *		
-	 */     
+    /**
+     * gets tree attribute value
+     *        
+     */     
     public function getAttribute($name)
     {
       return isset($this->options[$name]) ? $this->options[$name] : null;
     }
 
-	/**
-	 * sets tree attribute value
-	 *
-	 * @param mixed			
-	 */    
+    /**
+     * sets tree attribute value
+     *
+     * @param mixed            
+     */
     public function setAttribute($name, $value)
     {
       $this->options[$name] = $value;
diff --git a/lib/Doctrine/Db.php b/lib/Doctrine/Db.php
index 7d1929fc2..0e671705a 100644
--- a/lib/Doctrine/Db.php
+++ b/lib/Doctrine/Db.php
@@ -204,6 +204,10 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
         $this->dbh->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine_Db_Statement', array($this)));
         
         foreach($this->pendingAttributes as $attr => $value) {
+            // some drivers don't support setting this so we just skip it
+            if($attr == PDO::ATTR_DRIVER_NAME) {
+                continue;
+            }
             $this->dbh->setAttribute($attr, $value);
         }