Changeset 4559

Show
Ignore:
Timestamp:
06/25/08 03:48:36 (7 months ago)
Author:
jwage
Message:

Fixing Doctrine_Connection::connection() so that blank passwords get passed to PDO as an emptry string. Some dbms drivers error when the passed password is of php type null.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/lib/Doctrine/Connection.php

    r4550 r4559  
    439439    public function connect() 
    440440    { 
    441  
    442441        if ($this->isConnected) { 
    443442            return false; 
     
    455454                try { 
    456455                    $this->dbh = new PDO($this->options['dsn'], $this->options['username'],  
    457                                      $this->options['password'], $this->options['other']); 
    458                                       
     456                                     (!$this->options['password'] ? '':$this->options['password']), $this->options['other']); 
     457 
    459458                    $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 
    460459                } catch (PDOException $e) {