summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend.php2
-rw-r--r--classes/handler/protected.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/backend.php b/backend.php
index dec79f46f..2ea396987 100644
--- a/backend.php
+++ b/backend.php
@@ -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);
diff --git a/classes/handler/protected.php b/classes/handler/protected.php
index 765b17480..8e9e5ca1d 100644
--- a/classes/handler/protected.php
+++ b/classes/handler/protected.php
@@ -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']);
}
}