Fix undefined array key
This commit is contained in:
parent
3cc4f20a97
commit
070e7eebc0
3 changed files with 5 additions and 4 deletions
|
@ -108,6 +108,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
$wishlist = new Wishlist($_GET['wishlist_id']);
|
$wishlist = new Wishlist($_GET['wishlist_id']);
|
||||||
$options = array(
|
$options = array(
|
||||||
'style' => $_GET['style'],
|
'style' => $_GET['style'],
|
||||||
|
'placeholders' => array(),
|
||||||
);
|
);
|
||||||
$where = array(
|
$where = array(
|
||||||
'wishlist' => '`wishlist` = ' . $wishlist->id,
|
'wishlist' => '`wishlist` = ' . $wishlist->id,
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Database
|
||||||
public string $password,
|
public string $password,
|
||||||
) {
|
) {
|
||||||
$dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->database . ';port=3306;charset=utf8';
|
$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);
|
$this->pdo = new \PDO($dsn, $this->user, $this->password, $options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ class Wishlist
|
||||||
// $this->wishes = $this->getWishes();
|
// $this->wishes = $this->getWishes();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWishes($options = array()): array
|
public function getWishes(array $options = array('placeholders' => array())): array
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class Wishlist
|
||||||
return $this->wishes;
|
return $this->wishes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCards(array $options = array()): string
|
public function getCards(array $options = array('placeholders' => array())): string
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue