Permalink
Browse files

Prevent error messages when installing an app and the DB doesn't exist

  • Loading branch information...
1 parent abe24f7 commit d3c41137fac4243e02df410fe4fd592d472d31fe @javiereguiluz committed Oct 14, 2016
Showing with 8 additions and 2 deletions.
  1. +8 −2 Cache/ConfigWarmer.php
@@ -29,8 +29,14 @@ public function __construct(ConfigManager $configManager)
public function warmUp($cacheDir)
{
- // this forces the full processing of the backend configuration
- $this->configManager->getBackendConfig();
+ try {
+ // this forces the full processing of the backend configuration
+ $this->configManager->getBackendConfig();
+ } catch (\PDOException $e) {
+ // this occurs for example when the database doesn't exist yet and the
+ // project is being installed ('composer install' clears the cache at the end)
+ // ignore this error at this point and display an error message later
+ }
}
public function isOptional()

0 comments on commit d3c4113

Please sign in to comment.