aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-10 19:57:45 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-10 19:57:45 +0200
commitc5dede84451571c9cad5d0145aac6d73731f3f26 (patch)
treef0de849bfd99d7b75061cecd50d836aafb096691
parente9497f6fc03bfd7a1724224766120389f1c554ea (diff)
parent69c21157baa16ac838d408607856dd653da919d8 (diff)
downloadwallabag-c5dede84451571c9cad5d0145aac6d73731f3f26.tar.gz
wallabag-c5dede84451571c9cad5d0145aac6d73731f3f26.tar.zst
wallabag-c5dede84451571c9cad5d0145aac6d73731f3f26.zip
Merge pull request #1903 from wallabag/force-server-version
Force server version to avoid connexion error
-rw-r--r--app/config/config.yml1
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php8
2 files changed, 8 insertions, 1 deletions
diff --git a/app/config/config.yml b/app/config/config.yml
index a8766694..86188455 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -82,6 +82,7 @@ doctrine:
82 password: "%database_password%" 82 password: "%database_password%"
83 charset: UTF8 83 charset: UTF8
84 path: "%database_path%" 84 path: "%database_path%"
85 server_version: 5.6
85 86
86 orm: 87 orm:
87 auto_generate_proxy_classes: "%kernel.debug%" 88 auto_generate_proxy_classes: "%kernel.debug%"
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index c5a5a519..2e4a59df 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -455,7 +455,13 @@ class InstallCommand extends ContainerAwareCommand
455 return false; 455 return false;
456 } 456 }
457 457
458 return in_array($databaseName, $schemaManager->listDatabases()); 458 try {
459 return in_array($databaseName, $schemaManager->listDatabases());
460 } catch (\Doctrine\DBAL\Exception\ConnectionException $e) {
461 // it means we weren't able to get database list, assume the database doesn't exist
462
463 return false;
464 }
459 } 465 }
460 466
461 /** 467 /**