mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
fixed unlink() for array valued attributes
return value would not be a valid array when json encoded after unlink(). fixes #6065
This commit is contained in:
@ -1295,7 +1295,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
|
||||
if (($key = array_search($model->$a, $this->$b, false)) !== false) {
|
||||
$values = $this->$b;
|
||||
unset($values[$key]);
|
||||
$this->$b = $values;
|
||||
$this->$b = array_values($values);
|
||||
}
|
||||
} else {
|
||||
$this->$b = null;
|
||||
|
||||
Reference in New Issue
Block a user