fix phpstan (#31006)

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Frédéric FRANCE 2024-09-20 02:20:33 +02:00 committed by GitHub
parent 6fb924e90b
commit aaa3c8336e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 11 deletions

View file

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* 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);
}
}
}

View file

@ -7,8 +7,8 @@
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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".'<!-- Start form link new url --><div class="formlinknewurl">'."\n";
$langs->load('link');
$title = $langs->trans("LinkANewFile");
$out .= load_fiche_titre($title, null, null);
$out .= load_fiche_titre($title, '', '');
if (empty($usewithoutform)) {
$out .= '<form name="'.$htmlname.'_link" id="'.$htmlname.'_link" action="'.$url.'" method="POST">'."\n";

View file

@ -617,7 +617,7 @@ if (!function_exists('ftp_connect')) {
print "</form>";
if ($user->hasRight('ftp', 'write')) {
print load_fiche_titre($langs->trans("AttachANewFile"), null, null);
print load_fiche_titre($langs->trans("AttachANewFile"), '', '');
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="numero_ftp" value="'.$numero_ftp.'">';
@ -630,7 +630,7 @@ if (!function_exists('ftp_connect')) {
print '<br><br>';
print load_fiche_titre($langs->trans("AddFolder"), null, null);
print load_fiche_titre($langs->trans("AddFolder"), '', '');
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="numero_ftp" value="'.$numero_ftp.'">';

View file

@ -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#'