Merge pull request #1560 from DServy/master

Added a more dynamic method for checking dblib (response to ticket #770)
This commit is contained in:
Taylor Otwell 2013-01-05 11:08:08 -08:00
commit fd1289760f
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ public function connect($config)
$port = (isset($port)) ? ','.$port : '';
//check for dblib for mac users connecting to mssql (utilizes freetds)
if (!empty($dsn_type) and $dsn_type == 'dblib')
if (in_array('dblib',PDO::getAvailableDrivers()))
{
$dsn = "dblib:host={$host}{$port};dbname={$database}";
}