mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Return empty array when configuration cannot be loaded
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;
|
||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||
use Silex\Application;
|
||||
use Silex\ServiceProviderInterface;
|
||||
|
||||
@@ -37,6 +38,7 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
||||
]
|
||||
];
|
||||
|
||||
try {
|
||||
/** @var PropertyAccess $configuration */
|
||||
$configuration = $app['conf'];
|
||||
|
||||
@@ -56,6 +58,10 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
||||
$config = [ $queueConfiguration['name'] => $queueConfiguration ];
|
||||
|
||||
return $config;
|
||||
}
|
||||
catch (RuntimeException $exception) {
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,6 +74,6 @@ class WorkerConfigurationServiceProvider implements ServiceProviderInterface
|
||||
*/
|
||||
public function boot(Application $app)
|
||||
{
|
||||
// TODO: Implement boot() method.
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user