Browse Source

Fix PHP warning for PDO::setAttribute() requires 2 parameters (#6464)

Co-authored-by: Tim Fry <[email protected]>
frytimo 3 years ago
parent
commit
0bc72cf011
1 changed files with 6 additions and 6 deletions
  1. 6 6
      resources/classes/database.php

+ 6 - 6
resources/classes/database.php

@@ -611,7 +611,7 @@ include "root.php";
 
 
 				//reduce prepared statement latency
 				//reduce prepared statement latency
 					if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
 					if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
-						$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
+						$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
 					}
 					}
 
 
 				//prepare the sql and parameters and then execute the query
 				//prepare the sql and parameters and then execute the query
@@ -1140,7 +1140,7 @@ include "root.php";
 
 
 				//reduce prepared statement latency
 				//reduce prepared statement latency
 					if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
 					if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
-						$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
+						$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
 					}
 					}
 
 
 				//execute the query and return the results
 				//execute the query and return the results
@@ -1828,7 +1828,7 @@ include "root.php";
 
 
 											//reduce prepared statement latency
 											//reduce prepared statement latency
 											if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
 											if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
-												$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
+												$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
 											}
 											}
 
 
 											//execute the query and return the results
 											//execute the query and return the results
@@ -1923,7 +1923,7 @@ include "root.php";
 
 
 											//reduce prepared statement latency
 											//reduce prepared statement latency
 											if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
 											if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
-												$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
+												$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
 											}
 											}
 
 
 											//execute the query and return the results
 											//execute the query and return the results
@@ -2093,7 +2093,7 @@ include "root.php";
 
 
 																//reduce prepared statement latency
 																//reduce prepared statement latency
 																if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
 																if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
-																	$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
+																	$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
 																}
 																}
 
 
 																//$prep_statement->bindParam(':domain_uuid', $this->domain_uuid );
 																//$prep_statement->bindParam(':domain_uuid', $this->domain_uuid );
@@ -2225,7 +2225,7 @@ include "root.php";
 
 
 															//reduce prepared statement latency
 															//reduce prepared statement latency
 															if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
 															if (defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) {
-																$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES);
+																$this->db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
 															}
 															}
 
 
 															//execute the query and return the results
 															//execute the query and return the results