From 2ebd5967646b577bf8830cbc90b5fdb964709906 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 10 Sep 2006 21:05:55 +0000 Subject: [PATCH] Avoid one minor error when tables hasn't comments to be defined. --- lib/xmldb/classes/generators/XMLDBGenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/xmldb/classes/generators/XMLDBGenerator.class.php b/lib/xmldb/classes/generators/XMLDBGenerator.class.php index e89e998bd6..9fa7d1f475 100644 --- a/lib/xmldb/classes/generators/XMLDBGenerator.class.php +++ b/lib/xmldb/classes/generators/XMLDBGenerator.class.php @@ -171,8 +171,8 @@ class XMLDBgenerator { /// Add the CREATE TABLE to results $results[] = $table; - /// Add comments if specified - if ($this->add_table_comments) { + /// Add comments if specified and it exists + if ($this->add_table_comments && $xmldb_table->getComment()) { $comment = $this->getCommentSQL ($xmldb_table); /// Add the COMMENT to results $results = array_merge($results, $comment); -- 2.39.5