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:
Carsten Brandt
2014-11-15 21:42:36 +01:00
parent e5b927244c
commit 38d0570843
3 changed files with 27 additions and 1 deletions

View File

@ -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;