The error is most likely cuased by accessing the $_SESSION variable, not setting it. Look for places in your code where test for something like:
$_SESSION['foo']
In if the index 'foo' for the session variable has not been set then you will get this error, because drupal 7 reports notices as well as warnings.
Depending on the situation you may want to recode like this:
if (isset($_SESSION['foo'])
Or like this:
@$SESSION['foo']
The @ operator will suppress errors and warnings in the site for that atomic command. The isset will test whether the index is set without throwing the notice to begin with.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Mutuku Ndeti Sent: Friday, September 23, 2011 2:44 AM To: support Subject: [support] $_SESSION Variables in drupal 7
Hi,
I am working on porting a module to d7.
I am getting an error "Notice: Undefined index: VARIABLE NAME in.........
I have searched the internet and tried using drupal_set_session but I am still getting the same error.
I am using D7.8