Skip to content

Commit

Permalink
Check if there is a session, to avoid PHP warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel O'Connor committed Apr 15, 2013
1 parent cca259d commit 3acbd03
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -314,7 +314,10 @@ function validateIP() {
*
*/
function logout(){
session_destroy();
if (session_id()) {
session_destroy();
}

ob_clean();
header('Location: index.php?module=Users&action=Login');
sugar_cleanup(true);
Expand Down

0 comments on commit 3acbd03

Please sign in to comment.