]> git.mjollnir.org Git - moodle.git/commitdiff
Using the new table_exists() to initialize tests properly.
authorstronk7 <stronk7>
Sat, 30 Sep 2006 15:51:41 +0000 (15:51 +0000)
committerstronk7 <stronk7>
Sat, 30 Sep 2006 15:51:41 +0000 (15:51 +0000)
admin/xmldb/actions/test/test.class.php

index d6f97f607af823f9f02265f1de30c2ba20178674..fbb210aa893201bbbfeb91f2c13be4bac885dcda 100644 (file)
@@ -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');