fix a few more session-related warnings

This commit is contained in:
Andrew Dolgov 2021-02-12 21:24:49 +03:00
parent 119a4226d8
commit e6624cf631
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@
UserHelper::authenticate( "admin", null);
}
if ($_SESSION["uid"]) {
if (!empty($_SESSION["uid"])) {
if (!validate_session()) {
header("Content-Type: text/json");
print error_json(6);

View File

@ -2,6 +2,6 @@
class Handler_Protected extends Handler {
function before($method) {
return parent::before($method) && $_SESSION['uid'];
return parent::before($method) && !empty($_SESSION['uid']);
}
}