From 57683d5b70be2460a767d1385253d787229214e2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 8 Nov 2008 01:19:03 +0000 Subject: Change how the modules table doesn't exist is caught. In running unit test, sometimes i would get the message "There was an SQL error: Table 'gallery3_unittest.modules' doesn't exist - ...." and sometimes I would get the message "Table modules does not exist in your database." In both cases the error code was 44. --- core/helpers/core_installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/helpers/core_installer.php') diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index bbcf9bd1..89d3f515 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -23,7 +23,7 @@ class core_installer { try { $base_version = ORM::factory("module")->where("name", "core")->find()->version; } catch (Exception $e) { - if ($e->getMessage() == "Table modules does not exist in your database.") { + if ($e->getCode() == 44) { $base_version = 0; } else { throw $e; -- cgit v1.2.3