File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
administrator/components/com_messages/src/Model Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1313use Joomla \CMS \Component \ComponentHelper ;
1414use Joomla \CMS \MVC \Model \FormModel ;
1515use Joomla \Database \ParameterType ;
16+ use Joomla \Registry \Registry ;
1617
1718// phpcs:disable PSR1.Files.SideEffects
1819\defined ('_JEXEC ' ) or die;
@@ -58,6 +59,7 @@ protected function populateState()
5859 */
5960 public function getItem ()
6061 {
62+ $ item = new Registry ();
6163 $ userid = (int ) $ this ->getState ('user.id ' );
6264
6365 $ db = $ this ->getDatabase ();
@@ -82,7 +84,10 @@ public function getItem()
8284 return false ;
8385 }
8486
85- $ item = (object ) array_column ($ rows , 'cfg_value ' , 'cfg_name ' );
87+ foreach ($ rows as $ row ) {
88+ $ property = $ row ->cfg_name ;
89+ $ item ->set ($ property , $ row ->cfg_value );
90+ }
8691
8792 $ this ->preprocessData ('com_messages.config ' , $ item );
8893
You can’t perform that action at this time.
0 commit comments