From 4c5b1983c1c288cc6ca1dc431fbd2183930d4d84 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Fri, 20 May 2022 13:32:32 +0200 Subject: [PATCH] Fix PHP 8 compatibility --- MPForms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MPForms.php b/MPForms.php index ce12c84..c57958b 100644 --- a/MPForms.php +++ b/MPForms.php @@ -50,7 +50,7 @@ public function compileFormFields($formFields, $formId, Form $form) // but still save data already added to the input fields so it is // there when they come back to the current step if ('back' === ($_POST['mp_form_pageswitch'] ?? null)) { - $manager->storeData($_POST, [], (array) $_SESSION['FILES']); + $manager->storeData($_POST, [], (array) ($_SESSION['FILES'] ?? [])); $this->redirectToStep($manager, $manager->getPreviousStep()); }