Skip to content

Commit

Permalink
use === instead of ==
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Jun 6, 2024
1 parent bed832c commit 091e5c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/controllers/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function index(): void
{
// check if url is of form /password
if (Utility::getURL() === 'password') {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// user has submitted his email
try {
$this->handleEmailSubmission();
Expand All @@ -183,7 +183,7 @@ public function index(): void

// check if url is of form /password/reset
if (Utility::getURL() === 'password/reset') {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$this->handlePasswordSubmission();
}
// display form asking user for his new password
Expand Down
2 changes: 1 addition & 1 deletion src/views/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<option value="<?= filter_var(
$district->getID(),
FILTER_SANITIZE_NUMBER_INT
) ?>" <?= $defaultDistrictID == $district->getID(
) ?>" <?= $defaultDistrictID === $district->getID(
) ? "selected" : "" ?>><?= htmlspecialchars($district->getName()) ?></option>
<?php
endforeach; ?>
Expand Down

0 comments on commit 091e5c1

Please sign in to comment.