diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index e90b1998906..2272997784b 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -1,7 +1,8 @@ - * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Ferran Marcet +/* Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Ferran Marcet + * Copyright (C) 2024 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 @@ -111,7 +112,7 @@ if (GETPOST('sendit', 'alpha') && getDolGlobalString('MAIN_UPLOAD_DOC') && !empt } if (!$error) { - dol_add_file_process($upload_dir, 0, 1, 'userfile', null, $link, '', 0); + dol_add_file_process($upload_dir, 0, 1, 'userfile', '', $link, '', 0); } } } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 5d704678054..c8630c2b057 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -7,8 +7,8 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2015 Bahfir Abbes * Copyright (C) 2016-2017 Ferran Marcet - * Copyright (C) 2019-2023 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -123,7 +123,7 @@ class FormFile $title = $langs->trans("AttachANewFile"); } if ($title != 'none') { - $out .= load_fiche_titre($title, null, null); + $out .= load_fiche_titre($title, '', ''); } if (empty($usewithoutform)) { // Try to avoid this and set instead the form by the caller. @@ -222,7 +222,7 @@ class FormFile $out .= "\n".'
'."\n"; $langs->load('link'); $title = $langs->trans("LinkANewFile"); - $out .= load_fiche_titre($title, null, null); + $out .= load_fiche_titre($title, '', ''); if (empty($usewithoutform)) { $out .= '"; if ($user->hasRight('ftp', 'write')) { - print load_fiche_titre($langs->trans("AttachANewFile"), null, null); + print load_fiche_titre($langs->trans("AttachANewFile"), '', ''); print '
'; print ''; print ''; @@ -630,7 +630,7 @@ if (!function_exists('ftp_connect')) { print '

'; - print load_fiche_titre($langs->trans("AddFolder"), null, null); + print load_fiche_titre($langs->trans("AddFolder"), '', ''); print ''; print ''; print ''; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 62109514c58..d45f3beaf9c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -97,7 +97,6 @@ parameters: - '# (dol_strlen|vatrate) expects string, float(\|(int|array)(\<.*\>)?)* given.#' - '#create_line\(\) expects string, float given.#' - '# dol_stringtotime expects string, DateTime given.#' - - '# (load_fiche_titre|dol_add_file_process) expects string, null given.#' - '# (show_ldap_content|projectLinesa) expects string, true given.#' - '#expects string, bool\|mysqli_result\|resource given.#' - '#( |::)((multi)?selectarray)\(\) expects array#'