Commit a2bbbdc3 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

fix pb de date

parent 24e94e83
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ class InstanceAsTextHelper extends AbstractHelper

        $categories = $formulaire->getCategories();
        $categories = array_filter($categories, function (Categorie $categorie) use ($date) {
            if ($date === null) return $categorie->estNonHistorise();
            $wasExisting = ($categorie->getHistoCreation() === null or $categorie->getHistoCreation() <= $date);
            $wasntHistorise = ($categorie->getHistoDestruction() === null or $categorie->getHistoDestruction() >= $date);
            return ($wasExisting and $wasntHistorise);
@@ -42,6 +43,7 @@ class InstanceAsTextHelper extends AbstractHelper

                $champs = $categorie->getChamps();
                $champs = array_filter($champs, function (Champ $champ) use ($date) {
                    if ($date === null) return $champ->estNonHistorise();
                    $wasExisting = ($champ->getHistoCreation() === null or $champ->getHistoCreation() <= $date);
                    $wasntHistorise = ($champ->getHistoDestruction() === null or $champ->getHistoDestruction() >= $date);
                    return ($wasExisting and $wasntHistorise);