From: Roland Häder Date: Tue, 6 Mar 2018 21:41:42 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=31187ee9454944f638939eca8686b3d48f6769e6;p=core.git Continued: - tested $applicationInstance against DatabaseConnector which will never trigger the thrown exception on double call of this method Signed-off-by: Roland Häder --- diff --git a/framework/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php index 10cfa76a..cb8aaffd 100644 --- a/framework/bootstrap/class_FrameworkBootstrap.php +++ b/framework/bootstrap/class_FrameworkBootstrap.php @@ -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