]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added additional check.
authorRoland Haeder <roland@mxchange.org>
Sat, 23 Aug 2014 11:16:29 +0000 (13:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 23 Aug 2014 11:16:29 +0000 (13:16 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
lib/installer.php

index cea7d29ec7df621801ffaeb934fc5fd7462b65ed..9a167618f7db42e8b4069ee759f32e39859833c2 100644 (file)
@@ -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());
         }