From 53239e5a4f96b62a56d2912d6e1e0e60bcf6d3e7 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 19 Aug 2008 15:36:06 +0000 Subject: Refs #266: Error given if no database has been set up. git-svn-id: https://code.elgg.org/elgg/trunk@2017 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engine') diff --git a/engine/lib/database.php b/engine/lib/database.php index 86044a375..abd3e52a4 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -344,8 +344,14 @@ if (isset($tables)) { return $tables; } - - $result = get_data("show tables"); + + try{ + $result = get_data("show tables"); + } catch (DatabaseException $d) + { + // Likely we can't handle an exception here, so just return false. + return false; + } $tables = array(); -- cgit v1.2.3