We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e67dff2 commit 6be0cecCopy full SHA for 6be0cec
administrator/components/com_messages/src/Model/ConfigModel.php
@@ -58,7 +58,6 @@ protected function populateState()
58
*/
59
public function getItem()
60
{
61
- $item = new \stdClass();
62
$userid = (int) $this->getState('user.id');
63
64
$db = $this->getDatabase();
@@ -83,10 +82,7 @@ public function getItem()
83
82
return false;
84
}
85
86
- foreach ($rows as $row) {
87
- $property = $row->cfg_name;
88
- $item->$property = $row->cfg_value;
89
- }
+ $item = (object) array_column($rows, 'cfg_value', 'cfg_name');
90
91
$this->preprocessData('com_messages.config', $item);
92
0 commit comments