mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Fix tests
This commit is contained in:
@@ -24,12 +24,17 @@ class sphinxrt
|
||||
protected function __construct(registry $registry)
|
||||
{
|
||||
$this->registry = $registry;
|
||||
|
||||
if(!$registry->get('GV_sphinx') || !$registry->get('GV_sphinx_rt_host') || !$registry->get('GV_sphinx_rt_port')) {
|
||||
throw new \Exception('Sphinx not configured');
|
||||
}
|
||||
|
||||
try {
|
||||
$dsn = sprintf('mysql:host=%s;port=%s;', $registry->get('GV_sphinx_rt_host'), $registry->get('GV_sphinx_rt_port'));
|
||||
$this->connection = @new PDO($dsn);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
self::$_failure = true;
|
||||
throw new Exception('Unable to connect to sphinx rt');
|
||||
throw new \Exception('Unable to connect to sphinx rt');
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user