Skip to content

Commit

Permalink
Make Sqlsrv detection of configuration parameters consistent with the…
Browse files Browse the repository at this point in the history
… same code for Pdo
  • Loading branch information
akrabat committed Mar 5, 2012
1 parent 2094493 commit 08f7e58
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/Zend/Db/Adapter/Driver/Sqlsrv/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,23 @@ public function connect()

$serverName = '.';
$params = array();
foreach ($this->connectionParameters as $cpName => $cpValue) {
switch (strtolower($cpName)) {
foreach ($this->connectionParameters as $key => $value) {
switch (strtolower($key)) {
case 'hostname':
case 'servername':
$serverName = $cpValue;
$serverName = (string) $value;
break;
case 'username':
case 'uid':
$params['UID'] = $cpValue;
$params['UID'] = (string) $value;
break;
case 'password':
case 'pwd':
$params['PWD'] = $cpValue;
$params['PWD'] = (string) $value;
break;
case 'database':
case 'dbname':
$params['Database'] = $cpValue;
$params['Database'] = (string) $value;
break;
}
}
Expand Down

0 comments on commit 08f7e58

Please sign in to comment.