mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Fix few bad var
This commit is contained in:
parent
73b82296a7
commit
89cb3db678
7 changed files with 25 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue