Fix Undefined array key "user"

This commit is contained in:
Jay Trees 2022-02-22 14:47:23 +01:00
parent de2a551cc4
commit 4a42780db2

View file

@ -132,7 +132,7 @@ class Wishlist
<?php if ($info->url) { ?> <?php if ($info->url) { ?>
<a class="ui tiny button" href="<?= $info->url ?>" target="_blank">View</a> <a class="ui tiny button" href="<?= $info->url ?>" target="_blank">View</a>
<?php } ?> <?php } ?>
<?php if ($this->data['user'] === $_SESSION['user']['id']) { ?> <?php if (isset($_SESSION['user']) && $this->data['user'] === $_SESSION['user']['id']) { ?>
<a class="ui tiny red button delete">Delete</a> <a class="ui tiny red button delete">Delete</a>
<?php } else { ?> <?php } else { ?>
<a class="ui tiny button commit">Commit</a> <a class="ui tiny button commit">Commit</a>