From 64f5278e2b82791fb63a40fd02a67a66154d05cb Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Mon, 6 Oct 2025 18:07:38 +0200 Subject: [PATCH] Simplify token validation in download handler - Changed from checkToken() to simple token existence check - checkToken() does not exist in this Dolibarr version - Now uses same pattern as other files in the module: if (!token) - Matches the token validation pattern used in declarationtva_view.php - Should resolve the PHP Fatal error --- download_pdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_pdf.php b/download_pdf.php index 0a4c391..2370aa8 100644 --- a/download_pdf.php +++ b/download_pdf.php @@ -30,7 +30,7 @@ $declaration_id = GETPOST('id', 'int'); $token = GETPOST('token', 'alpha'); // Validate token -if (!checkToken($token)) { +if (!$token) { accessforbidden(); }