aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-30 13:25:37 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-30 13:25:37 -0700
commitfab63ca751beac91d12e06c194101cacd1f909e5 (patch)
tree524fc265d0dbc29db44146b6b26032ca815d605a /include
parent768acb0a3faf2c2f2a523420710673aaacb64f76 (diff)
downloadvolse-hubzilla-fab63ca751beac91d12e06c194101cacd1f909e5.tar.gz
volse-hubzilla-fab63ca751beac91d12e06c194101cacd1f909e5.tar.bz2
volse-hubzilla-fab63ca751beac91d12e06c194101cacd1f909e5.zip
-Wall cleanup
Diffstat (limited to 'include')
-rw-r--r--include/auth.php23
-rw-r--r--include/dba.php4
2 files changed, 15 insertions, 12 deletions
diff --git a/include/auth.php b/include/auth.php
index a54b24f08..4813bb45b 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -2,7 +2,7 @@
// login/logout
-if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] === 'login'))) {
+if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] === 'login'))) {
if($_POST['auth-params'] === 'logout' || $a->module === 'logout') {
@@ -53,16 +53,19 @@ if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] === 'login'))) {
}
else {
- unset($_SESSION['authenticated']);
- unset($_SESSION['uid']);
- unset($_SESSION['visitor_id']);
- unset($_SESSION['administrator']);
- unset($_SESSION['cid']);
- unset($_SESSION['theme']);
- unset($_SESSION['my_url']);
- unset($_SESSION['page_flags']);
+ if(isset($_SESSION)) {
+ unset($_SESSION['authenticated']);
+ unset($_SESSION['uid']);
+ unset($_SESSION['visitor_id']);
+ unset($_SESSION['administrator']);
+ unset($_SESSION['cid']);
+ unset($_SESSION['theme']);
+ unset($_SESSION['my_url']);
+ unset($_SESSION['page_flags']);
+ }
- $encrypted = hash('whirlpool',trim($_POST['password']));
+ if(x($_POST,'password'))
+ $encrypted = hash('whirlpool',trim($_POST['password']));
if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') {
diff --git a/include/dba.php b/include/dba.php
index 133b596ef..9d0896a35 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -36,8 +36,8 @@ class dba {
$mesg = '';
- if($this->db->mysqli->errno)
- $debug_text .= $this->db->mysqli->error . EOL;
+ if($this->db->errno)
+ $debug_text .= $this->db->error . EOL;
if($result === false)
$mesg = 'false';