Fix undefined array key

This commit is contained in:
grandeljay 2023-01-28 15:01:14 +01:00
parent 3cc4f20a97
commit 070e7eebc0
3 changed files with 5 additions and 4 deletions

View file

@ -107,7 +107,8 @@ switch ($_SERVER['REQUEST_METHOD']) {
*/
$wishlist = new Wishlist($_GET['wishlist_id']);
$options = array(
'style' => $_GET['style'],
'style' => $_GET['style'],
'placeholders' => array(),
);
$where = array(
'wishlist' => '`wishlist` = ' . $wishlist->id,

View file

@ -29,7 +29,7 @@ class Database
public string $password,
) {
$dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->database . ';port=3306;charset=utf8';
$options = array();
$options = array('placeholders' => array());
$this->pdo = new \PDO($dsn, $this->user, $this->password, $options);
}

View file

@ -57,7 +57,7 @@ class Wishlist
// $this->wishes = $this->getWishes();
}
public function getWishes($options = array()): array
public function getWishes(array $options = array('placeholders' => array())): array
{
global $database;
@ -115,7 +115,7 @@ class Wishlist
return $this->wishes;
}
public function getCards(array $options = array()): string
public function getCards(array $options = array('placeholders' => array())): string
{
ob_start();