From 18d895c682d720def03c3ddcdff001dd48e72d0d Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 5 Dec 2006 18:39:20 +0000 Subject: fix for some notice errors --- modules/vauth/init.php | 4 ++-- modules/vauth/session.lib.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/vauth/init.php b/modules/vauth/init.php index 8905b5f8..96325f35 100644 --- a/modules/vauth/init.php +++ b/modules/vauth/init.php @@ -122,7 +122,7 @@ function vauth_init($data) { } /* If an error has occured then return false */ - if ($error_status) { return false; } + if (isset($error_status)) { return false; } /* Load the additional libraries that we may or may not need... */ require_once 'dbh.lib.php'; @@ -171,7 +171,7 @@ function vauth_conf($param,$clobber=0) { } // We are attempting to retrive a variable else { - if($params[$param]) return $params[$param]; + if(isset($params[$param])) return $params[$param]; else return; } diff --git a/modules/vauth/session.lib.php b/modules/vauth/session.lib.php index c9225ebf..e1959d8a 100644 --- a/modules/vauth/session.lib.php +++ b/modules/vauth/session.lib.php @@ -89,7 +89,7 @@ function vauth_sess_write($key,$value) { /* Check for Rememeber Me */ $cookie_name = vauth_conf('session_name') . "_remember"; - if ($_COOKIE[$cookie_name]) { + if (isset($_COOKIE[$cookie_name])) { $expire = time() + vauth_conf('remember_length'); } @@ -234,6 +234,8 @@ function vauth_check_session() { /* Make sure we're still valid */ $session_name = vauth_conf('session_name'); + if (!isset($_COOKIE[$session_name])) { return false; } + $key = scrub_in($_COOKIE[$session_name]); $results = vauth_get_session($key); @@ -243,7 +245,7 @@ function vauth_check_session() { /* Check for Rememeber Me */ $cookie_name = vauth_conf('session_name') . "_remember"; - if ($_COOKIE[$cookie_name]) { + if (isset($_COOKIE[$cookie_name])) { $extended = vauth_conf('remember_length'); vauth_conf(array('cookie_life'=>$extended),1); setcookie($cookie_name, '1', time() + $extended,'/',vauth_conf('cookie_domain')); -- cgit