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 10cfa76a28caa65f2177f1b62a48c9edccc67b15..cb8aaffde3a6b2eb0e4cd97058eb93becc9f8752 100644 (file)
@@ -398,7 +398,7 @@ final class FrameworkBootstrap {
                $applicationInstance = ApplicationHelper::getSelfInstance();
 
                // Is the database instance already set?
                $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
                        // Yes, then abort here
                        throw new BadMethodCallException('Method called twice.');
                } // END - if