Skip to content

Commit 9f5a53b

Browse files
authored
Remove LegacyPropertyManagementTrait::setProperties() usage in core (joomla#44008)
1 parent 29c9b5e commit 9f5a53b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

libraries/src/Categories/CategoryNode.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ class CategoryNode implements NodeInterface
283283
public function __construct($category = null, $constructor = null)
284284
{
285285
if ($category) {
286-
$this->setProperties($category);
286+
foreach ($category as $key => $value) {
287+
$this->$key = $value;
288+
}
287289

288290
if ($constructor) {
289291
$this->_constructor = $constructor;

libraries/src/User/User.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,10 +675,8 @@ public function bind(&$array)
675675
}
676676

677677
// Bind the array
678-
if (!$this->setProperties($array)) {
679-
$this->setError(Text::_('JLIB_USER_ERROR_BIND_ARRAY'));
680-
681-
return false;
678+
foreach ($array as $key => $value) {
679+
$this->$key = $value;
682680
}
683681

684682
// Make sure its an integer
@@ -882,7 +880,9 @@ public function load($id)
882880
}
883881

884882
// Assuming all is well at this point let's bind the data
885-
$this->setProperties($table->getProperties());
883+
foreach ($table->getProperties() as $key => $value) {
884+
$this->$key = $value;
885+
}
886886

887887
// The user is no longer a guest
888888
if ($this->id != 0) {

0 commit comments

Comments
 (0)