fix: partials must not unset caller-owned $formData

fieldset-academic.php, fieldset-metadata.php and fieldset-licence-explanation.php
were each calling unset($formData) (or wrong variable) in their cleanup block,
destroying the variable in the parent renderShareLinkForm() scope.  This caused
an Undefined variable / TypeError on old($formData, ...) for any field rendered
after those partials (e.g. confirmation_email at line 328).

Fix: remove $formData from the unset() calls; fieldset-licence-explanation.php
was also unsetting the wrong name — corrected to unset($n) which is the variable
it actually declares.
This commit is contained in:
Pontoporeia
2026-04-29 21:54:18 +02:00
parent 992f74b31c
commit 80b7fddea4
4 changed files with 5 additions and 3 deletions

View File

@@ -59,4 +59,4 @@ $formData = $formData ?? [];
?>
</fieldset>
<?php
unset($oldFn, $withAutofocusFn, $formData);
unset($oldFn, $withAutofocusFn);