Commit 2bb8c066 authored by Marco Pivetta's avatar Marco Pivetta

Merge branch 'hotfix/#2273-undefined-pdo-constant-fix-backport-2-5' into 2.5

Backport #2273 to 2.5
parents 2a7faab7 527d8cd5
......@@ -45,7 +45,7 @@ class Driver extends AbstractPostgreSQLDriver
$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]
)
......
......@@ -107,7 +107,7 @@ class DriverTest extends AbstractPostgreSQLDriverTest
*/
private function skipWhenNotUsingPhp56AndPdoPgsql()
{
if (PHP_VERSION_ID < 50600) {
if (! defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
$this->markTestSkipped('Test requires PHP 5.6+');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment