From e865c88e890011d59cf4aec2e9a271d7e111e200 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 23 Aug 2014 13:16:29 +0200 Subject: [PATCH] Added additional check. Signed-off-by: Roland Haeder --- lib/installer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/installer.php b/lib/installer.php index cea7d29ec7..9a167618f7 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -293,7 +293,10 @@ abstract class Installer } } - if (!$conn instanceof DB_common) { + if (!is_object($conn)) { + // No object at all + throw new Exception('Fatal error: conn is no object.'); + } elseif (!$conn instanceof DB_common) { // Is not the right instance throw new Exception('Cannot connect to database: ' . $conn->getMessage()); } -- 2.39.2