Commit afa643c4 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction : ajout catch DBALException manquant (exception lancée...

Correction : ajout catch DBALException manquant (exception lancée lorsqu'aucune table "user" trouvée).
parent fb0c54a7
......@@ -10,6 +10,7 @@ use Zend\Authentication\Exception\InvalidArgumentException;
use Zend\Authentication\Storage\Session;
use Zend\Authentication\Storage\StorageInterface;
use ZfcUser\Mapper\UserInterface as UserMapper;
use Doctrine\DBAL\DBALException;
/**
* Db authentication storage.
......@@ -117,6 +118,9 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
try {
$identity = $this->getMapper()->findById($id);
}
catch (DBALException $dbale) {
$identity = null;
}
catch (PDOException $pdoe) {
$identity = null;
}
......@@ -138,6 +142,9 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
try {
$identity = $this->getMapper()->findByUsername($id);
}
catch (DBALException $dbale) {
$identity = null;
}
catch (PDOException $pdoe) {
$identity = null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment