Browse Source

Merge pull request #1560 from DServy/master

Added a more dynamic method for checking dblib (response to ticket #770)
Taylor Otwell 12 years ago
parent
commit
fd1289760f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/database/connectors/sqlserver.php

+ 1 - 1
laravel/database/connectors/sqlserver.php

@@ -30,7 +30,7 @@ class SQLServer extends Connector {
 		$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}";
 		}