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:
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user