From bbb8255b5dab7233b34a5ea55a60c478c8cdfdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 20 Nov 2015 19:48:06 +0100 Subject: [PATCH] Check install before adding CORS as currently throw Exception --- lib/Alchemy/Phrasea/Application.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index a40fce3c8d..ac712b2fa3 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -350,7 +350,9 @@ class Application extends SilexApplication return new DefaultProvider($paths, []); }; - $this['alchemy_cors.options_providers'][] = 'phraseanet.api_cors.options_provider'; + if ($this['phraseanet.configuration-tester']->isInstalled()) { + $this['alchemy_cors.options_providers'][] = 'phraseanet.api_cors.options_provider'; + } // allow access to oauth service from standard application scope $this->register(new V1());