bug 1176: Check for the profile being set prior to checking it to be an array.
authorBenny Baumann <BenBE@geshi.org>
Wed, 26 Jun 2013 20:28:21 +0000 (22:28 +0200)
committerBenny Baumann <BenBE@geshi.org>
Wed, 26 Jun 2013 20:28:21 +0000 (22:28 +0200)
includes/loggedin.php

index 0070ede..97ec2fa 100644 (file)
@@ -20,7 +20,7 @@
        require_once("../includes/lib/l10n.php");
        include_once("../includes/mysql.php");
 
-       if(!is_array($_SESSION['profile'])) {
+       if(!isset($_SESSION['profile']) || !is_array($_SESSION['profile'])) {
                $_SESSION['profile'] = array( 'id' => 0, 'loggedin' => 0 );
        }
        if(!isset($_SESSION['profile']['id']) || !isset($_SESSION['profile']['loggedin'])) {