LSsession :: startLSsession() : Fixed Notices PHP
authorBenjamin Renard <brenard@easter-eggs.com>
Mon, 8 Nov 2010 16:00:33 +0000 (17:00 +0100)
committerBenjamin Renard <brenard@easter-eggs.com>
Mon, 8 Nov 2010 16:00:33 +0000 (17:00 +0100)
public_html/includes/class/class.LSsession.php

index 245e45b..dd96f7f 100644 (file)
@@ -514,7 +514,7 @@ class LSsession {
       }
       
       if ( self :: cacheSudDn() && (!isset($_REQUEST['LSsession_refresh'])) ) {
-        self :: $_subDnLdapServer = $_SESSION['LSsession_subDnLdapServer'];
+        self :: $_subDnLdapServer = ((isset($_SESSION['LSsession_subDnLdapServer']))?$_SESSION['LSsession_subDnLdapServer']:NULL);
       }
       
       if (!self :: loadLSobject(self :: $ldapServer['authObjectType'])) {
@@ -546,7 +546,7 @@ class LSsession {
       
       $GLOBALS['Smarty'] -> assign('LSsession_username',self :: getLSuserObject() -> getDisplayName());
       
-      if ($_POST['LSsession_topDn']) {
+      if (isset ($_POST['LSsession_topDn']) && $_POST['LSsession_topDn']) {
         if (self :: validSubDnLdapServer($_POST['LSsession_topDn'])) {
           self :: $topDn = $_POST['LSsession_topDn'];
           $_SESSION['LSsession']['topDn'] = $_POST['LSsession_topDn'];