Fix bug #2718862, error when commenting on database
authorRobert Treat <robert@robert-treats-macbook.local>
Sun, 12 Jul 2009 12:03:19 +0000 (08:03 -0400)
committerRobert Treat <robert@robert-treats-macbook.local>
Sun, 12 Jul 2009 12:03:19 +0000 (08:03 -0400)
classes/database/Postgres.php

index 9571b108bba48e71d5e70555920abc1c8aa74e06..de6fb876142131eaecc2555470036f3f95e73953 100755 (executable)
@@ -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);