Skip to content

Commit

Permalink
Reverted yiisoft#19309
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizley committed Oct 26, 2022
1 parent 3dfba03 commit cd25d81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Yii Framework 2 Change Log
- Bug #19589: Fix Error reporting in to the `BaseArrayHelper::getValue()` (lav45)
- Bug #19316: Fix MysqlMutex with same connection but difference database (kamarton)
- Bug #19507: Fix eager loading of nested one-to-many relations (spo0okie)
- Bug #19546: Reverted #19309 (bizley)


2.0.46 August 18, 2022
Expand Down
10 changes: 9 additions & 1 deletion framework/base/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,15 @@ public function formName()
*/
public function attributes()
{
return array_keys(Yii::getObjectVars($this));
$class = new ReflectionClass($this);
$names = [];
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
if (!$property->isStatic()) {
$names[] = $property->getName();
}
}

return $names;
}

/**
Expand Down

0 comments on commit cd25d81

Please sign in to comment.