diff --git a/workflow/engine/methods/cases/cases_ShowDocument.php b/workflow/engine/methods/cases/cases_ShowDocument.php index 768e5a814..c5a544c23 100644 --- a/workflow/engine/methods/cases/cases_ShowDocument.php +++ b/workflow/engine/methods/cases/cases_ShowDocument.php @@ -1,4 +1,5 @@ userCanAccess('PM_FOLDERS_ALL') != 1 && defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0; if ($access && $isGuestUser === false) { - if (!$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) { + if (isset($_SESSION['USER_LOGGED']) && !$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) { G::header('Location: /errors/error403.php?url=' . urlencode($_SERVER['REQUEST_URI'])); die(); } @@ -131,4 +132,4 @@ if (!$sw_file_exists) { G::streamFile($realPath, $bDownload, $nameFile); //download } } -} \ No newline at end of file +}