fix: invalid use of isset
This commit is contained in:
parent
0f16293f4e
commit
1d50f3febc
3 changed files with 4 additions and 6 deletions
|
@ -14,7 +14,7 @@ $user = User::getCurrent();
|
||||||
|
|
||||||
switch ($_SERVER['REQUEST_METHOD']) {
|
switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
case 'POST':
|
case 'POST':
|
||||||
if (isset($_POST['wishlist-name'], $user->getId())) {
|
if (isset($_POST['wishlist-name'])) {
|
||||||
/**
|
/**
|
||||||
* Create
|
* Create
|
||||||
*/
|
*/
|
||||||
|
@ -155,7 +155,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
} else {
|
} else {
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
}
|
}
|
||||||
} elseif (isset($_GET['userid']) || isset($user->getId())) {
|
} elseif (isset($_GET['userid'])) {
|
||||||
/**
|
/**
|
||||||
* Get user wishlists
|
* Get user wishlists
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -197,7 +197,7 @@ class Wish
|
||||||
$userCard->getLocale() . '@currency=' . $userCard->getCurrency(),
|
$userCard->getLocale() . '@currency=' . $userCard->getCurrency(),
|
||||||
\NumberFormatter::CURRENCY
|
\NumberFormatter::CURRENCY
|
||||||
);
|
);
|
||||||
$userIsCurrent = isset($userCurrent->getId()) && $userCurrent->getId() === $userCard->getId();
|
$userIsCurrent = $userCurrent->getId() === $userCard->getId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Card
|
* Card
|
||||||
|
|
|
@ -52,7 +52,6 @@ if (isset($_POST['reset'], $_POST['email'])) {
|
||||||
|
|
||||||
$user = false !== $userQuery ? new User($userQuery->fetch()) : new User();
|
$user = false !== $userQuery ? new User($userQuery->fetch()) : new User();
|
||||||
|
|
||||||
if (isset($user->getId())) {
|
|
||||||
$token = sha1(time() . rand(0, 999999));
|
$token = sha1(time() . rand(0, 999999));
|
||||||
$validUntil = time() + 3600;
|
$validUntil = time() + 3600;
|
||||||
|
|
||||||
|
@ -94,7 +93,6 @@ if (isset($_POST['reset'], $_POST['email'])) {
|
||||||
__('Info')
|
__('Info')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$page->header();
|
$page->header();
|
||||||
$page->bodyStart();
|
$page->bodyStart();
|
||||||
|
|
Loading…
Reference in a new issue