fix: prevent jury-fieldset partial from calling old() with wrong arity in partage context

Drop '?: null' coercions on juryPresident/juryPromoteur seeding in partage/index.php
so they are '' (not null), making the partial's $addMode guard false and skipping the
single-arg old() call that clashes with partage's 3-arg old() signature.
This commit is contained in:
Pontoporeia
2026-04-29 21:47:48 +02:00
parent 43702542eb
commit 992f74b31c

View File

@@ -270,8 +270,8 @@ function renderShareLinkForm(string $slug, array $link): void
<!-- ═══════════════════ Composition du jury ═══════════════════ -->
<?php
// Seed jury partial from repopulated $formData (share add-mode).
$juryPresident = old($formData, 'jury_president') ?: null;
$juryPromoteur = old($formData, 'jury_promoteur') ?: null;
$juryPresident = old($formData, 'jury_president');
$juryPromoteur = old($formData, 'jury_promoteur');
$juryPromoteurExt = !empty($formData['jury_promoteur_ext']) ? 1 : 0;
$juryLecteurs = [];
for ($i = 0; $i < 4; $i++) {