From 1b291ea58237bc44dc8d87152f87f2ee222cf9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 14 Mar 2021 17:58:05 +0100 Subject: [PATCH] Fix php8 warning --- htdocs/main.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ab33d5cdc3a..440707a9657 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -13,6 +13,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2020 Demarest Maxime * Copyright (C) 2020 Charlene Benke + * Copyright (C) 2021 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -791,7 +792,7 @@ if (!defined('NOLOGIN')) { } else { // We are already into an authenticated session $login = $_SESSION["dol_login"]; - $entity = $_SESSION["dol_entity"]; + $entity = isset($_SESSION["dol_entity"]) ? $_SESSION["dol_entity"] : 0; dol_syslog("- This is an already logged session. _SESSION['dol_login']=".$login." _SESSION['dol_entity']=".$entity, LOG_DEBUG); $resultFetchUser = $user->fetch('', $login, '', 1, ($entity > 0 ? $entity : -1));