@@ -67,9 +67,10 @@ discard block |
||
67 | 67 | /* @var $owner BaseActiveRecord */ |
68 | 68 | $owner = $this->owner; |
69 | 69 | |
70 | - if($owner->hasAttribute($this->trashAttribute)) |
|
71 | - if(empty($owner->{$this->trashAttribute})||is_null($owner->{$this->trashAttribute})) |
|
70 | + if($owner->hasAttribute($this->trashAttribute)) { |
|
71 | + if(empty($owner->{$this->trashAttribute})||is_null($owner->{$this->trashAttribute})) |
|
72 | 72 | $owner->{$this->trashAttribute} = $this->restoredFlag; |
73 | + } |
|
73 | 74 | } |
74 | 75 | |
75 | 76 | protected function getValue($event) |
@@ -85,7 +86,7 @@ discard block |
||
85 | 86 | $owner->save(false); |
86 | 87 | |
87 | 88 | return $this->removedFlag; |
88 | - }else{ |
|
89 | + } else{ |
|
89 | 90 | return true; |
90 | 91 | } |
91 | 92 | return false; |