From 98e48eb411acfc18f5f7574d555cc957aa91a71c Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Sat, 30 Oct 2021 22:50:50 +0200 Subject: [PATCH] Fixed the model state not being set correctly Signed-off-by: Roland Dalmulder --- .../PatchTester/Controller/DisplayController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php b/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php index 54768b2..6a036d9 100644 --- a/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php +++ b/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php @@ -76,7 +76,12 @@ class DisplayController extends AbstractController $model = new $modelClass($this->context, null, Factory::getDbo()); // Initialize the state for the model - $model->setState($this->initializeState($model)); + $state = $this->initializeState($model); + + foreach ($state as $key => $value) + { + $model->setState($key, $value); + } // Initialize the view class now $view = new $viewClass($model, $paths);