From 3edd478a467903452f6153372b2f2beae0345993 Mon Sep 17 00:00:00 2001 From: GregM Date: Wed, 23 Feb 2022 15:36:43 +0100 Subject: [PATCH] Fix empty url : dont add token --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 9a866303eb3..b1f99d6f3f3 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9954,7 +9954,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = $class = 'butAction'; if ($actionType == 'danger' || $actionType == 'delete') { $class = 'butActionDelete'; - if (strpos($url, 'token=') === false) $url .= '&token='.newToken(); + if (!empty($url) && strpos($url, 'token=') === false) $url .= '&token='.newToken(); } $attr = array(