Author: danydb
Date: 2011-06-04 16:24:57 +0200 (Sat, 04 Jun 2011)
New Revision: 4156
Modified:
phpcompta/branches/rel560/include/class_database.php
Log:
Fix bug with debug flag
Modified: phpcompta/branches/rel560/include/class_database.php
===================================================================
--- phpcompta/branches/rel560/include/class_database.php 2011-06-04
10:58:06 UTC (rev 4155)
+++ phpcompta/branches/rel560/include/class_database.php 2011-06-04
14:24:57 UTC (rev 4156)
@@ -126,15 +126,20 @@
$this->sql=$p_string;
$this->array=$p_array;
- if ( $p_array==null )
+ if ( $p_array==null )
{
- $PG_QUERY=(DEBUG==false)?'@pg_query':'pg_query';
- $this->ret=$PG_QUERY($this->db,$p_string);
+ if ( ! DEBUG )
+ $this->ret=pg_query($this->db,$p_string);
+ else
+ $this->ret=@pg_query($this->db,$p_string);
}
else
{
- $PG_QUERY=(DEBUG==false)?'@pg_query_params':'pg_query_params';
- $this->ret=$PG_QUERY($this->db,$p_string,$p_array);
+ if ( ! DEBUG )
+ $this->ret=pg_query_params($this->db,$p_string,$p_array);
+ else
+ $this->ret=@pg_query_params($this->db,$p_string,$p_array);
+
}
if ( ! $this->ret )
{
_______________________________________________
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev