|
@@ 1055-1060 (lines=6) @@
|
| 1052 |
|
} |
| 1053 |
|
$value = array($value); |
| 1054 |
|
} // field already exist and has single value |
| 1055 |
|
elseif (!is_array($oldValue)) { |
| 1056 |
|
$value = array_merge((array) $oldValue, array($value)); |
| 1057 |
|
if ($this->getId()) { |
| 1058 |
|
$this->operator->set($fieldName, $value); |
| 1059 |
|
} |
| 1060 |
|
} // field exists and is array |
| 1061 |
|
else { |
| 1062 |
|
if ($this->getId()) { |
| 1063 |
|
// check if array because previous $set operation on single value was executed |
|
@@ 1095-1098 (lines=4) @@
|
| 1092 |
|
if ($this->getId()) { |
| 1093 |
|
if (!$oldValue) { |
| 1094 |
|
$this->operator->pushEach($fieldName, $values); |
| 1095 |
|
} elseif (!is_array($oldValue)) { |
| 1096 |
|
$values = array_merge((array) $oldValue, $values); |
| 1097 |
|
$this->operator->set($fieldName, $values); |
| 1098 |
|
} else { |
| 1099 |
|
$this->operator->pushEach($fieldName, $values); |
| 1100 |
|
$values = array_merge($oldValue, $values); |
| 1101 |
|
} |