Fix undefined variable

This commit is contained in:
Jay Trees 2022-02-07 15:18:39 +01:00
parent 1653cee825
commit 4098eacf03

View file

@ -8,7 +8,7 @@
use wishthis\Page; use wishthis\Page;
$page = new page(__FILE__, 'Login'); $page = new page(__FILE__, 'Login');
if (isset($_POST['email'], $_POST['password'])) { if (isset($_POST['email'], $_POST['password'])) {
$email = $_POST['email']; $email = $_POST['email'];
@ -45,7 +45,7 @@ $page->navigation();
<h1 class="ui header"><?= $page->title ?></h1> <h1 class="ui header"><?= $page->title ?></h1>
<?php <?php
if (!$success) { if (isset($success) && !$success) {
$page->error('Invalid credentials!', 'Error'); $page->error('Invalid credentials!', 'Error');
} }
?> ?>