ZF-3434: PDO_Mssql DSN includes _config['options']
Description
Zend_Db_Adapter_Pdo_Mssql::_dsn() is including $this->_config['options'] in the DSN. Example:
$db = new Zend_Config(array(
'adapter' => 'PDO_Mssql',
'params' => array(
'host' => 'localhost',
'port' => '1433',
'dbname' => 'db',
'username' => 'user',
'password' => 'pass'
)
));
$db = Zend_Db::factory($db);
Results in the following DSN being generated when Zend_Db_Adapter_Pdo_Mssql::_dsn() is called: dblib:host=localhost:1433;dbname=db;options=Array
Fix is addition of the following to along with the other existing unsets() in 'Zend/Db/Adapter/Pdo/Mssql.php':
unset($dsn['username']);
unset($dsn['password']);
unset($dsn['driver_options']);
unset($dsn['options']); // Add me
This bug does not affect functionality since the addition of "options=Array" in the DSN is ignored, but I believe it is invalid none the less.
Comments
Posted by Ralph Schindler (ralph) on 2009-08-21T11:38:42.000+0000
Fixed in r17722
Posted by Ralph Schindler (ralph) on 2009-08-24T10:51:36.000+0000
Fixed in release branch 1.9