Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 6 Mar 2018 21:41:42 +0000 (22:41 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 6 Mar 2018 21:41:42 +0000 (22:41 +0100)
- tested $applicationInstance against DatabaseConnector which will never
  trigger the thrown exception on double call of this method

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/bootstrap/class_FrameworkBootstrap.php

index 10cfa76..cb8aaff 100644 (file)
@@ -398,7 +398,7 @@ final class FrameworkBootstrap {
                $applicationInstance = ApplicationHelper::getSelfInstance();
 
                // Is the database instance already set?
-               if ($applicationInstance instanceof DatabaseConnector) {
+               if ($applicationInstance->getDatabaseInstance() instanceof DatabaseConnector) {
                        // Yes, then abort here
                        throw new BadMethodCallException('Method called twice.');
                } // END - if