From: stronk7 Date: Sun, 10 Sep 2006 21:05:55 +0000 (+0000) Subject: Avoid one minor error when tables hasn't comments to be defined. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2ebd5967646b577bf8830cbc90b5fdb964709906;p=moodle.git Avoid one minor error when tables hasn't comments to be defined. --- 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);