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=e865c88e890011d59cf4aec2e9a271d7e111e200;p=quix0rs-gnu-social.git Added additional check. Signed-off-by: Roland Haeder --- 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()); }