From 2d92e827347afe90e46043addde3ad2e3c0c69a2 Mon Sep 17 00:00:00 2001 From: Robert Treat Date: Sun, 12 Jul 2009 08:03:19 -0400 Subject: [PATCH] Fix bug #2718862, error when commenting on database --- classes/database/Postgres.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 9571b108..de6fb876 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -646,11 +646,13 @@ class Postgres extends ADODB_base { } } - $status = $this->alterDatabaseOwner($newName, $newOwner); - if ($status != 0) { - $this->rollbackTransaction(); - return -2; - } + if ($newOwner != '') { + $status = $this->alterDatabaseOwner($newName, $newOwner); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + } if (trim($comment) != '' ) { $status = $this->setComment('DATABASE', $dbName, '', $comment); -- 2.39.5