mirror of
https://github.com/tchapi/davis.git
synced 2025-01-29 10:38:14 +01:00
Make sure that we get a PDO instance
This commit is contained in:
parent
cbed240002
commit
1dbc69e0fb
@ -7,6 +7,7 @@ use App\Entity\User;
|
||||
use App\Plugins\DavisIMipPlugin;
|
||||
use App\Services\BasicAuth;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PDO;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@ -142,7 +143,11 @@ class DAVController extends AbstractController
|
||||
|
||||
private function initServer()
|
||||
{
|
||||
// Get the PDO Connection of type PDO
|
||||
$pdo = $this->em->getConnection()->getWrappedConnection();
|
||||
if (!($pdo instanceof PDO)) {
|
||||
$pdo = $pdo->getWrappedConnection();
|
||||
}
|
||||
|
||||
/*
|
||||
* The backends.
|
||||
|
Loading…
x
Reference in New Issue
Block a user