Fix empty url : dont add token

This commit is contained in:
GregM 2022-02-23 15:36:43 +01:00
parent e107423c21
commit 3edd478a46

View File

@ -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(