Commit ceb66430 authored by lucasvanlierop's avatar lucasvanlierop

PG specific attribute PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is now...

PG specific attribute PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is now only set when it is still supported
parent 5edd7eaf
......@@ -33,7 +33,12 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
{
if ($this->running) {
$this->_conn->getWrappedConnection()->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, false);
// PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated in php 5.6. PDO::ATTR_EMULATE_PREPARES should
// be used instead. so should only it be set when it is supported.
if(defined('PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT')) {
$this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, false);
}
}
}
......
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