filtrage pour eviter une erreur si une autorisation ne permet pas d'utiliser un champ

This commit is contained in:
Christophe 2022-04-21 17:31:54 +02:00
parent bb8283f026
commit 0111fc1aba

View file

@ -62,6 +62,11 @@ function gamuform_recup_tableau_objet(string $objet, bool $all = true):array {
if (empty($T)) { if (empty($T)) {
$T = []; $T = [];
} }
// on filtre les entrées vides, qui peuvent arriver si on on des autorisations
$T = array_filter($T, function($d){
return !empty($d);
});
if (!$all) { if (!$all) {
$T = array_filter($T, function($d){ $T = array_filter($T, function($d){
return !empty($d['saisie']); return !empty($d['saisie']);