Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add support for dblib PDO driver in quoteValue() #4304

Merged
merged 1 commit into from

2 participants

@fmarquis

PDO for MSSQL has 2 drivers available, but only one has been supported in the changes made for ZF2013-03 (quoteValue() must use the driver)

This change just add the support for dblib driver.

@fmarquis fmarquis Add support for dblib PDO driver in quoteValue()
PDO for MSSQL has 2 drivers available, but only one has been supported in the changes made for ZF2013-03 (quoteValue() must use the driver)

This change just add the support for dblib driver.
0d09dbf
@ralphschindler ralphschindler referenced this pull request from a commit
@ralphschindler ralphschindler Merging PR #4304
Merge branch 'master' of git://github.com/fmarquis/zf2 into fmarquis-master
0903d51
@ralphschindler ralphschindler referenced this pull request from a commit
@ralphschindler ralphschindler Merging PR #4304
Merge branch 'fmarquis-master'
eb29df5
@ralphschindler ralphschindler merged commit 0d09dbf into from
@ralphschindler ralphschindler referenced this pull request from a commit
@ralphschindler ralphschindler Forward #4304
Merge branch 'fmarquis-master' into develop
e25ff30
@ghost Unknown referenced this pull request from a commit
@ralphschindler ralphschindler Merging PR #4304
Merge branch 'master' of git://github.com/fmarquis/zf2 into fmarquis-master
79962b1
@ghost Unknown referenced this pull request from a commit
@ralphschindler ralphschindler Merging PR #4304
Merge branch 'fmarquis-master'
e0f6311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 24, 2013
  1. @fmarquis

    Add support for dblib PDO driver in quoteValue()

    fmarquis authored
    PDO for MSSQL has 2 drivers available, but only one has been supported in the changes made for ZF2013-03 (quoteValue() must use the driver)
    
    This change just add the support for dblib driver.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 library/Zend/Db/Adapter/Platform/SqlServer.php
View
4 library/Zend/Db/Adapter/Platform/SqlServer.php
@@ -34,8 +34,8 @@ public function __construct($driver = null)
public function setDriver($driver)
{
// handle Zend_Db drivers
- if (($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Sqlsrv')
- || (($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'sqlsrv'))
+ if (($driver instanceof Pdo\Pdo && in_array($driver->getDatabasePlatformName(), array('Sqlsrv', 'Dblib')))
+ || (($driver instanceof \PDO && in_array($driver->getAttribute(\PDO::ATTR_DRIVER_NAME), array('sqlsrv', 'dblib'))))
) {
$this->resource = $driver;
return $this;
Something went wrong with that request. Please try again.