Commit 527d8cd5 authored by Steve Müller's avatar Steve Müller Committed by Marco Pivetta

fix usage of PDO::PGSQL_ATTR_DISABLE_PREPARES for pdo_pgsql extension setups...

fix usage of PDO::PGSQL_ATTR_DISABLE_PREPARES for pdo_pgsql extension setups not built from PHP core

fixes #2249
parent 2a7faab7
......@@ -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