Skip to content

Commit

Permalink
Merge pull request #95 from luyadev/1.1
Browse files Browse the repository at this point in the history
fix bug with not wirteable attributes
  • Loading branch information
nadar authored Apr 12, 2018
2 parents 902943b + 8a1944f commit 1856e9a
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 @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. This projec

## 1.1.2 (in progress)

## 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 1856e9a

Please sign in to comment.