From: stronk7 Date: Sat, 30 Sep 2006 15:51:41 +0000 (+0000) Subject: Using the new table_exists() to initialize tests properly. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3650ba6f5862c6f518980480cdb8737633433ad4;p=moodle.git Using the new table_exists() to initialize tests properly. --- diff --git a/admin/xmldb/actions/test/test.class.php b/admin/xmldb/actions/test/test.class.php index d6f97f607a..fbb210aa89 100644 --- a/admin/xmldb/actions/test/test.class.php +++ b/admin/xmldb/actions/test/test.class.php @@ -74,9 +74,13 @@ class test extends XMLDBAction { /// Silenty drop any previous test tables $table = new XMLDBTable('testtable'); - $status = drop_table($table, true, false); + if (table_exists($table)) { + $status = drop_table($table, true, false); + } $table = new XMLDBTable ('anothertest'); - $status = drop_table($table, true, false); + if (table_exists($table)) { + $status = drop_table($table, true, false); + } /// 1st test. Complete table creation. $table = new XMLDBTable('testtable');