]> 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 Häder <roland@mxchange.org>
Sun, 29 Mar 2020 22:20:15 +0000 (00:20 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
lib/installer.php

index 04d8bb8f35a02a6d156282ecc7bd4aaded6215c5..ee3191019fbc2110d3f88abd7fc60b7bc1654ae5 100644 (file)
@@ -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());
         }