Replace isset($_POST) with !empty($_POST)
All checks were successful
Tests / PHPStan (static analysis) <sub>Send us [feedback](https://github.com/jenkinsci/junit-plugin/issues)
gitea/evoadmin-web/pipeline/head This commit looks good

The former is always true (outside of post method it is an empty array
and not null, and it cannot be `unset()`).

The check was as such either meaningless or was supposed to check that
something was sent. This commit assume the later.
This commit is contained in:
Mathieu Trossevin 2023-11-13 15:14:31 +01:00
parent 293ea73b6b
commit af94efde45
Signed by: mtrossevin
GPG key ID: D1DBB7EA828374E9

View file

@ -12,7 +12,7 @@
* @version 1.0
*/
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST)) {
if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST)) {
$input_username = $_POST['login'];
$input_password = $_POST['passw'];