@@ -22,10 +22,11 @@ |
||
| 22 | 22 | public function onKernelRequest(RequestEvent $event) |
| 23 | 23 | { |
| 24 | 24 | try { |
| 25 | - if (!self::$tenancy_params) |
|
| 26 | - self::$tenancy_params = $this->databaseSwitchService->switchDatabaseByDomain( |
|
| 25 | + if (!self::$tenancy_params) { |
|
| 26 | + self::$tenancy_params = $this->databaseSwitchService->switchDatabaseByDomain( |
|
| 27 | 27 | $this->domainService->getDomain() |
| 28 | 28 | ); |
| 29 | + } |
|
| 29 | 30 | } catch (Exception $e) { |
| 30 | 31 | throw new Exception(sprintf('%s', $e), 1); |
| 31 | 32 | } |