Skip to content

Commit

Permalink
Merge branch 'hotfix/#2273-undefined-pdo-constant-fix-backport-2-5' i…
Browse files Browse the repository at this point in the history
…nto 2.5

Backport #2273 to 2.5
  • Loading branch information
Ocramius committed Jan 5, 2016
2 parents 2a7faab + 527d8cd commit 2bb8c06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function connect(array $params, $username = null, $password = null, array
$driverOptions
);

if (PHP_VERSION_ID >= 50600
if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')
&& (! isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])
|| true === $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]
)
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function createDriver()
*/
private function skipWhenNotUsingPhp56AndPdoPgsql()
{
if (PHP_VERSION_ID < 50600) {
if (! defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
$this->markTestSkipped('Test requires PHP 5.6+');
}

Expand Down

0 comments on commit 2bb8c06

Please sign in to comment.