From: Roland Haeder Date: Sat, 23 Aug 2014 11:16:29 +0000 (+0200) Subject: Added additional check. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7ac6bb4bed180dfef1bc41153009788a79804e81;p=quix0rs-gnu-social.git Added additional check. Signed-off-by: Roland Haeder --- 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()); }