mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-20 09:56:32 +00:00
Only add PDO::PGSQL_ATTR_DISABLE_PREPARES for versions of PHP that support it.
This commit is contained in:
@@ -1130,7 +1130,12 @@ include "root.php";
|
||||
}
|
||||
|
||||
//set the error mode
|
||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION, PDO::PGSQL_ATTR_DISABLE_PREPARES);
|
||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
//reduce prepared statement latency
|
||||
if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES') {
|
||||
$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
|
||||
}
|
||||
|
||||
//execute the query, and return the results
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user