Skip to content

Commit

Permalink
fix bug with not wirteable attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Apr 12, 2018
1 parent 3a171e5 commit 45ada3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. This project make usage of the [Yii Versioning Strategy](https://github.com/yiisoft/yii2/blob/master/docs/internals/versions.md). In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md).

## 1.1.1.1 (12. April 2018)

+ [#23](https://github.com/luyadev/luya-kickstarter/issues/23) Fix issue with not writeable attributes on assign.

## 1.1.1 (11. April 2018)

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/ngrest/plugins/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function onAfterFind($event)
*/
public function onAssign($event)
{
if (!$this->i18n && $this->encoding) {
if (!$this->i18n && $this->encoding && $this->isAttributeWriteable($event)) {
$event->sender->setAttribute($this->name, Html::encode($event->sender->getAttribute($this->name)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ngrest/plugins/Textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function onAfterFind($event)
*/
public function onAssign($event)
{
if (!$this->i18n && $this->encoding) {
if (!$this->i18n && $this->encoding && $this->isAttributeWriteable($event)) {
$event->sender->setAttribute($this->name, Html::encode($event->sender->getAttribute($this->name)));
}
}
Expand Down

0 comments on commit 45ada3f

Please sign in to comment.