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