From 02b685c6beca1628d06abd816482ea1111da9bad Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Fri, 24 May 2024 21:42:52 +0400 Subject: [PATCH] fix wrong view_data array key in constructor --- src/controllers/Register.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/Register.php b/src/controllers/Register.php index 99d2436..2fdf8e4 100644 --- a/src/controllers/Register.php +++ b/src/controllers/Register.php @@ -34,7 +34,7 @@ public function __construct() $this->view_data['errors'] = []; $this->view_data['editMode'] = false; $this->view_data['form_submitted'] = false; - $this->view_data['$registration_is_successful'] = false; + $this->view_data['registration_is_successful'] = false; // get list of districts to be displayed on form $this->view_data['districts'] = District::getAll(); @@ -120,7 +120,6 @@ private function handleFormSubmission(): void (new Error())->handleUnknownError(); die(); } - } else { $this->loadDataToForm($form_data); }