mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-01 18:14:23 +00:00
fix: don't initialize messages if not logged-in
This commit is contained in:
@@ -278,6 +278,10 @@ class Session {
|
||||
};
|
||||
$session = new Session;
|
||||
$form = new Form;
|
||||
$message = new Message;
|
||||
|
||||
// if there is no user, we'd try to load messages for user with ID 0, which is wrong
|
||||
if ($_SESSION['id_user']) {
|
||||
$message = new Message;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user