- 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>
$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