]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/installer.php
Introduced isCurrentProfileInScope() which shall check if current profile is
[quix0rs-gnu-social.git] / lib / installer.php
index dc4c7786a8d007c93155ad9f75a85e637f924573..9a167618f7db42e8b4069ee759f32e39859833c2 100644 (file)
@@ -293,6 +293,14 @@ abstract class Installer
             }
         }
 
+        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());
+        }
+
         $res = $this->updateStatus("Creating database tables...");
         if (!$this->createCoreTables($conn)) {
             $this->updateStatus("Error creating tables.", true);