Do some isset() checkings with $CFG->sessioncookie.

Previously when debug turned on, login was impossible
due to some notices sent before writing http headers.
This commit is contained in:
stronk7
2003-10-17 09:54:41 +00:00
parent c1e97fe591
commit 23f6216b92
2 changed files with 15 additions and 4 deletions
+5 -1
View File
@@ -171,7 +171,11 @@
class object {};
if (!isset($nomoodlecookie)) {
session_name('MoodleSession'.$CFG->sessioncookie);
if (isset($CFG->sessioncookie)) {
session_name('MoodleSession'.$CFG->sessioncookie);
} else {
session_name('MoodleSession');
}
@session_start();
if (! isset($_SESSION['SESSION'])) {
$_SESSION['SESSION'] = new object;