Commit c85225cd authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixed problem: logic to handle missing table Form was wrong.

parent b817140d
......@@ -65,7 +65,7 @@ class DatabaseUpdate {
private function getDatabaseVersion() {
$row = $this->db->sql("SHOW TABLE STATUS WHERE Name='Form'", ROW_EXPECT_0_1);
if (count($row) == 1) {
if (isset($row['Comment'])) {
$arr = explode('=', $row['Comment']);
if (count($arr) != 2 || $arr[0] != 'Version' || $arr[1] == '') {
return false;
......
......@@ -255,7 +255,7 @@ class DatabaseTest extends AbstractDatabaseTest {
$rc = $this->db->sql($sql, ROW_REGULAR, $dummy, 'fake', $dummy, $stat);
// DB_NUM_ROWS | DB_INSERT_ID | DB_AFFECTED_ROWS
$this->assertEquals(5, $stat[DB_NUM_ROWS]);
$this->assertEquals(6, $stat[DB_NUM_ROWS]);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment