From 7ac6bb4bed180dfef1bc41153009788a79804e81 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 04d8bb8f35..ee3191019f 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -320,7 +320,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.5