|
@@ 919-924 (lines=6) @@
|
| 916 |
|
} |
| 917 |
|
$value = array($value); |
| 918 |
|
} // field already exist and has single value |
| 919 |
|
elseif (!is_array($oldValue)) { |
| 920 |
|
$value = array_merge((array) $oldValue, array($value)); |
| 921 |
|
if ($this->getId()) { |
| 922 |
|
$this->operator->set($fieldName, $value); |
| 923 |
|
} |
| 924 |
|
} // field exists and is array |
| 925 |
|
else { |
| 926 |
|
if ($this->getId()) { |
| 927 |
|
// check if array because previous $set operation on single value was executed |
|
@@ 959-962 (lines=4) @@
|
| 956 |
|
if ($this->getId()) { |
| 957 |
|
if (!$oldValue) { |
| 958 |
|
$this->operator->pushEach($fieldName, $values); |
| 959 |
|
} elseif (!is_array($oldValue)) { |
| 960 |
|
$values = array_merge((array) $oldValue, $values); |
| 961 |
|
$this->operator->set($fieldName, $values); |
| 962 |
|
} else { |
| 963 |
|
$this->operator->pushEach($fieldName, $values); |
| 964 |
|
$values = array_merge($oldValue, $values); |
| 965 |
|
} |