summaryrefslogtreecommitdiff
path: root/classes/database
diff options
context:
space:
mode:
Diffstat (limited to 'classes/database')
-rw-r--r--classes/database/Postgres.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index 466db5d1..ca649ec7 100644
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -7538,12 +7538,15 @@ class Postgres extends ADODB_base {
*/
if (strlen($query_buf) > 0)
$query_buf .= "\n";
- /* append the line to the query buffer */
- $query_buf .= $subline;
+ $query_buf .= $subline;
+ }
$query_buf .= ';';
+ /* is there anything in the query_buf? */
+ if (trim($query_buf))
+ {
// Execute the query. PHP cannot execute
- // empty queries, unlike libpq
+ // empty queries, unlike libpq
$res = @pg_query($conn, $query_buf);
// Call the callback function for display