Fix few bad var

This commit is contained in:
osaajani 2020-04-02 19:10:54 +02:00
parent 73b82296a7
commit 89cb3db678
7 changed files with 25 additions and 21 deletions

View file

@ -15,8 +15,12 @@ namespace controllers\internals;
{
protected $bdd;
public function __construct(\PDO $bdd)
public function __construct(?\PDO $bdd = null)
{
if ($bdd === null)
{
$bdd = \descartes\Model::_connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
}
$this->bdd = $bdd;
}