$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