fix: le nom du fichier doit passe dynamique sinon, la verif ne fonctionne pas dans toutes les situations
This commit is contained in:
parent
fc05287781
commit
91fb5cb036
1 changed files with 7 additions and 4 deletions
|
@ -20,10 +20,13 @@ function inc_bigform_verifier_dist($options = [], &$erreurs = [] ){
|
|||
|
||||
$er = [];
|
||||
$verifier = charger_fonction('verifier', 'inc/');
|
||||
if (!empty($_FILES['fichiers'])) {
|
||||
$verifier($_FILES['fichiers'], 'fichiers',$options, $er);
|
||||
if (count($er)) {
|
||||
$erreurs['fichiers'] = implode('<br>', $er);
|
||||
|
||||
if (!empty($_FILES)) {
|
||||
foreach ($_FILES as $cle => $file) {
|
||||
$verifier($file, 'fichiers', $options, $er);
|
||||
if (count($er)) {
|
||||
$erreurs[$cle] = implode('<br>', $er);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue