fix a few more session-related warnings

master
Andrew Dolgov 4 years ago
parent 119a4226d8
commit e6624cf631

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

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

Loading…
Cancel
Save